From patchwork Wed Jun 21 13:01:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 111014 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4365091vqr; Wed, 21 Jun 2023 06:29:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ezgAU1cZcFnlvChgvBC+Aikua+xKU9/yfwDEPALajE6Tkr6UD+mLYgGbM374cwxrCg0nB X-Received: by 2002:a17:902:7c8d:b0:1b1:753a:49ce with SMTP id y13-20020a1709027c8d00b001b1753a49cemr9159333pll.53.1687354188393; Wed, 21 Jun 2023 06:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687354188; cv=none; d=google.com; s=arc-20160816; b=TrgPIEzYaghVy0mSQUqDOIvcRhEvfe2fQqGu9abwRBYTfhCvfalxPlMV17POCSWLHE A5QORMHPAN4PNZrj+zr0LN9l7zqkR+A6pKqk0n1j8iyiUeW2ijkvNqckpsutPI9Tz5l4 sabycsoETIWFE4svmR+mKsbte1kamRqPEQ/fonmS98wE1J5z+0s7zkPaF89YNzbJTMq9 eM96AgHS/yNJPqFovtI3DsOZv/KAMR3A+VTje8W75JOAra1ys0ql7S4bIidjRUCQlmS+ ZigsSNcv2Hfk94UaIvY2eItOopfmrCPlo4wEhCU0botBZVUQciCFEBxtg/meGVGqUnuO 83xg== 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=2jkSkycDBIR94jyuJ7AnhR9/fW9IO9zl98ldm7UMTk0=; b=JotfWFi4QaxTdvxHOyVAM7FFZlAO3couNDTpoycrB0o9/Q+khWNqFktpGRgRUIg7dQ ZADs7PDqCswbIYztlh4v5S5yy64agJCTJhqfgt1cf2v0G2k00NcuwRvhlmg1tidR10Go hPSgGpZ5+zEdifmxCvik3v7KF9p06MaHs1ywjpVyhVfDzFUY2zks73zSjnd5mqg11AVn wf0GaVeSOsc7PSDA5+5xWNnlP8zk2G2tDnK5jZ7iyCjBlGLWTfhXtMma1O8R2z0Y3q+w vWrKjqRBkBOfFOswoYZ+oyg9BMwG2w6v95oSevFafk0mU9jeiqqqW0Gjkig3cAjRXX31 EA/Q== 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 m18-20020a170902d19200b001a52db202c7si875872plb.382.2023.06.21.06.29.35; Wed, 21 Jun 2023 06:29:48 -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 S231659AbjFUNCQ (ORCPT + 99 others); Wed, 21 Jun 2023 09:02:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbjFUNCO (ORCPT ); Wed, 21 Jun 2023 09:02:14 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E1F2E57; Wed, 21 Jun 2023 06:02:12 -0700 (PDT) X-QQ-mid: bizesmtp73t1687352523t66c15a0 Received: from linux-lab-host.localdomain ( [116.30.126.60]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 21 Jun 2023 21:02:02 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: ILHsT53NKPibvyQvvp6lgPNrBJ9TrIOguRRJiNb+93n428pRzDPRiPmUoEoJO 7uoOFMcJa7vObbtOaqeAGyxKEVn82tPKKZ57jA/Pst6qecfTBHjqcB0JPpMMniwjOt3n3QS 6U6D1JpbsppF7CtxvnyBIflJDkvUmwhVYVdqGKW68VZgpqS/c34cHZDH7PIYvP8Mgz9U/Hp tvXxkP7BoJwW1HMiWZR83VblMBRfj9w/VPxPso5uaYlog4+EzMIcWk9hVYaLJIzmwkS3E28 t5EIJhPpKCcNP13QZYkYxgcbWLdavPdj93KRoXnUfKBxkVDeUoUDf3UwdG1x/bMjsGzUfYx dWZeNNORIEpl5ywH4on67PcH2u3kEDNQdflOz++xGrR7hzgzgjkW38vWIOE5A== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 14863239959184131679 From: Zhangjin Wu To: w@1wt.eu Cc: thomas@t-8ch.de, arnd@arndb.de, falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 07/17] selftests/nolibc: add a new rmdir() test case Date: Wed, 21 Jun 2023 21:01:45 +0800 Message-Id: <187bd4f7b4a611cedee3f2f8db04240a6aba3adb.1687344643.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:qybglogicsvrsz:qybglogicsvrsz3a-3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1769319105817712281?= X-GMAIL-MSGID: =?utf-8?q?1769319105817712281?= A new rmdir_blah test case is added to remove a non-existing /blah, which expects failure with ENOENT errno. 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 2ef44176f7a9..9673c338d42e 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -612,6 +612,7 @@ int run_syscall(int min, int max) 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; + CASE_TEST(rmdir_blah); EXPECT_SYSER(1, rmdir("/blah"), -1, ENOENT); break; CASE_TEST(open_tty); EXPECT_SYSNE(1, tmp = open("/dev/null", 0), -1); if (tmp != -1) close(tmp); break; CASE_TEST(open_blah); EXPECT_SYSER(1, tmp = open("/proc/self/blah", 0), -1, ENOENT); if (tmp != -1) close(tmp); break; CASE_TEST(poll_null); EXPECT_SYSZR(1, poll(NULL, 0, 0)); break;