Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp371237ybj; Wed, 6 May 2020 20:25:43 -0700 (PDT) X-Google-Smtp-Source: APiQypIi4JFADABoOBjZ8azZAy4rnpl8fzR3qiYSb+Pr+0FIVZHgXLVoCsU+TlLuRIqwQCBLlqyn X-Received: by 2002:a17:906:4dc8:: with SMTP id f8mr10447092ejw.23.1588821943471; Wed, 06 May 2020 20:25:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588821943; cv=none; d=google.com; s=arc-20160816; b=Z2mp9F78K8WcASQZT3xWemhOTx5fYRq6xqxM8WdR4heUiYCnsIjrXufOU0G1P9i6xl LomAHsx72hxCYoLawhcYuMEmPGS+gCkSgMX44Gtf/G3J7BQ/LlTfseFG/LHBzTZRKtu5 /5P6UdXXRhf5UX5PvBDBEuL1QLn31qHUAvZZ7MkKJI57KqYTkoXKWMGdX+j1qZTbieaJ 9p91dLRkHgWnxvEOWeavTVNv2eRdyO7v1WFi/agTaPclpvmdqk/CwiK/eHyY2z3Nyxnh uudtkGvCVpu3MnUzf982y5LnxJgtXQSzEqHb7TyhUF2VccZtnvmYUnDj5BmZ3FnDPrvs XJUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=gsgt81MlDlEnto/Qdmhwfg0yKkYAEa0cqpBxi8rVFIU=; b=MfdMBkdUdk0GLNc5Aqs4+tjaSRMIbDr/kWjKdIN38ECqAPh/z6P+8LyfUTrSFcQZW3 VuZlNQxJ2MktJKCEDPFjA78DprrTBnsQP4Y7FQUJBSS8WZ45EJG6c0oSnXM3iFTbo4de hyr3P+bF07EY7TwE18GJcL0A4jHzEIaPkipOYydnHTujm08JO2qRvvgzYm5medyiTlkr soIYR/UAb3E819HQganWZ+cYY2liGyE1R1zbR/zgCAHNmxiLMIgE6nri1WOMGyBMgKvb 6O37kcS++j7NJNDsl9e+leHG/yqPup7Nh37Asw3jHAMIV52e29pPOeDZNpSSrn7Q4JLo b5ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SbDfHNsV; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si2821966edf.478.2020.05.06.20.25.11; Wed, 06 May 2020 20:25:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SbDfHNsV; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728129AbgEGDIY (ORCPT + 99 others); Wed, 6 May 2020 23:08:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728000AbgEGDIY (ORCPT ); Wed, 6 May 2020 23:08:24 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2DDFC0610D5 for ; Wed, 6 May 2020 20:08:23 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id j5so4520455wrq.2 for ; Wed, 06 May 2020 20:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gsgt81MlDlEnto/Qdmhwfg0yKkYAEa0cqpBxi8rVFIU=; b=SbDfHNsVlfwga5HlZsXZUndrMHRULtSgVl0BqdUggNtB1qsob5uD0JyX829hO72zkR cm/8xweeLd9jJO9m8puEA2KdLib1VQ8BLx8ALUobrhsRbyeEeyjETYOtW5+bFoF5iASD ZE4hLHneOrzNo6QZ0kX0rw/CbBvg4b1fGD/G/3feDX49Cpyoi5nam9lIu9+edv+nA5DJ aVR9G0FQKBxNogFDiSnECeq6gY1+oJEO2TuLnmCjUul/GzJfl2sMBspUtT4Bq/q3n53X TKwTLnjHEybyfrEWSfTE+5M4PQMfS4uyumllO9W/XOePZvv7yo84bDog271sy0t6z9Im yJoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gsgt81MlDlEnto/Qdmhwfg0yKkYAEa0cqpBxi8rVFIU=; b=EB33BpvpR11FQQMNww9HCemhEKjocrda9OKjTJ2pJzUAtGmdff7duEg/AC2guJJfvs g1AyRVxjGEhUHj5kn/IZPb6BFz2twLEm77tE96g/lbsRN0Kp/f9zJAwF9ZVxXDeIkvmm gbeb8Y9X+piK6W1ypEpf/MK85J0qPHL2EEJJfKpDlzbkl6im4XVaVk2R7FYWFhGTUJPA vIUe8npI2eTvrGGFhuRKtuIgab7olbk4M14zaMv9IQSsQgLTLQKSKFPRAn6oRrfH3Bql TDjMO2zOq/KU3laYMZ7QVXSGtI9nC6egX/i6l/+GNe5XyQZqwAyUx17Y01Colw1hg683 Zcqg== X-Gm-Message-State: AGi0PuZiZvhrmJOEQxwvROuElbnHBqGXqJrPT2b8mOAO9HkgEtxXOg5p 81BqW+lgFPiEOiQWWFC3KkrUpM8dbIMIb2EJAtSaTA== X-Received: by 2002:adf:fe51:: with SMTP id m17mr12501816wrs.414.1588820901909; Wed, 06 May 2020 20:08:21 -0700 (PDT) MIME-Version: 1.0 References: <20200505102700.7912-1-anders.roxell@linaro.org> In-Reply-To: From: David Gow Date: Thu, 7 May 2020 11:08:10 +0800 Message-ID: Subject: Re: [PATCH v2 1/6] kunit: Kconfig: enable a KUNIT_RUN_ALL fragment To: Anders Roxell Cc: Brendan Higgins , John Johansen , James Morris , "Serge E. Hallyn" , "Theodore Ts'o" , Andreas Dilger , Greg Kroah-Hartman , Andrew Morton , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Kernel Mailing List , linux-ext4@vger.kernel.org, linux-security-module , Marco Elver Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, May 6, 2020 at 6:33 PM Anders Roxell wrote: > > Hi David, > > Thank you for the review. > > On Wed, 6 May 2020 at 07:08, David Gow wrote: > > > > On Tue, May 5, 2020 at 6:27 PM Anders Roxell wrote: > > > > > > Make it easier to enable all KUnit fragments. This is needed for kernel > > > test-systems, so its easy to get all KUnit tests enabled and if new gets > > > added they will be enabled as well. Fragments that has to be builtin > > > will be missed if CONFIG_KUNIT_RUN_ALL is set as a module. > > > > > > Signed-off-by: Anders Roxell > > > --- > > > lib/kunit/Kconfig | 6 ++++++ > > > 1 file changed, 6 insertions(+) > > > > > > diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig > > > index 95d12e3d6d95..537f37bc8400 100644 > > > --- a/lib/kunit/Kconfig > > > +++ b/lib/kunit/Kconfig > > > @@ -41,4 +41,10 @@ config KUNIT_EXAMPLE_TEST > > > is intended for curious hackers who would like to understand how to > > > use KUnit for kernel development. > > > > > > +config KUNIT_RUN_ALL > > > + tristate "KUnit run all test" > > > > I'm not 100% sure about this name and description. It only actually > > "runs" the tests if they're builtin (as modules, they'll only run when > > loaded). > > > > Would KUNIT_BUILD_ALL or KUNIT_ALL_TESTS > > I would like to go with KUNIT_ALL_TESTS if no one objects. > Personally, I'm fine with that. Brendan, thoughts? > > or similar be better? > > > > It also, as mentioned, only really runs all available (i.e., with > > dependencies met in the current .config) tests (as distinct from the > > --alltests flag to kunit.py, which builds UML with allyesconfig), it > > might be good to add this to the description or help. > > > > Something like "Enable all KUnit tests" or "Enable all available KUnit > > tests" (or even something about "all KUnit tests with satisfied > > dependencies") might be clearer. > > I like "All KUnit tests with satisfied dependencies". > > > > > > + help > > > + Enables all KUnit tests, if they can be enabled. > > > + That depends on if KUnit is enabled as a module or builtin. > > > + > > I like the first line here, but the second one could use a bit more > > explanation. Maybe copy some of the boilerplate text from other tests, > > e.g.: > > > > KUnit tests run during boot and output the results to the debug log > > in TAP format (http://testanything.org/). Only useful for kernel devs > > running the KUnit test harness, and not intended for inclusion into a > > production build. > > > > For more information on KUnit and unit tests in general please refer > > to the KUnit documentation in Documentation/dev-tools/kunit/. > > > > If unsure, say N. > > Makes much more sense, thanks. > > > > > > endif # KUNIT > > > -- > > > 2.20.1 > > > > > > > Otherwise, this is looking good. I've done some quick testing, and it > > all seems to work for me. As long as it's clear what the difference > > between this and other ways of running "all tests" (like the > > --alltests kunit.py option), > > Do you think it should be made clearer in some way? > I think the changes above should do it. -- David