Message ID | 20230314123414.26907-1-tklauser@distanz.ch |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1733282wrd; Tue, 14 Mar 2023 05:43:12 -0700 (PDT) X-Google-Smtp-Source: AK7set/Ld7fUNZXIQVNA6gg0rLwTyw7fOQBEdNm1ChAggeamW2NTkZOVUgNiWphE8J1vYfY7fB9P X-Received: by 2002:a17:90b:4d12:b0:233:d657:2c7e with SMTP id mw18-20020a17090b4d1200b00233d6572c7emr39544051pjb.8.1678797792003; Tue, 14 Mar 2023 05:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678797791; cv=none; d=google.com; s=arc-20160816; b=L+BnVfTxuCjXPBJaxD4ZXLfIub7AEsm8gjnJ2GmA2SUkbSRSfp2+SkK3V1/8HXrBey 0EamgDLzwnhcVkLNGlj0EoyClXUc2CpTJ1UWt0hMejJm0Q95xh1BLdNPZIU0zWbYb4nP imYZF8fnBn+GRGc3AnWw77aJS38s4NB8ycLRBqJSHENDPha3XlpECkXqLAa97YN+5RYL gnP/ofkD3iTa64b5BmfgP7gqUUPyNzK7IP/SK+h53XwqzfN+vDaVWlOB+F1B0G+Kxbmh xcDWIavPXVANtXw+Apy10XDPJx0ANvRdq69vL1OzdWScR4M4G19yFe2kpNYDEsE6jlEi xi9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=D83u3jito7UXOAKHOKxc0VTKBXXTIxMxfihPP1fjqyY=; b=dXPZug1Y+5qG4UHRKAXs/LDW9Gi78PTNlZaTvr0M3n3/OvaM5WxAKdtM2tPYmkgfT8 DgMuBF/ufecRVNeIM6U1+25+pIfjlF3ZnrJvUg2uwIJr0MCDDwF+cg+Dx0zuKxpBio+2 np8UkawybcBnl3ta1W6xYHmGf188x46velp18wU36Tc5bilLP87A75bIDsKprVfzCbwo dXI3JD6004u7Pj4XUnHbob5z4aWY0gXGAm+0vYYrxchBR3Mc0KkPbm+tJIUyf/X0EFrH 0NCyvOo+FV7QwpjOPo1zt6V24byV8XU1jMNLi2HINb5Gqw4Zh4TmxzdJWfh5jzVZzMfm FVJQ== 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 w12-20020a17090aea0c00b00225c981fee5si2297739pjy.112.2023.03.14.05.42.59; Tue, 14 Mar 2023 05:43:11 -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 S231263AbjCNMfr (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 08:35:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230111AbjCNMfq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 08:35:46 -0400 Received: from sym2.noone.org (sym.noone.org [IPv6:2a01:4f8:120:4161::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47D5B9545C; Tue, 14 Mar 2023 05:35:10 -0700 (PDT) Received: by sym2.noone.org (Postfix, from userid 1002) id 4PbXyZ4t8yzvjfn; Tue, 14 Mar 2023 13:34:14 +0100 (CET) From: Tobias Klauser <tklauser@distanz.ch> To: Christian Brauner <brauner@kernel.org>, Shuah Khan <shuah@kernel.org> Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] selftests/clone3: fix number of tests in ksft_set_plan Date: Tue, 14 Mar 2023 13:34:14 +0100 Message-Id: <20230314123414.26907-1-tklauser@distanz.ch> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20230314115352.20623-1-tklauser@distanz.ch> References: <20230314115352.20623-1-tklauser@distanz.ch> X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760344952114927330?= X-GMAIL-MSGID: =?utf-8?q?1760347073655358019?= |
Series |
[v2] selftests/clone3: fix number of tests in ksft_set_plan
|
|
Commit Message
Tobias Klauser
March 14, 2023, 12:34 p.m. UTC
Commit 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME")
added an additional test, so the number passed to ksft_set_plan needs to
be bumped accordingly.
Also use ksft_finished() to print results and exit. This will catch future
mismatches between ksft_set_plan() and the number of tests being run.
Fixes: 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME")
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
v2:
- actually added ksft_finished call as mentioned in the commit message
tools/testing/selftests/clone3/clone3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Tue, Mar 14, 2023 at 01:34:14PM +0100, Tobias Klauser wrote: > Commit 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") > added an additional test, so the number passed to ksft_set_plan needs to > be bumped accordingly. > > Also use ksft_finished() to print results and exit. This will catch future > mismatches between ksft_set_plan() and the number of tests being run. > > Fixes: 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") > Cc: Christian Brauner <brauner@kernel.org> > Signed-off-by: Tobias Klauser <tklauser@distanz.ch> > --- Looks good. Thanks for fixing this, Reviewed-by: Christian Brauner <brauner@kernel.org> Feel free to take this through the selftests tree, Shuah.
On 2023-03-14 at 14:09:59 +0100, Christian Brauner <brauner@kernel.org> wrote: > On Tue, Mar 14, 2023 at 01:34:14PM +0100, Tobias Klauser wrote: > > Commit 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") > > added an additional test, so the number passed to ksft_set_plan needs to > > be bumped accordingly. > > > > Also use ksft_finished() to print results and exit. This will catch future > > mismatches between ksft_set_plan() and the number of tests being run. > > > > Fixes: 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") > > Cc: Christian Brauner <brauner@kernel.org> > > Signed-off-by: Tobias Klauser <tklauser@distanz.ch> > > --- > > Looks good. Thanks for fixing this, > Reviewed-by: Christian Brauner <brauner@kernel.org> > > Feel free to take this through the selftests tree, Shuah. It looks like this hasn't made it into Linus' tree yet and I also don't see it in Shuah's tree. Would it be possible to still submit this for 6.3-rc6 given the commit it fixes has made it to Linus' tree already? Thanks
On Mon, Apr 03, 2023 at 10:57:37PM +0200, Tobias Klauser wrote: > On 2023-03-14 at 14:09:59 +0100, Christian Brauner <brauner@kernel.org> wrote: > > On Tue, Mar 14, 2023 at 01:34:14PM +0100, Tobias Klauser wrote: > > > Commit 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") > > > added an additional test, so the number passed to ksft_set_plan needs to > > > be bumped accordingly. > > > > > > Also use ksft_finished() to print results and exit. This will catch future > > > mismatches between ksft_set_plan() and the number of tests being run. > > > > > > Fixes: 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") > > > Cc: Christian Brauner <brauner@kernel.org> > > > Signed-off-by: Tobias Klauser <tklauser@distanz.ch> > > > --- > > > > Looks good. Thanks for fixing this, > > Reviewed-by: Christian Brauner <brauner@kernel.org> > > > > Feel free to take this through the selftests tree, Shuah. > > It looks like this hasn't made it into Linus' tree yet and I also don't > see it in Shuah's tree. Would it be possible to still submit this for > 6.3-rc6 given the commit it fixes has made it to Linus' tree already? Is it in linux-next?
On 2023-04-05 at 09:46:11 +0200, Christian Brauner <brauner@kernel.org> wrote: > On Mon, Apr 03, 2023 at 10:57:37PM +0200, Tobias Klauser wrote: > > On 2023-03-14 at 14:09:59 +0100, Christian Brauner <brauner@kernel.org> wrote: > > > On Tue, Mar 14, 2023 at 01:34:14PM +0100, Tobias Klauser wrote: > > > > Commit 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") > > > > added an additional test, so the number passed to ksft_set_plan needs to > > > > be bumped accordingly. > > > > > > > > Also use ksft_finished() to print results and exit. This will catch future > > > > mismatches between ksft_set_plan() and the number of tests being run. > > > > > > > > Fixes: 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") > > > > Cc: Christian Brauner <brauner@kernel.org> > > > > Signed-off-by: Tobias Klauser <tklauser@distanz.ch> > > > > --- > > > > > > Looks good. Thanks for fixing this, > > > Reviewed-by: Christian Brauner <brauner@kernel.org> > > > > > > Feel free to take this through the selftests tree, Shuah. > > > > It looks like this hasn't made it into Linus' tree yet and I also don't > > see it in Shuah's tree. Would it be possible to still submit this for > > 6.3-rc6 given the commit it fixes has made it to Linus' tree already? > > Is it in linux-next? No, doesn't look like it (I checked on tags/next-20230405).
On Tue, 14 Mar 2023 13:34:14 +0100, Tobias Klauser wrote: > Commit 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") > added an additional test, so the number passed to ksft_set_plan needs to > be bumped accordingly. > > Also use ksft_finished() to print results and exit. This will catch future > mismatches between ksft_set_plan() and the number of tests being run. > > [...] Applied, thanks! tree: git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git branch: kernel.fork [1/1] selftests/clone3: fix number of tests in ksft_set_plan commit: d95debbdc528d50042807754d6085c15abc21768 I'm happy to drop it in case this is later picked up by the selftest tree.
diff --git a/tools/testing/selftests/clone3/clone3.c b/tools/testing/selftests/clone3/clone3.c index 4fce46afe6db..e495f895a2cd 100644 --- a/tools/testing/selftests/clone3/clone3.c +++ b/tools/testing/selftests/clone3/clone3.c @@ -129,7 +129,7 @@ int main(int argc, char *argv[]) uid_t uid = getuid(); ksft_print_header(); - ksft_set_plan(17); + ksft_set_plan(18); test_clone3_supported(); /* Just a simple clone3() should return 0.*/ @@ -198,5 +198,5 @@ int main(int argc, char *argv[]) /* Do a clone3() in a new time namespace */ test_clone3(CLONE_NEWTIME, 0, 0, CLONE3_ARGS_NO_TEST); - return !ksft_get_fail_cnt() ? ksft_exit_pass() : ksft_exit_fail(); + ksft_finished(); }