Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp437436ybj; Tue, 5 May 2020 01:13:55 -0700 (PDT) X-Google-Smtp-Source: APiQypJbb/at63miKG6uEyc7DOTDgAahFv+yyrDLE8sGx7RWNBwcjmdA3NwLti4pa1wUBp1UoBmY X-Received: by 2002:a17:906:390a:: with SMTP id f10mr1520755eje.74.1588666434884; Tue, 05 May 2020 01:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588666434; cv=none; d=google.com; s=arc-20160816; b=kJr/oTXsBzwjLRmP+QQJ0fw8WWB21OlFpF1yt+EL8Ap21JFyVyEvxN3CtVqn6QR4zJ benES8g3+yod5b6BlxY3rfqI4kX8s7oVR+4gdmqPEmu8XZ9SQ74xhXlqRDqklmIulmmR TMpIumoZTew3K5l8jeC/GVFvGzxPlIkdRojUrco+lwcD9aJSG/gqPCt+wlQ4I06GLB6V 8EuA5kMbg08rP2ee+yRA8A3VztD8vK4My9JPCKgFoNCZ/MTTFNWXYyXxHISbX8Jh1vrK E5btYoydaluEpipVkSQL8mVjU34grFZNX035u3/tcAPNgDkOC69IqWnbRw0h5xPypbap h1fA== 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=cCtbnn/mPSYMTovrACT2kKrxnwGdokswItkXqrNBN20=; b=CwLg8b82KILEjE9OK6TGBIOM28prDMdx7J+8E2xsF+YZo+HJip3UMjqeXm8KMUlKMX tn6WPzQNZuvfyzb6CUEQZggEK5thybZfG6j1cVGvBbeZKbWZa8SJXxgTZMnLkR1yOx19 UimANfd0WaAnUW6FWVPk0BKLNHcNgI9RHZFMaYGQi5TKF+joJVY7Mu4E4Vt8vpoW7FDb NszwtdOjfSiGGE/ehXjwEUVasK/0oP2AMwzeUfYuWHimnHEFTPlCcfQAa560c+cnhqiy mrEd6GAIXzAusLfxRX4nR3djXNSfKupbWZiECGViRY0jxfgKetI1yT4JWjkGSoDu5h7h 1i/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ds/TGo88"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si778445edx.450.2020.05.05.01.13.24; Tue, 05 May 2020 01:13:54 -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=@linaro.org header.s=google header.b="Ds/TGo88"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725320AbgEEINQ (ORCPT + 99 others); Tue, 5 May 2020 04:13:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725915AbgEEINP (ORCPT ); Tue, 5 May 2020 04:13:15 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67946C061A41 for ; Tue, 5 May 2020 01:13:15 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id a21so640864ljj.11 for ; Tue, 05 May 2020 01:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cCtbnn/mPSYMTovrACT2kKrxnwGdokswItkXqrNBN20=; b=Ds/TGo88InOgXEcC2Gt5/VgiFUU8yBoN4mf50voWf0ReQi8v5PKgYBXhp/82AjMhqB rTJsuC5+jFz4XMfzl/6020xwtmeCq6QkJs2++a/n+/kMYDSpiRAHYh1yF8UfJO5L7UwR 2DAf67oLsyBJ5mLJtL91w5TAlbn6wdGv9X5gfILWFZD9RbWmIJkxZ8WXX6BiBOpJ4ZZs H0UY8zhoYXsuMzNUNAukprACSGCpQMCw7tvWQYxBu6+4K9+5sgqLkPHgIEuklCZyYvqd iSoCM2UNPS79xcfwFMFQgG3A2znyPS1q8ogklxD926Qj892yKoqT7ioU+9X6DS6s78N4 KFkg== 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=cCtbnn/mPSYMTovrACT2kKrxnwGdokswItkXqrNBN20=; b=JicZEi6yTDDdO83fewzL9rvtuotzWU9sdt5zp+kHi37jdyDRXxSUpR6O3j9Qa2Zch6 67X1XsZhDR7PPDUmAoZGNI3Mzno2MLveLW0sFtTJkQx9DtidCuDipHVHZ8gwAsRw7+fw //7Qa1kTek/MknSzGg5XO6nk1ioBF0JVZ0n6AnrESOqMI9zqLGAR1WTwz5WxFFUoyka/ DCvnaOO0xSdQMPk8I+w8Rf6KLmIDQHfsdDsvOWJeS56++hokunzUOy1QY/3VSAiKCJGu 3JyOr/KbldJj7IqBUOCxmZOXKP2CkBH9qsaznkDM/zG/hyjuELBxNElfgkEhuxdqEpkc d/Zw== X-Gm-Message-State: AGi0PuahwpI6uSjM3G1GSSuPPyQINfqXje76x4froXIzDUAsG86p4ZLx 7Z//9GsDUePkyp24wNM3/hir8kSQE45e0eyr82Gh9g== X-Received: by 2002:a2e:6a08:: with SMTP id f8mr1135471ljc.8.1588666393650; Tue, 05 May 2020 01:13:13 -0700 (PDT) MIME-Version: 1.0 References: <20200501083510.1413-1-anders.roxell@linaro.org> In-Reply-To: From: Anders Roxell Date: Tue, 5 May 2020 10:13:02 +0200 Message-ID: Subject: Re: [PATCH] kunit: Kconfig: enable a KUNIT_RUN_ALL fragment To: David Gow Cc: Brendan Higgins , Greg KH , "Theodore Ts'o" , adilger.kernel@dilger.ca, Marco Elver , John Johansen , James Morris , "Serge E. Hallyn" , Linux Kernel Mailing List , linux-ext4@vger.kernel.org, kasan-dev , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , linux-security-module 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 Sat, 2 May 2020 at 04:11, David Gow wrote: > > On Sat, May 2, 2020 at 4:31 AM Brendan Higgins > wrote: > > > > On Fri, May 1, 2020 at 1:35 AM 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. > > > > > > Adding 'if !KUNIT_RUN_ALL' so individual test can be turned of if > > > someone wants that even though KUNIT_RUN_ALL is enabled. > > > > I would LOVE IT, if you could make this work! I have been trying to > > figure out the best way to run all KUnit tests for a long time now. > > > > That being said, I am a bit skeptical that this approach will be much > > more successful than just using allyesconfig. Either way, there are > > tests coming down the pipeline that are incompatible with each other > > (the KASAN test and the KCSAN test will be incompatible). Even so, > > tests like the apparmor test require a lot of non-default > > configuration to compile. In the end, I am not sure how many tests we > > will really be able to turn on this way. > > > > Thoughts? > > I think there's still some value in this which the allyesconfig option > doesn't provide. As you point out, it's not possible to have a generic > "run all tests" option due to potential conflicting dependencies, but > this does provide a way to run all tests for things enabled in the > current config. This could be really useful for downstream developers > who want a way of running all tests relevant to their config without > the overhead of running irrelevant tests (e.g., for drivers they don't > build). It will solve that as well as for a tester doesn't have to go through all KUnit tests fragments to turn them on. > Using allyesconfig doesn't make that distinction. We could also create a config fragment file in kernel/configs/kunit.config where we set ------start CONFIG_KUNIT=y CONFIG_KUNIT_RUN_ALL=y CONFIG_SECURITY_APPARMOR=y ------end So, these two can only be enabled if KUNIT=y CONFIG_KUNIT_DRIVER_PE_TEST=y CONFIG_PM_QOS_KUNIT_TEST=y and for this one we have a pre-request of SECURITY_APPARMOR=y CONFIG_SECURITY_APPARMOR_KUNIT_TEST=y Other tests solves the dependencies with 'select' like CONFIG_EXT4_KUNIT_TESTS, that adds this row in fs/ext4/Kconfig, 'select EXT4_FS' But I think we should try to minimize the number of 'select' statements, in order to avoid circular dependencies and unexpected behaviours. Maybe we should add the CONFIG_EXT4_FS=y into the kunit.config file instead ? > > Ultimately, we'll probably still want something which enables a > broader set of tests for upstream development: whether that's based on > this, allyesconfig, or something else entirely remains to be seen, I > think. I suspect we're going to end up with something > subsystem-specific (having a kunitconfig per subsystem, or a testing > line in MAINTAINERS or similar are ideas which have been brought up in > the past). > > This is a great looking tool to have in the toolbox, though. I agree! I'll prepare a patchset with individual patches as was suggested by Marco shortly. Cheers, Anders