From patchwork Fri Jul 7 18:33:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 700712 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B9DFC001DF for ; Fri, 7 Jul 2023 18:33:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232620AbjGGSde (ORCPT ); Fri, 7 Jul 2023 14:33:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232602AbjGGSd3 (ORCPT ); Fri, 7 Jul 2023 14:33:29 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA2612130; Fri, 7 Jul 2023 11:33:27 -0700 (PDT) X-QQ-mid: bizesmtp64t1688754798tei8vcry Received: from linux-lab-host.localdomain ( [116.30.131.119]) by bizesmtp.qq.com (ESMTP) with id ; Sat, 08 Jul 2023 02:33:17 +0800 (CST) X-QQ-SSF: 01200000000000D0W000000A0000000 X-QQ-FEAT: 86xnumbl2QwZqoafYHr2RqKYeHwXs6/DxFrlWgoKjAo71LMc57iPjLvpwNtxs rv2en+DwkBn01/z+yElDIEasXOEtdCeE+srxGkNFj5lpAjDUOVm7g4ENrFOvBQnqsbsUduY wegAh4ZxhwBdZCHVCys9Cf2kav+pZSoM4HmR35q2qbEsWQxj4xaES03gNrnZwx8Q3jMcNef Bav9D5CDbAc3vz84DZfIQ0Za6fnfh62xfc7jjEmxYsXZzCZj24f7ZB2m2Q5/MVd3boIvAUh YBCoEbAQZQwfHoMtCMexX035S+/iItReKLC7r331Mr8xRTGeig+FyWO+KMOWT/EXmGsMort LCz00QPY42D8ayzq4ZRKaUHwnGOLk8IasK3n2b0AcphoJeszaIvgTa9NqPC3Q== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 5977546286406332268 From: Zhangjin Wu To: w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, thomas@t-8ch.de, =?utf-8?q?Thomas_Wei?= =?utf-8?q?=C3=9Fschuh?= Subject: [PATCH v4 09/18] selftests/nolibc: link_cross: use /proc/self/cmdline Date: Sat, 8 Jul 2023 02:33:13 +0800 Message-Id: <2f9e9a1fee0132c1422fee94013b43d6c8237e38.1688750763.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org For CONFIG_NET=n, there would be no /proc/self/net, so, use /proc/self/cmdline instead. Reviewed-by: Thomas Weißschuh Signed-off-by: Zhangjin Wu --- 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 319cd51eff01..cf38df6e036c 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -731,7 +731,7 @@ int run_syscall(int min, int max) CASE_TEST(link_root1); EXPECT_SYSER(1, link("/", "/"), -1, EEXIST); break; CASE_TEST(link_blah); EXPECT_SYSER(1, link("/proc/self/blah", "/blah"), -1, ENOENT); break; CASE_TEST(link_dir); EXPECT_SYSER(euid0, link("/", "/blah"), -1, EPERM); break; - CASE_TEST(link_cross); EXPECT_SYSER(proc, link("/proc/self/net", "/blah"), -1, EXDEV); break; + CASE_TEST(link_cross); EXPECT_SYSER(proc, link("/proc/self/cmdline", "/blah"), -1, EXDEV); break; CASE_TEST(lseek_m1); EXPECT_SYSER(1, lseek(-1, 0, SEEK_SET), -1, EBADF); break; CASE_TEST(lseek_0); EXPECT_SYSER(1, lseek(0, 0, SEEK_SET), -1, ESPIPE); break; CASE_TEST(mkdir_root); EXPECT_SYSER(1, mkdir("/", 0755), -1, EEXIST); break;