Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1470878ybj; Tue, 5 May 2020 22:10:13 -0700 (PDT) X-Google-Smtp-Source: APiQypLmXYOZhuyU4PU6jQDwze2B8APi+LQKKnXcsut9dElubDYuXluCnXSz0oykX+v7LIZQbBIN X-Received: by 2002:a50:eacb:: with SMTP id u11mr5376535edp.162.1588741813336; Tue, 05 May 2020 22:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588741813; cv=none; d=google.com; s=arc-20160816; b=vg1za4ELc7efhyhF8DCn5Ue41nXXJZGyL31XkfeLk/cuypAsnrX4QIKXGMr4Ei6L4m 9Z6sK2VaGsYiuaPOguWs0exErcTAtU8v2V5tEdrKPmjQLH9OtNvaYUjKNkU46XVFgxrc tPpUB0IbbRqgbaxv5l/bSN9nWeA62VWuH1suSJ4nfRIkOfUO2WNI4nEh0Dyp6Kqy472q 4Gm9WPGamuPUBSHmiD1cuiEcIyJdCPU6FI8dHUP9jbPOQ3uc0dRj0hggMIZKcdhcgW8k CIPco1KBKl007t87IpCvMZ7K+wILKn4f0k5rkXwIoqCj/gdp1hJHbhZi8IG4aRb+AT3C 8tyg== 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=SceWBPekDdFRfF48uePY+T85beg2UFKBaFBprKKK2Fs=; b=TUdoJ6lFKM/8JAPf5c0RXEdejb7FrUkJfBaA+j/lXeplTksRtj2wJ9u4WMNGThDoIq R9TbMCaeCeUdyHzaBeY+AIvZ/0np9ieaf9xX4+LbIwsxfyGOxtkTaSmAbwUuPcPUH04I QlNQ2G6oQrWEOOO1rHBD38/TM/7cjHlgDMBUakIACWYP0jZakowsDTe62fa/pqalK7k0 20+RV9/J+q8jGFRc8qJI36YXyxS1bKjdfJzsUjYZ7JSsT3edYjWrZ3vPgnQycRj8h3Wo wm14FZVf0UlI+YZ8bvMsf1rgaIkSTQdAWA0JPF5UVy3AGBebxRuG8dQoK+fRpnd/YLHv ueOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=wJPP8upA; 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 cw10si541682ejb.369.2020.05.05.22.09.38; Tue, 05 May 2020 22:10:13 -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=wJPP8upA; 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 S1726736AbgEFFIo (ORCPT + 99 others); Wed, 6 May 2020 01:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726495AbgEFFIo (ORCPT ); Wed, 6 May 2020 01:08:44 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDB2DC061A41 for ; Tue, 5 May 2020 22:08:43 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id x25so1000537wmc.0 for ; Tue, 05 May 2020 22:08:43 -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=SceWBPekDdFRfF48uePY+T85beg2UFKBaFBprKKK2Fs=; b=wJPP8upA208Ny+tQsnui6Sto754+QGj6pbO1HMOcOxY9IevB+Y2kWGwCmsphMLAwBQ JZYn79elyP3RMcZR5FJtGBFDeTd+33jhRiMJg68J5ODXT/KOt8dZ+3CJAZP9ruC0pZGc q+dArPJ1yQdOD1LeSmVKKXcOGGLlUyRkrHKxnOabhaqR+arMfWH60wttfWHMMevee4FX JFM+vzw+Vsxotnguy7oXnD56vKGxKLP3veW+dB/zcULcp6nRJUn8S3CUhVE9tTGKK/uW ZFM/NA0CswW9mz4xTIS1SHDSxz8KFTlajxCkx4yqkkK31rDm5asI7c13XBmZXOtqxJAJ QWlw== 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=SceWBPekDdFRfF48uePY+T85beg2UFKBaFBprKKK2Fs=; b=TnJD6bVe9koKXPxp+U5urgKDuledsbwoQA7JA565T/UgZNlJPqJriJVR32Ws1a0xDN IjmkzVWN92hHjCPdTmdkxjQoOufpdrWZtjgOcgfZUZoOQ8Pe8Bdwr+inIy1w+MKlOqqe 2xW4I2D4V3JhBOvb8btpFICOaJtWGN20esmFSG9L/112SYlvEGjjufX0CTJjuOJlE9jw Ym/8Ib0sOtzyBh0GO4fBPx+WtzDNMYJMOfzu4hyo/1sGy48rJuscLT1zcd9sZR4yY5t/ Rp9BdFWV8hMPSfOHhZ0tz7qBRw2TTMIGFH52KuJMvF+IVVNt7SFlDL/W7Ve0eftMhxcj 5Xrw== X-Gm-Message-State: AGi0PuZ0OL04kdX9haAzYrmzMMza3txXIQdKMRJYDbZCkrGMIgWwwdfu fbL2v4Aqi/WopB548WOfzNi2SO8+vcHy8kFQuXk/SA== X-Received: by 2002:a1c:a512:: with SMTP id o18mr2258788wme.138.1588741722115; Tue, 05 May 2020 22:08:42 -0700 (PDT) MIME-Version: 1.0 References: <20200505102700.7912-1-anders.roxell@linaro.org> In-Reply-To: <20200505102700.7912-1-anders.roxell@linaro.org> From: David Gow Date: Wed, 6 May 2020 13:08:30 +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 , jmorris@namei.org, serge@hallyn.com, "Theodore Ts'o" , adilger.kernel@dilger.ca, Greg Kroah-Hartman , Andrew Morton , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Kernel Mailing List , linux-ext4@vger.kernel.org, linux-security-module@vger.kernel.org, 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 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 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. > + 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. > 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), I'm all for including this in. Cheers, -- David