From patchwork Mon May 11 13:14:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11540677 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F733913 for ; Mon, 11 May 2020 13:14:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5498220735 for ; Mon, 11 May 2020 13:14:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="S+IZahvZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729942AbgEKNO2 (ORCPT ); Mon, 11 May 2020 09:14:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730143AbgEKNO1 (ORCPT ); Mon, 11 May 2020 09:14:27 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFD0CC061A0E for ; Mon, 11 May 2020 06:14:26 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id g4so9435208ljl.2 for ; Mon, 11 May 2020 06:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=e+jFcqLuH7ub0fRzkztO3YdE2YZwIRumdprp3l4s3TA=; b=S+IZahvZJp4K0ZjCDFnUtbgri3iCzQ9xVa+NFBDWxFnhZcoipbUX1TBsfs9tQYB/A9 ROQFWMnaiF7sTgNUVZnttw9paL9nttAQFDBxZRszwoVUSTYZFn6AB5B09aq8XgDwv01A cCwAHc+nntQU1kxDqivnyvh5zuuDBPw13dfdDS2jNclJwx1C0wRVNqiOa0LsHSllOm7j HeUebaKfHvjPC3u2k8K6Ewe6Yok+sjFrbV+u3M+gPJGSnjYRBl1QNK3Bp23iRzn+B5x7 Ypj5/rVymNmIOwxkgCkQvknu10jj/QMORu01sPMsZ1AoLOhTBGTf8NBivwqo8JcyzcFE riFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=e+jFcqLuH7ub0fRzkztO3YdE2YZwIRumdprp3l4s3TA=; b=dQh5UZ87UuTs1meXDcvduQSFyvfNv+GvtxUUNlfqQ8erXSCbMGhjurHrBYNgfOF444 SBQsNumJO7var9oNEqkDk66X8tuSKwoQvMwQwRFo2Wk3dYavzyZEd12uXD8n3wPbMWJt amAkqWVt1kjaZG++AoSze98Fy/Ba7pICQO6l5h1jxGKrqjns9U1iJWXHdMWNFJbvaGXn SnZN7c8SZR6tJExGUUkRJhS/6x/7FgJj8iAjM2+7pyDUbF2fElvnVSFTWwZM3+fB1Lb7 a4Hv4acnhl50Q0F4dmPLoULAoLS0z3Hb1f270dJf1MoBFV6CTuVSLjQiB+oJld1X7Ake v8Fw== X-Gm-Message-State: AOAM530b7d75wxGALcZK8O+08cApB1zrQO9yXGj/PZvOHbszyI9R7aTB U0gEbVi6kp3FyV2QiJgo+hzykg== X-Google-Smtp-Source: ABdhPJxn7boJJ0vbZwT5jKpePnX26KnZkvCwlvbR3Tgj0jF/CyUo77s+zpDKAbUF/jYHQDVW9ICJ8A== X-Received: by 2002:a2e:a176:: with SMTP id u22mr10438276ljl.177.1589202864204; Mon, 11 May 2020 06:14:24 -0700 (PDT) Received: from localhost (c-8c28e555.07-21-73746f28.bbcust.telenor.se. [85.229.40.140]) by smtp.gmail.com with ESMTPSA id s8sm10952175lfd.61.2020.05.11.06.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 06:14:23 -0700 (PDT) From: Anders Roxell To: brendanhiggins@google.com Cc: john.johansen@canonical.com, jmorris@namei.org, serge@hallyn.com, tytso@mit.edu, adilger.kernel@dilger.ca, gregkh@linuxfoundation.org, akpm@linux-foundation.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-security-module@vger.kernel.org, elver@google.com, davidgow@google.com, Anders Roxell Subject: [PATCH v3 1/6] kunit: Kconfig: enable a KUNIT_ALL_TESTS fragment Date: Mon, 11 May 2020 15:14:20 +0200 Message-Id: <20200511131420.29758-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: Make it easier to enable all KUnit fragments. This is useful for kernel devs or testers, 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_ALL_TESTS is set as a module. Signed-off-by: Anders Roxell Reviewed-by: Brendan Higgins --- lib/kunit/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig index 95d12e3d6d95..bdeee7639005 100644 --- a/lib/kunit/Kconfig +++ b/lib/kunit/Kconfig @@ -41,4 +41,18 @@ config KUNIT_EXAMPLE_TEST is intended for curious hackers who would like to understand how to use KUnit for kernel development. +config KUNIT_ALL_TESTS + tristate "All KUnit tests with satisfied dependencies" + help + Enables all KUnit tests, if they can be enabled. + 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 From patchwork Mon May 11 13:14:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11540679 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DCFBB81 for ; Mon, 11 May 2020 13:14:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4575207FF for ; Mon, 11 May 2020 13:14:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ShZCN8aQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730160AbgEKNOc (ORCPT ); Mon, 11 May 2020 09:14:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730148AbgEKNOb (ORCPT ); Mon, 11 May 2020 09:14:31 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEE72C05BD0A for ; Mon, 11 May 2020 06:14:30 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id j3so9399896ljg.8 for ; Mon, 11 May 2020 06:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MSSALeybJON0vdo6J8wFop6P10hjXeJOgeHK6FMq2ec=; b=ShZCN8aQt2lDeT7IBRUe0XPp++Ppjd3Wf+JazE2uSWM+DGYMvzTnOuNYhfhjwYcrYo pNK5eF1MN/SeH6/xg1hI+0q9NIX9nRh3Yj+im62KmRrvalPpub1k3+w9IiaAgsufKNGC mht3gSfrZcbae2YVfcV3fLypaZ1V1mFYClMmTcH0v+uDo35eAbGgwPcJBmTybFehIroT b0LipaBWKRAB4gY3Mf1Pk9SWeGX/M6zgeExJp+E4EEKl3QP6vPFIq34n3/AngqsMJ+ZU unHO5L3MWOTw09NWFiVj0IjgyL5IquM8Jt817RP80kHYKi6ttzOr/5Pww6WzAvU5vv2a +wVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MSSALeybJON0vdo6J8wFop6P10hjXeJOgeHK6FMq2ec=; b=sDEQ2NXNCmjKXbssCNuyLgkfzt7oiosZHFG8KpwiZLFP6Ger/hK5LhqNmfK6YYgSpH NwD3XRXgDNnGhvCtH101u1hgwxvyjO2dO+csk5e5xwuUI4/7aatX9DZZcR2WmqbP8xvB jqSIM3mNTm8MEMam9SPdZC94WqyckS9ANIZNPvgHp/tUT7XbeRfCG0wz0TqB8ZhAQlLg NKIJsD0A+wuGaVBXnLi1zTCpF//A1Knasst4ONO3u/qpbS5pFRoZB22WTw/AB8/ffv85 VpDoN/2Gvgh+ZUA7HfYns0dxKTHDokYlGURCuRbWtvyLcvhEaJ2xdkyV7fvDxcwJ/xQi RN1g== X-Gm-Message-State: AOAM530zq8va7cwASrKj5mk7BDbDilRowhmgvfla3mGSWgeSZ43OvAQh DgdRr56biYvaORVL9fqpV4A6qA== X-Google-Smtp-Source: ABdhPJyhzpIMLamxyIU5PPcM4PrHEKVYAkzZntlZA60vssYAUXAMW4ONcVmO796LO9RIZw+wNK47qQ== X-Received: by 2002:a2e:8108:: with SMTP id d8mr9840244ljg.184.1589202869384; Mon, 11 May 2020 06:14:29 -0700 (PDT) Received: from localhost (c-8c28e555.07-21-73746f28.bbcust.telenor.se. [85.229.40.140]) by smtp.gmail.com with ESMTPSA id a11sm10031361lji.62.2020.05.11.06.14.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 06:14:28 -0700 (PDT) From: Anders Roxell To: brendanhiggins@google.com Cc: john.johansen@canonical.com, jmorris@namei.org, serge@hallyn.com, tytso@mit.edu, adilger.kernel@dilger.ca, gregkh@linuxfoundation.org, akpm@linux-foundation.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-security-module@vger.kernel.org, elver@google.com, davidgow@google.com, Anders Roxell Subject: [PATCH v3 2/6] kunit: default KUNIT_* fragments to KUNIT_ALL_TESTS Date: Mon, 11 May 2020 15:14:25 +0200 Message-Id: <20200511131425.29808-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: This makes it easier to enable all KUnit fragments. Adding 'if !KUNIT_ALL_TESTS' so individual tests can not be turned off. Therefore if KUNIT_ALL_TESTS is enabled that will hide the prompt in menuconfig. Reviewed-by: David Gow Signed-off-by: Anders Roxell --- lib/kunit/Kconfig | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig index bdeee7639005..00909e6a2443 100644 --- a/lib/kunit/Kconfig +++ b/lib/kunit/Kconfig @@ -15,7 +15,8 @@ menuconfig KUNIT if KUNIT config KUNIT_DEBUGFS - bool "KUnit - Enable /sys/kernel/debug/kunit debugfs representation" + bool "KUnit - Enable /sys/kernel/debug/kunit debugfs representation" if !KUNIT_ALL_TESTS + default KUNIT_ALL_TESTS help Enable debugfs representation for kunit. Currently this consists of /sys/kernel/debug/kunit//results files for each @@ -23,7 +24,8 @@ config KUNIT_DEBUGFS run that occurred. config KUNIT_TEST - tristate "KUnit test for KUnit" + tristate "KUnit test for KUnit" if !KUNIT_ALL_TESTS + default KUNIT_ALL_TESTS help Enables the unit tests for the KUnit test framework. These tests test the KUnit test framework itself; the tests are both written using @@ -32,7 +34,8 @@ config KUNIT_TEST expected. config KUNIT_EXAMPLE_TEST - tristate "Example test for KUnit" + tristate "Example test for KUnit" if !KUNIT_ALL_TESTS + default KUNIT_ALL_TESTS help Enables an example unit test that illustrates some of the basic features of KUnit. This test only exists to help new users understand From patchwork Mon May 11 13:14:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11540683 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD38181 for ; Mon, 11 May 2020 13:14:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C2C4C207FF for ; Mon, 11 May 2020 13:14:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tyeSTc03" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729641AbgEKNOg (ORCPT ); Mon, 11 May 2020 09:14:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729743AbgEKNOf (ORCPT ); Mon, 11 May 2020 09:14:35 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58ED5C05BD0A for ; Mon, 11 May 2020 06:14:35 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id z22so7485783lfd.0 for ; Mon, 11 May 2020 06:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=b7bMy350M8ax4YqO1k0ragPxZVB4Sq8gKTVAQseth78=; b=tyeSTc03oTY6K3LroNm5HKqoawup1Mj0X6sMI2LGMzkNnWIn2McTNMZ0+NG4IDrCTF mYmq171N/IAt1AL4hcG2usJLLR+FKwBKAdDk+D2CGXghJG5li2ANUCY+waO44fWVsuhu GAGLLMK0E8G1g8jd42IDjIQanmldx0bv5iU9sCfC8p4701nKozgpMyCEHS9Yg0H7sADO lTXVv2UrUhGLg/O3+/eInaBkR73wfVPL7uDqSrRJdA3p7So65TgSSNC8zzLhfv/gNvuA UfYYrl5w8+EtkrBDJVKle8IvHG5dYC3DnFqsyti3J8mLK33RY56Eg8+XDiQmW58DkjUI LCNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=b7bMy350M8ax4YqO1k0ragPxZVB4Sq8gKTVAQseth78=; b=aYrNaHMrerZSotUxhRoOUySt1XV5hRVrk22Gg6pu9T2REh2//uQH1LFOh1I9ArOsOJ Ew6Eis6ieYaA5gUVgRy7lBZxDffK7qTISbxupPXL9AE9n0Vx461Usu1yDzi0ig77m+tY IQxwJQifHyjC3q94S/YSKKQR71XM5QKB0rhB2TQ7+TkRbxmkslAZPBTXFPXEyWlTVs0k ELgXZIKkdQjlXs9Ti0XcBD0gFpW02oK7x2YXFM0v5El0XxY0a13GJoPdpFZKJGInUGpU 5xkRA9R8nmk85eMlWuiq64EEkQ2cNownQbbi13+xvGBCTlnbeSQw1K9I5D+lZ0H8X5vk h7sw== X-Gm-Message-State: AOAM532yV1VilQsonY0L2ag/KkRXjZSavkpjPnU+P8c51hs7vUG66klW DIJXwyzu/RneSuwB6BTZTn7OYg== X-Google-Smtp-Source: ABdhPJyYMsO9TgP6DGnwyc67H9w/1hGv3XoXQ3P1ggxxHr47+Uuk3J2Lv1s11k+ixLL2310k5dEpCQ== X-Received: by 2002:a19:4816:: with SMTP id v22mr910163lfa.30.1589202873699; Mon, 11 May 2020 06:14:33 -0700 (PDT) Received: from localhost (c-8c28e555.07-21-73746f28.bbcust.telenor.se. [85.229.40.140]) by smtp.gmail.com with ESMTPSA id o22sm9844221ljj.100.2020.05.11.06.14.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 06:14:33 -0700 (PDT) From: Anders Roxell To: akpm@linux-foundation.org Cc: john.johansen@canonical.com, jmorris@namei.org, serge@hallyn.com, tytso@mit.edu, adilger.kernel@dilger.ca, gregkh@linuxfoundation.org, brendanhiggins@google.com, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-security-module@vger.kernel.org, elver@google.com, davidgow@google.com, Anders Roxell Subject: [PATCH v3 3/6] lib: Kconfig.debug: default KUNIT_* fragments to KUNIT_ALL_TESTS Date: Mon, 11 May 2020 15:14:29 +0200 Message-Id: <20200511131429.29856-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: This makes it easier to enable all KUnit fragments. Adding 'if !KUNIT_ALL_TESTS' so individual tests can not be turned off. Therefore if KUNIT_ALL_TESTS is enabled that will hide the prompt in menuconfig. Reviewed-by: David Gow Signed-off-by: Anders Roxell --- lib/Kconfig.debug | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 21d9c5f6e7ec..1f4ab7a2bdee 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2064,8 +2064,9 @@ config TEST_SYSCTL If unsure, say N. config SYSCTL_KUNIT_TEST - tristate "KUnit test for sysctl" + tristate "KUnit test for sysctl" if !KUNIT_ALL_TESTS depends on KUNIT + default KUNIT_ALL_TESTS help This builds the proc sysctl unit test, which runs on boot. Tests the API contract and implementation correctness of sysctl. @@ -2075,8 +2076,9 @@ config SYSCTL_KUNIT_TEST If unsure, say N. config LIST_KUNIT_TEST - tristate "KUnit Test for Kernel Linked-list structures" + tristate "KUnit Test for Kernel Linked-list structures" if !KUNIT_ALL_TESTS depends on KUNIT + default KUNIT_ALL_TESTS help This builds the linked list KUnit test suite. It tests that the API and basic functionality of the list_head type From patchwork Mon May 11 13:14:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11540689 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F743912 for ; Mon, 11 May 2020 13:14:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 780D620801 for ; Mon, 11 May 2020 13:14:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="O7IbKpf3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729163AbgEKNOl (ORCPT ); Mon, 11 May 2020 09:14:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728776AbgEKNOk (ORCPT ); Mon, 11 May 2020 09:14:40 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A7A4C05BD0A for ; Mon, 11 May 2020 06:14:39 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id f18so9405146lja.13 for ; Mon, 11 May 2020 06:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uOQlRoobz/JSTnw7jwwegH0gSDxJKtqarUsKs1ALhNM=; b=O7IbKpf3NxRDO3Qz4E22XOJiODI89ShsyRIBjfFqiBxYbmyzjqlqyDUUuluKWLondb zvLmdYtEfINYouhmprMb9bnYeW2ULG+ffMYDS3Hyz1jLdR29D6t24/4zBAL1Xh3W4jti 57sw25xbYMqSo0NWD6CftkCY5w24yKxWy6bIE4qRU3l4Y9UiMKz1Oz0GVyviY4znjJzR dvF1SHdR6PDuhh59w/+680xYeLXE4uIspt4BilLfsI9Hg3T886eg9gExkPngkIkQNVzP WOROjQRPgANTvGvNhKsku53v7mZiLgZ2QOJ0u2I+DZa+VkNc5AwzgG0w1M6UW63HzuDm E85A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uOQlRoobz/JSTnw7jwwegH0gSDxJKtqarUsKs1ALhNM=; b=G3G0fEKeHsx6TRwwCFNc1yNKSV098YG+zUuYJARHrOxdMmbJqYPgUJTXMzrWz523T7 tqkbClyhW8WoFssKmfiZy3OBgBVOKGyJ0t7lwQ7H0fHfAbikUn0FkxATae4TccQgly8R KWPhP6UHlAgCzavdVmkdqtZ0nTAUYRQR+11whar+WO8+nE+FNCDKfENg0FWwKjsRDiXp yupKgue1TPXMlkFWmIndTE0ENP/M6/iI3zHUbYB6WSGH9r5VICfCSEfUhFKEaJwYxILT 9tA5QBH9G3VdNozRej3J18P32kscGvamKxaEPb0bPV3yuxSSKk7xTGsyYRRLvWWdC+XG hufg== X-Gm-Message-State: AOAM532ksGhWdP9tbW2PbTy7DqzLJORn1yURexgZlJs5sForSz8b35bl 2J9VfJ834x7tuZRlEJQAC4G7CA== X-Google-Smtp-Source: ABdhPJzPQ63qDskczu5x6qrSWwXrg8R2UiUYIP4y4l+9X8DXtfBS8B2MRyrIgyTM1DH5gchXnwWtIw== X-Received: by 2002:a2e:9942:: with SMTP id r2mr466938ljj.283.1589202877635; Mon, 11 May 2020 06:14:37 -0700 (PDT) Received: from localhost (c-8c28e555.07-21-73746f28.bbcust.telenor.se. [85.229.40.140]) by smtp.gmail.com with ESMTPSA id i1sm36800lja.3.2020.05.11.06.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 06:14:37 -0700 (PDT) From: Anders Roxell To: gregkh@linuxfoundation.org Cc: john.johansen@canonical.com, jmorris@namei.org, serge@hallyn.com, tytso@mit.edu, adilger.kernel@dilger.ca, akpm@linux-foundation.org, brendanhiggins@google.com, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-security-module@vger.kernel.org, elver@google.com, davidgow@google.com, Anders Roxell Subject: [PATCH v3 4/6] drivers: base: default KUNIT_* fragments to KUNIT_ALL_TESTS Date: Mon, 11 May 2020 15:14:33 +0200 Message-Id: <20200511131433.29905-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: This makes it easier to enable all KUnit fragments. Adding 'if !KUNIT_ALL_TESTS' so individual tests can not be turned off. Therefore if KUNIT_ALL_TESTS is enabled that will hide the prompt in menuconfig. Reviewed-by: David Gow Signed-off-by: Anders Roxell --- drivers/base/Kconfig | 3 ++- drivers/base/test/Kconfig | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 5f0bc74d2409..8d7001712062 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -149,8 +149,9 @@ config DEBUG_TEST_DRIVER_REMOVE test this functionality. config PM_QOS_KUNIT_TEST - bool "KUnit Test for PM QoS features" + bool "KUnit Test for PM QoS features" if !KUNIT_ALL_TESTS depends on KUNIT=y + default KUNIT_ALL_TESTS config HMEM_REPORTING bool diff --git a/drivers/base/test/Kconfig b/drivers/base/test/Kconfig index 305c7751184a..ba225eb1b761 100644 --- a/drivers/base/test/Kconfig +++ b/drivers/base/test/Kconfig @@ -9,5 +9,6 @@ config TEST_ASYNC_DRIVER_PROBE If unsure say N. config KUNIT_DRIVER_PE_TEST - bool "KUnit Tests for property entry API" + bool "KUnit Tests for property entry API" if !KUNIT_ALL_TESTS depends on KUNIT=y + default KUNIT_ALL_TESTS From patchwork Mon May 11 13:14:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11540693 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 39F37912 for ; Mon, 11 May 2020 13:14:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 204BE20801 for ; Mon, 11 May 2020 13:14:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Mf4oTEHJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730188AbgEKNOp (ORCPT ); Mon, 11 May 2020 09:14:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730181AbgEKNOo (ORCPT ); Mon, 11 May 2020 09:14:44 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA467C05BD0A for ; Mon, 11 May 2020 06:14:43 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id e25so9428278ljg.5 for ; Mon, 11 May 2020 06:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NUI8ReX5/Xpd2JtmMzMM9tmFtAIP0fE4oQnYr/awLr4=; b=Mf4oTEHJWwSVTn10OhDNWzpklozAK40LfcyfvQ9AbRpvTcuDFjkPFSTgO5oWQGfh5G +OoMFOjdEjCxi0z+ObuIxNswHw0bhXDyGkWNUTl69wkl7eYP5ORiOyP2SOSw9ZJh07J5 t+Oeb77OKHbJQUcoGRbrxOJ0aX4BaIrOSX6Gmx2mOf6ABEKoPNrx83Mhn4TJmXvDdFNS sIhm5SpMofg5+pMCXVr1TB1bXdsDsd3Ayye8nOQNw3FhfcwSdzS7y7eDiy2IO/Q1qiJJ vjVa4x33tXG/P4XoV1zIpzeIOqROR8PMYTxcAcMVSQZMne9Bl7un44l5nMcX9BxiLTyq StWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NUI8ReX5/Xpd2JtmMzMM9tmFtAIP0fE4oQnYr/awLr4=; b=FPi1fBPkCz+ZTY5uIB2k0dXREEZJzSJl5mBqCbERnNrb8PKmEAwOxjTe/kUdcLEtac UWju9xoQiShCfUPhYvLZ4H9eoJPEZtyoFIyAK8EN6TfUi/fcSMRZXJ60rPq+b/jk+Mmh XJJ45ccrvmq5rJ0aXvw5nZcCxSpjFrjWQ1s3YxZvrHI7IpF2hTk7do+LrvHKbMQNaCeq GX+XF7OewrS49qlVf/3eDlj24NTnWa1avJDbhdOY/nJkQqAxMlcu8HcOqe+cnVpORruW McgYwX0oJXlWC9zZd6t2IQF1ZDUPydVZWs4fvvP3eZWIR6r/lEZxTkbBbU8yo7Wo24K+ HgPg== X-Gm-Message-State: AOAM5315t3zB9n80+bzNaxvymUNRL5JrGcEgzCn/kLdOutmgMxOGX5Au CI0IcuwykUDM3Nul9xzXaNEEQQ== X-Google-Smtp-Source: ABdhPJy2dZ6Y0VUcG0irmoqyiuwPNOkxYOUJZjg40KYU72VLIUApg9pgi+sw8OwzBxDCJ0ulK7v34g== X-Received: by 2002:a2e:7412:: with SMTP id p18mr9935005ljc.256.1589202882058; Mon, 11 May 2020 06:14:42 -0700 (PDT) Received: from localhost (c-8c28e555.07-21-73746f28.bbcust.telenor.se. [85.229.40.140]) by smtp.gmail.com with ESMTPSA id r2sm9984936ljm.8.2020.05.11.06.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 06:14:41 -0700 (PDT) From: Anders Roxell To: tytso@mit.edu, adilger.kernel@dilger.ca Cc: john.johansen@canonical.com, jmorris@namei.org, serge@hallyn.com, gregkh@linuxfoundation.org, akpm@linux-foundation.org, brendanhiggins@google.com, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-security-module@vger.kernel.org, elver@google.com, davidgow@google.com, Anders Roxell Subject: [PATCH v3 5/6] fs: ext4: default KUNIT_* fragments to KUNIT_ALL_TESTS Date: Mon, 11 May 2020 15:14:38 +0200 Message-Id: <20200511131438.29953-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: This makes it easier to enable all KUnit fragments. Adding 'if !KUNIT_ALL_TESTS' so individual tests can not be turned off. Therefore if KUNIT_ALL_TESTS is enabled that will hide the prompt in menuconfig. Reviewed-by: David Gow Signed-off-by: Anders Roxell --- fs/ext4/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig index 2a592e38cdfe..bc7815158503 100644 --- a/fs/ext4/Kconfig +++ b/fs/ext4/Kconfig @@ -103,9 +103,10 @@ config EXT4_DEBUG echo 1 > /sys/module/ext4/parameters/mballoc_debug config EXT4_KUNIT_TESTS - tristate "KUnit tests for ext4" + tristate "KUnit tests for ext4" if !KUNIT_ALL_TESTS select EXT4_FS depends on KUNIT + default KUNIT_ALL_TESTS help This builds the ext4 KUnit tests. From patchwork Mon May 11 13:14:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11540695 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CFEF912 for ; Mon, 11 May 2020 13:14:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8191520801 for ; Mon, 11 May 2020 13:14:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="t/q/Xu2W" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730177AbgEKNOt (ORCPT ); Mon, 11 May 2020 09:14:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730194AbgEKNOs (ORCPT ); Mon, 11 May 2020 09:14:48 -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 9596EC05BD0A for ; Mon, 11 May 2020 06:14:47 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id u15so9432192ljd.3 for ; Mon, 11 May 2020 06:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hd5CEiw3xAmj+Qu84GZ/dMO9hkSOA6ixaeeAM/KiNHU=; b=t/q/Xu2Wsk1cQP379bqb7AKPnMVYlzvnTZ2iToF9D09oipRJWynKJ+gRR+xoVRGhom 6pD/9G8cClGfg/m8k9yWgDTlOIQbm9Ixb6cWlOWc6rC7qy407QUS0Rka78Hf+0F+RzNM Ujd1KPanQ5orj9cBzjrZfDRy5lLAxw1jJCOqjN4grijylK/LSWTGqs2BjeJWF8qPKUAy SqwMRZfnwvux94TcbbUvcFI2qJKwwB2+W0O7QQA+5+IjPMogtRBJae4RHVct7pW7Obgz z3gIn0kYZs/dFBbBaETQJRSXt/eQ7otP//1WDRZgjNOexrXZffr+COFscNImDd2SZgMA uJ3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hd5CEiw3xAmj+Qu84GZ/dMO9hkSOA6ixaeeAM/KiNHU=; b=NvhtMllVvjJNsXJ//0/RUBS5sysbOl7hw2ZqO2dYplpJ/j6e97TadeMpzyNk2Hibvv BEA5ZM4aJK/snFIzZH2H0KEVaPNW9m+5BRr+jqPZio6NbP1QgTFIA+efcGBsVvDuMb+k p3OyNxc0zOuwP9u4euL1whchFwd+umj/NTmpjhDFnd78fDZLNmfI0yMQh31T3B6PueoW rJHCOVX5MxIiw25Lg9OG3Kowqv5mKc0Fb9f79BloNAQrp530omJGwg3gIM5/J9gk77tN RIcbkvNGSHL7XYVQzfWbWQpnqSwxSiOyQJWp2XOvcrcoR2+MQ3H8pKF4oanA1ZngXWMK y9dQ== X-Gm-Message-State: AOAM532PZ+P3ztiw0hhdDbv4sk0wqCNWUZ0eL6MYUPngBoVkDlxHEhoT ewxR0KBOVSuzreL5Skz/tIZrkA== X-Google-Smtp-Source: ABdhPJyoLfetCr2ckH+XHqfj73a09MRKqeRqRgsIHcO5n6iFQ2egpeSzjj4Oiamdu1pt1MeA5mVJZg== X-Received: by 2002:a2e:920e:: with SMTP id k14mr10674436ljg.288.1589202886078; Mon, 11 May 2020 06:14:46 -0700 (PDT) Received: from localhost (c-8c28e555.07-21-73746f28.bbcust.telenor.se. [85.229.40.140]) by smtp.gmail.com with ESMTPSA id h11sm10223074lfp.22.2020.05.11.06.14.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 06:14:45 -0700 (PDT) From: Anders Roxell To: john.johansen@canonical.com, jmorris@namei.org, serge@hallyn.com Cc: gregkh@linuxfoundation.org, tytso@mit.edu, adilger.kernel@dilger.ca, akpm@linux-foundation.org, brendanhiggins@google.com, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-security-module@vger.kernel.org, elver@google.com, davidgow@google.com, Anders Roxell Subject: [PATCH v3 6/6] security: apparmor: default KUNIT_* fragments to KUNIT_ALL_TESTS Date: Mon, 11 May 2020 15:14:42 +0200 Message-Id: <20200511131442.30002-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: This makes it easier to enable all KUnit fragments. Adding 'if !KUNIT_ALL_TESTS' so individual tests can not be turned off. Therefore if KUNIT_ALL_TESTS is enabled that will hide the prompt in menuconfig. Reviewed-by: David Gow Signed-off-by: Anders Roxell Acked-by: John Johansen --- security/apparmor/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/apparmor/Kconfig b/security/apparmor/Kconfig index 0fe336860773..03fae1bd48a6 100644 --- a/security/apparmor/Kconfig +++ b/security/apparmor/Kconfig @@ -70,8 +70,9 @@ config SECURITY_APPARMOR_DEBUG_MESSAGES the kernel message buffer. config SECURITY_APPARMOR_KUNIT_TEST - bool "Build KUnit tests for policy_unpack.c" + bool "Build KUnit tests for policy_unpack.c" if !KUNIT_ALL_TESTS depends on KUNIT=y && SECURITY_APPARMOR + default KUNIT_ALL_TESTS help This builds the AppArmor KUnit tests.