From mboxrd@z Thu Jan 1 00:00:00 1970 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=-24.8 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=ham 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 46EC1C433E0 for ; Tue, 12 Jan 2021 13:33:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AEC3822285 for ; Tue, 12 Jan 2021 13:33:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEC3822285 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BD1866B0183; Tue, 12 Jan 2021 08:33:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B84026B0202; Tue, 12 Jan 2021 08:33:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A98978D0090; Tue, 12 Jan 2021 08:33:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0246.hostedemail.com [216.40.44.246]) by kanga.kvack.org (Postfix) with ESMTP id 924806B0183 for ; Tue, 12 Jan 2021 08:33:41 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 44C7F8248047 for ; Tue, 12 Jan 2021 13:33:41 +0000 (UTC) X-FDA: 77697215442.19.neck19_0e0723627515 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id F2FA81AD1BA for ; Tue, 12 Jan 2021 13:33:40 +0000 (UTC) X-HE-Tag: neck19_0e0723627515 X-Filterd-Recvd-Size: 7441 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 13:33:40 +0000 (UTC) Received: by mail-wr1-f46.google.com with SMTP id q18so2538467wrn.1 for ; Tue, 12 Jan 2021 05:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qMb9wiTztKRoS07hzB3mhdKsb+sq4X1Trw3VZKDYs14=; b=LulKNfPy6RVKeuhuvL+21DkViXqm+xoh01+ZKNpfO8NcjO0tSBaITJinrbdfENlRvO iiiFj9B0zakXBmdRrGQpq8QPe++CE5K8M8Yq68gCWH/jAvR1iAOL0C8UNi/f75vtG7GI B8+rXYakqo+ZXricrDxC2lsa6jKFHT4TxSBqO0ZsGTZgYOtwuHQzRB4ff7zKkR795Aps ym4/FFqVJS5TlHhjSbFKfKQB9hOf2Omg7HihXK6NpglMTkh97VAg35jyAF+id3eJ3TDN kjBRTl4GCIxqWWdMqYdbc9/SkACGesAJlWAdCSPT8tirP2P0pi4PnVDzZiAdn3GJPgcF a+QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qMb9wiTztKRoS07hzB3mhdKsb+sq4X1Trw3VZKDYs14=; b=mXTwdanzDuaCE3H8Tl603Wlyiaycul8JKzvSHdYe8M46LJzNnlcCPYCDnWUF038+Tl EYGZfUVk6fxhY48USOp/QJhMEGImbSxaCSmzeY4Grv+EEE9lW5lVFsLCygiU3C/BfoIH BdZscY5FCnVsBbs5X4YeSYAict2dXu2Vs7mwcAscGBQaUGelPKPzTr6G7k/T1VoY/8wy 98ES3uFGOB+MaLGr1guaFG3syt8RvfqaLfTgOUKUJtLqv0hCv56duPw+6SqXwBY0lBDW 59j6DPiY2c+HHmKl/0CnZytAs41hhlLlbmPGJK5goa8l6lpiDJTFClhrdzUK+zVwqoFz H7NQ== X-Gm-Message-State: AOAM530fRb7ID6HGCJCmMZ+TF6MP9BYdYRsG+xwIj8XA5NZjq47wcU6s H3WK5PxBazrKV2BtyFlbopQzhf5c46UIqw== X-Google-Smtp-Source: ABdhPJyOFVSdyqq6SQpZ2Zd2KjwyKoBsv1vg0JznjxGBL8fPkpmpDog+P9sm1N8NGWAeBFVPwKAHag== X-Received: by 2002:a5d:4712:: with SMTP id y18mr4402827wrq.229.1610458419201; Tue, 12 Jan 2021 05:33:39 -0800 (PST) Received: from elver.google.com ([2a00:79e0:15:13:f693:9fff:fef4:2449]) by smtp.gmail.com with ESMTPSA id s63sm4156014wms.18.2021.01.12.05.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 05:33:38 -0800 (PST) Date: Tue, 12 Jan 2021 14:33:32 +0100 From: Marco Elver To: Andrey Konovalov Cc: Catalin Marinas , Vincenzo Frascino , Dmitry Vyukov , Alexander Potapenko , Andrew Morton , Will Deacon , Andrey Ryabinin , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/11] kasan: rename CONFIG_TEST_KASAN_MODULE Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.2 (2020-11-20) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jan 05, 2021 at 07:27PM +0100, Andrey Konovalov wrote: > Rename CONFIG_TEST_KASAN_MODULE to CONFIG_KASAN_MODULE_TEST. > > This naming is more consistent with the existing CONFIG_KASAN_KUNIT_TEST. > > Signed-off-by: Andrey Konovalov > Link: https://linux-review.googlesource.com/id/Id347dfa5fe8788b7a1a189863e039f409da0ae5f Reviewed-by: Marco Elver For this patch, as-is. But we could potentially do better in future -- see below. > --- > Documentation/dev-tools/kasan.rst | 6 +++--- > lib/Kconfig.kasan | 2 +- > lib/Makefile | 2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst > index 26c99852a852..72535816145d 100644 > --- a/Documentation/dev-tools/kasan.rst > +++ b/Documentation/dev-tools/kasan.rst > @@ -374,8 +374,8 @@ unmapped. This will require changes in arch-specific code. > This allows ``VMAP_STACK`` support on x86, and can simplify support of > architectures that do not have a fixed module region. > > -CONFIG_KASAN_KUNIT_TEST & CONFIG_TEST_KASAN_MODULE > --------------------------------------------------- > +CONFIG_KASAN_KUNIT_TEST and CONFIG_KASAN_MODULE_TEST > +---------------------------------------------------- > > KASAN tests consist on two parts: > > @@ -384,7 +384,7 @@ KASAN tests consist on two parts: > automatically in a few different ways, see the instructions below. > > 2. Tests that are currently incompatible with KUnit. Enabled with > -``CONFIG_TEST_KASAN_MODULE`` and can only be run as a module. These tests can > +``CONFIG_KASAN_MODULE_TEST`` and can only be run as a module. These tests can > only be verified manually, by loading the kernel module and inspecting the > kernel log for KASAN reports. > > diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan > index 3091432acb0a..624ae1df7984 100644 > --- a/lib/Kconfig.kasan > +++ b/lib/Kconfig.kasan > @@ -192,7 +192,7 @@ config KASAN_KUNIT_TEST > For more information on KUnit and unit tests in general, please refer > to the KUnit documentation in Documentation/dev-tools/kunit. > > -config TEST_KASAN_MODULE > +config KASAN_MODULE_TEST > tristate "KUnit-incompatible tests of KASAN bug detection capabilities" > depends on m && KASAN && !KASAN_HW_TAGS > help > diff --git a/lib/Makefile b/lib/Makefile > index afeff05fa8c5..122f25d6407e 100644 > --- a/lib/Makefile > +++ b/lib/Makefile > @@ -68,7 +68,7 @@ obj-$(CONFIG_TEST_IDA) += test_ida.o > obj-$(CONFIG_KASAN_KUNIT_TEST) += test_kasan.o > CFLAGS_test_kasan.o += -fno-builtin > CFLAGS_test_kasan.o += $(call cc-disable-warning, vla) > -obj-$(CONFIG_TEST_KASAN_MODULE) += test_kasan_module.o > +obj-$(CONFIG_KASAN_MODULE_TEST) += test_kasan_module.o > CFLAGS_test_kasan_module.o += -fno-builtin [1] https://www.kernel.org/doc/html/latest/dev-tools/kunit/style.html#test-file-and-module-names Do we eventually want to rename the tests to follow the style recommendation more closely? Option 1: Rename the KUnit test to kasan_test.c? And then also rename test_kasan_module.c -> kasan_module_test.c? Then the file names would be mostly consistent with the config names. Option 2: The style guide [1] also mentions where there are non-KUnit tests around to use _kunit for KUnit test, and _test (or similar) for the non-KUnit test. So here we'd end up with kasan_kunit.c and kasan_test.c. That would get rid of the confusing "module" part. The config variable could either remain CONFIG_KASAN_MODULE_TEST, or simply become CONFIG_KASAN_TEST, since we already have CONFIG_KASAN_KUNIT_TEST to distinguish. But I won't bikeshed further. If you do a v2, I leave it to your judgement to decide what is most appropriate. Thanks, -- Marco