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: 208511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3BD4C54E8F 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 943A9207FF 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="S+IZahvZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730150AbgEKNO2 (ORCPT ); Mon, 11 May 2020 09:14:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726687AbgEKNO1 (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 BFC12C061A0C for ; Mon, 11 May 2020 06:14:26 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id u6so9406771ljl.6 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=S1bjOWFh5KLnGuybIqdu5AmIUAodP9J3W2pRiyQ6rGa4ytiijiUmHhQ64pJNpVmDmc fg96TWrGFhF4Fak8hAlAMjNopT3dhxuZ5sAHcUOCRvcC6MZ931Iq2mA/7JXy0CrDgzjS R8b43miGY0AFfiIoukyjyifWGeu9syeV7Jk1fBRD2vMlo4T5NCG6t9HGottrnNeLeYic /pGO2TeUOEqBvH16sfcZEpdq3iqAMa1JWYBm+t97ldcVeMF+r2hOaNZkyxWgrQsFH5Lj b4fajOlUtD/IFU7vABrm4BCBugAQ1wxJfZ3xFLzzFe/0DPQGYPGU89Ah4PzHDL7+ZJrO SHBA== X-Gm-Message-State: AOAM5305WfRzBxKXaVcqkX3QE8dbUSpEaYwkLqLG72MWFzB7na/Hcou4 e7KIncoYoFvMJ1yWGEQewj3qxg== 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: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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 --- 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: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: 208512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FE53C54E8F for ; Mon, 11 May 2020 13:14:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE2E02082E 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 S1730168AbgEKNOg (ORCPT ); Mon, 11 May 2020 09:14:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729279AbgEKNOf (ORCPT ); Mon, 11 May 2020 09:14:35 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 567CEC05BD09 for ; Mon, 11 May 2020 06:14:35 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id z22so7485782lfd.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=KcReb2yPw7yuhEOCG49qL7ElfOTKkKYXomN4X+dVSZEgb1GktlcNbeVsPJ6HSECRtS rctlKTmcNpjiN9jrsSTy2z6kXCndUkuFmz5vWNq+xpeD9wzKHoBvtc+12lU7GpR9WUqm 64M87LtCHhHJZC7Pu5Hpv9o0CIg3ZDCDMA0Uh9FrumD2UZCaVFewxmhtQ5mN5EXqtWb4 tEr6dHQqcnv8U1ymipdXDI2dvPhyDfQCs2S91bhkR6+T+IkmI/RcNCBvSs29jzBeepob djhyds3SI/0cH/LyheBkoJfUVd5OyIUBWjv8nDiOsjcBsxkwvHqxHvWrm5cCRnG7ivLv Vo2A== X-Gm-Message-State: AOAM532eRWSd34HHr4qx9BLCTuQFVc3fSEmMN39CWNt1PBACHG/vavIY 8aCzInkTYz7IgELgKJudQMOFK/8AlCraoA== 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: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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: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: 208510 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FCCEC54E4A for ; Mon, 11 May 2020 13:14:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 473A220746 for ; Mon, 11 May 2020 13:14:57 +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 S1730063AbgEKNO4 (ORCPT ); Mon, 11 May 2020 09:14:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730178AbgEKNOo (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 9368BC061A0C for ; Mon, 11 May 2020 06:14:43 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id u15so9431920ljd.3 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=gc7Z10JcEhxCTas4ZIlrD10ytqP0yH7lO5PI/QeTXjfFIZLwVZig1jMjm5Dwg1irm5 PAJg5GzMOzpMkVXiWP0GbjPBRZFOJcAXerY5lkmIxszcSvkJywOjqM/qnH4sTnFi4Ob+ IGpJ+AUB0hK2KMSHWnH+bFF/5467kOtGY51N3JGy/SEH48+9iOJ5ntbytdCtwyDEJUUE YmqAneSn4GKjuILwxrSeaVeijcT1RRHoW02SBASjRRN7a9o4Wg52IaYQ8RpbylHlcfUb 37w7JjV2O57eFmys5eEUTJ3MJ3OrVIvvz4QH1kJ8GIXI7BjAP7Ostp7cwNbEWaJA1u8/ jRKA== X-Gm-Message-State: AOAM533anjSudDKucrkq3qo5tZgLy/6SmFYijqcVfY15AOK5oSKpE8Xt ZS1mDNXYBFpbeF++C/LKQQ/4CQ== 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: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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.