Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp315515rwd; Mon, 12 Jun 2023 14:05:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/Y3kDlwYzblX21WsP1Uq4bvF4i00yewrikWVIb5pRY4k6JZk3IJvrlasfVP7CmK97+UI5 X-Received: by 2002:a05:6a00:1994:b0:646:421f:500b with SMTP id d20-20020a056a00199400b00646421f500bmr11324253pfl.10.1686603956580; Mon, 12 Jun 2023 14:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686603956; cv=none; d=google.com; s=arc-20160816; b=sKmBsbfyPBJnyhtNBaP4NujvOBHHLM3RxxKCmOzDrHhS/WcJH/FJlA5Wj9Vy8oTtw/ HyjO3UrEk98Xk2Z0lnQFh0j3/0YjD/8X4EtigwnM5zT7geBICbSehlT/zKiHGjqW+tGm 73Qlea/PD9fACPDx33Puve5OVw0UuqsbMd0F35VOT4KR0/ilO7a+6Yk+pSB1G5tugtar RJi102tIE0r7QzvAoJhfIat/ep87rEKUAVuMQ/jHv/HxAwmWOIIefCMvYeoWukDI27+n nyH6DPUx0tj8Mcw+VG7j6mmR/P4gt1nl0ozUNA22zTDRgIRe+Z+9p60cgKHrsNA9u+p9 aVgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gLpCto7bgGmBlfSdxv/v2lA43Lerxv0GqrCDptUhcCY=; b=ObCSz3owAy9G2za1ZRg8rs2FOSrGBNNoxMsyssb1gKIayjID/OR9X61GObN9LRDtRg IhFKs1PRWd68RsaMOhW+UfO8C2q/dKCBjHQjfosEUYQyIw31HBvCKYYFhk7p1JN17BE9 Qr4Y/rQ9lnkOpFBQH1vEYHlWHXTpBKFHVh+ehImJdHOosTbp3K9O7lf12PCXqv4CVvMG HkiuDejiYf/SUCL+2UzgHblBaLZgN2kLcfMnl4Wj2fzMABa6JGnWKzT5c5ugZq5ZyfbF z768L0EKCZRtQTQsMF1H/CPN0SCymjOcKzn3tTYPFnQYTWGOIzjWP5wScrw665rn5s3H MpYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N54+BxjF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h5-20020aa79f45000000b00662d5b1e29fsi7197377pfr.340.2023.06.12.14.05.44; Mon, 12 Jun 2023 14:05:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N54+BxjF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237076AbjFLUsT (ORCPT + 99 others); Mon, 12 Jun 2023 16:48:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237084AbjFLUrD (ORCPT ); Mon, 12 Jun 2023 16:47:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D35A3294B for ; Mon, 12 Jun 2023 13:46:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7A6A162F00 for ; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE4F2C433B3; Mon, 12 Jun 2023 20:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686602716; bh=TZGVRE+NeaqSEa0Q3SOYtOQ0/O9QiuguihBm45XSgyg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N54+BxjFof+z3ODfbDdCCogqYrE3BfP1vvgBz7JnqzXFxwuyL2klOYH45hsWYn6+J VMT97KD1wDUgEJ8d2jDg64jUnEjDoPJWByJ54BJ5uLKYtGCV9lVVaU+NKgpgv9WSTK uTVJ9U//hB8I04iGw/WAdr2lJbKWmIzYmz/zs4fnJYcVQN9ZAr2gjQv/feuVM+y45U asAYZ2/0nRh0tUONSoaqjnbC9fcVpumNx/G2u15nWX9g/8d9Hldh0znMA4CT5vH3qS a5Z42qJp6LcOQqGYC2pu/lBVAjIw4ChRLC1Zqb3ulR7RlO8U/edXDQ+LJbowM/XgVL 907PHrbgSLI+w== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id D2092CE3A5B; Mon, 12 Jun 2023 13:45:15 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: gwml@vger.gnuweeb.org, kernel-team@meta.com, w@lwt.eu, Zhangjin Wu , Arnd Bergmann , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Willy Tarreau , "Paul E . McKenney" Subject: [PATCH v2 nolibc 18/53] selftests/nolibc: syscall_args: use generic __NR_statx Date: Mon, 12 Jun 2023 13:44:39 -0700 Message-Id: <20230612204514.292087-18-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> References: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhangjin Wu Compiling nolibc-test.c for rv32 got such error: tools/testing/selftests/nolibc/nolibc-test.c:599:57: error: ‘__NR_fstat’ undeclared (first use in this function) 599 | CASE_TEST(syscall_args); EXPECT_SYSER(1, syscall(__NR_fstat, 0, NULL), -1, EFAULT); break; The generic include/uapi/asm-generic/unistd.h used by rv32 doesn't support __NR_fstat, use the more generic __NR_statx instead: Running test 'syscall' 69 syscall_noargs = 1 [OK] 70 syscall_args = -1 EFAULT [OK] __NR_statx has been added from v4.10: commit a528d35e8bfc ("statx: Add a system call to make enhanced file info available") It has been supported by all of the platforms since at least from v4.20. Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/linux-riscv/ee8b1f02-ded1-488b-a3a5-68774f0349b5@app.fastmail.com/ Signed-off-by: Zhangjin Wu Reviewed-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney --- tools/testing/selftests/nolibc/nolibc-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 54bf91847af3..0e2ee513b273 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -589,7 +589,7 @@ int run_syscall(int min, int max) CASE_TEST(write_badf); EXPECT_SYSER(1, write(-1, &tmp, 1), -1, EBADF); break; CASE_TEST(write_zero); EXPECT_SYSZR(1, write(1, &tmp, 0)); break; CASE_TEST(syscall_noargs); EXPECT_SYSEQ(1, syscall(__NR_getpid), getpid()); break; - CASE_TEST(syscall_args); EXPECT_SYSER(1, syscall(__NR_fstat, 0, NULL), -1, EFAULT); break; + CASE_TEST(syscall_args); EXPECT_SYSER(1, syscall(__NR_statx, 0, NULL, 0, 0, NULL), -1, EFAULT); break; case __LINE__: return ret; /* must be last */ /* note: do not set any defaults so as to permit holes above */ -- 2.40.1