From patchwork Fri Jun 30 14:55:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 114764 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp10448360vqr; Fri, 30 Jun 2023 08:19:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlE2l1dz9iroeHzMnxEXp5pd++RgGj/mqlkhn5UcnKzlcZwga+G/7lG/1iulHbN0C33b/Gdp X-Received: by 2002:a05:6a20:1584:b0:12c:763b:f099 with SMTP id h4-20020a056a20158400b0012c763bf099mr3670405pzj.58.1688138342197; Fri, 30 Jun 2023 08:19:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688138342; cv=none; d=google.com; s=arc-20160816; b=I0NKr3bDGp+YwEo0uwSVWpK2WjDT20JckjPVXwmUxAeaE99Bw4fRpZu1V21jR4D78h 9gRK89vvcrvkp/rwZCktdo6tR5+kl43W6cOq9I4C0Z5xG3f+grnusVc2JRVtfTVPeIa/ IqC1wv5BRQb7VPldQEDj+3+4YwmwI60pFjE+IR6lLJCgoTlgKh3L9nAPx27GjGpUxz6A rnbZPMpo86Hjf4xfbH3/ojrl8pAo0d+xgR68yTRDyLhNSvniHQg0DB3mu8fXZcqREW7V 6H/mfAGdNgo7iBdhQMuA/XfscjZ1BKSa57pf5SCCCViw8pmCA9kJQ3sOvnZ2yUV16XNA 3NYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=1oT8+ECZIToC6YS1zo7fSR2NJzy7Cmvk8KJidEOu2LQ=; fh=49fx4+cYYT2jkB1G9v6CSOY1nO+RV0JwAuF3mNCzENI=; b=YJWDnuARrYePl/85T3FjN4P2ZHPa0zAljfQ5AcIEvuPLTxh1aq57I8mMJf1rb+sX9T w54BlDyhCOSsWftNdFfBJ/og8mHVshcI6Jzwfo+B6AXVw9XkY1JiPzOzmBFTLjWx2LUR LDFig5SI2yKakA82FhmR/y91yIqxWVy+Cpx0rJXXcpQtxCngN7DrzVPLGrwIvBEe/Zdm k8gjWjjV+uuFzY42kYBXuhCmFQil2R3B0zBlYmGTZFai8lG6KSh5GkbzP3gk/FM4gdiQ Bjfy2LyX/CGTLehHVl71sg9N2sdmQcXFItNmBcUtY8I40hxwoFenO+yV25TcoAYyV7GE BLiA== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w7-20020a056a0014c700b0067f69d10241si6085733pfu.176.2023.06.30.08.18.49; Fri, 30 Jun 2023 08:19:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232801AbjF3O4C (ORCPT + 99 others); Fri, 30 Jun 2023 10:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232068AbjF3O4A (ORCPT ); Fri, 30 Jun 2023 10:56:00 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E90583C35; Fri, 30 Jun 2023 07:55:51 -0700 (PDT) X-QQ-mid: bizesmtp89t1688136942tf8eezrl Received: from linux-lab-host.localdomain ( [119.123.131.49]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 30 Jun 2023 22:55:41 +0800 (CST) X-QQ-SSF: 01200000000000D0W000000A0000000 X-QQ-FEAT: rZJGTgY0+YPl1Ti/yTwBd86Id6oVjQsowhpNx/GMYyB2MOxQs7beAu2rW5Arc JT9wcxUF4ckea9ztg2+aZJPJ6y5rv6GwKodyUfioNl992oUArIBDJNNuweEKqFBH+4juqYh 2AC+Q4u+WZhtkhOM0Dt+Cutc4yyw/Am1mSnvMDzkB3yL/KXghV0cbsCEdBKwIMFkGJwvPWG OvyYy5ijguBkR4KFGGS1ZSC6HIGZ2H1NusquSuusiDgpo04NMZuMav+kVwWWq61j0bsGrqw O1KyYLxp5ixnzgj88Se3TTQVDmwHtRfylIRHqSxeE9KQ5HaBtoWM9N4xulNDtfTIJ5rcuNJ 5OZOLEN+QZBkyR7bYuX8dGkljemL698iLRCRU67JRXwizBLOKMCPvfR7amZoFMnFbWytcs4 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 15980847344132787065 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: arnd@arndb.de, falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Subject: [PATCH v3 10/14] selftests/nolibc: add a new rmdir() test case Date: Fri, 30 Jun 2023 22:55:36 +0800 Message-Id: <1b65441f8f6f115788922459e453e5bf35a4fdf6.1688134400.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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770141350211877578?= X-GMAIL-MSGID: =?utf-8?q?1770141350211877578?= A new rmdir_blah test case is added to remove a non-existing /blah, which expects failure with ENOENT errno. Reviewed-by: Thomas Weißschuh Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/nolibc-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 8269f900db76..34a47c512b97 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -737,6 +737,7 @@ int run_syscall(int min, int max) CASE_TEST(poll_fault); EXPECT_SYSER(1, poll((void *)1, 1, 0), -1, EFAULT); break; CASE_TEST(prctl); EXPECT_SYSER(1, prctl(PR_SET_NAME, (unsigned long)NULL, 0, 0, 0), -1, EFAULT); break; CASE_TEST(read_badf); EXPECT_SYSER(1, read(-1, &tmp, 1), -1, EBADF); break; + CASE_TEST(rmdir_blah); EXPECT_SYSER(1, rmdir("/blah"), -1, ENOENT); break; CASE_TEST(sched_yield); EXPECT_SYSZR(1, sched_yield()); break; CASE_TEST(select_null); EXPECT_SYSZR(1, ({ struct timeval tv = { 0 }; select(0, NULL, NULL, NULL, &tv); })); break; CASE_TEST(select_stdout); EXPECT_SYSNE(1, ({ fd_set fds; FD_ZERO(&fds); FD_SET(1, &fds); select(2, NULL, &fds, NULL, NULL); }), -1); break;