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=-23.3 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_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 B6230C433DB for ; Tue, 12 Jan 2021 18:28:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4B9F62311D for ; Tue, 12 Jan 2021 18:28:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B9F62311D 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 C56316B009B; Tue, 12 Jan 2021 13:28:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C2C026B009D; Tue, 12 Jan 2021 13:28:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B44646B009E; Tue, 12 Jan 2021 13:28:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0091.hostedemail.com [216.40.44.91]) by kanga.kvack.org (Postfix) with ESMTP id 9D20D6B009B for ; Tue, 12 Jan 2021 13:28:37 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 542B28249980 for ; Tue, 12 Jan 2021 18:28:37 +0000 (UTC) X-FDA: 77697958674.17.steam97_2f14cd227517 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 33912180D018B for ; Tue, 12 Jan 2021 18:28:37 +0000 (UTC) X-HE-Tag: steam97_2f14cd227517 X-Filterd-Recvd-Size: 7530 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 18:28:36 +0000 (UTC) Received: by mail-pl1-f171.google.com with SMTP id x12so1841554plr.10 for ; Tue, 12 Jan 2021 10:28:36 -0800 (PST) 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=Rph5/YWztZo7f+7iLQyy6pT5CxZC682xIlOwCUdZJGU=; b=NbtgBBkA5zfh3973/gq4Qp8Ucu8SRBX+BAdV+P8GMTk5pMqtL7sRaUycC3sdKBFjiH AeU+3ZRkzNdfnhrpqfo98zwCrH5svzw9CEec2/EibcELKdFBLBDg5SLhAlL+f4nXMuC/ vkNuQ1b+PaumfFDAZB1T2pYh+HNG3x9z2/jhGc17uUo2ecgD9QLR04a09KmoVnlG4Hh0 V4OnatAg3Q37PUDOO1GdHAJIbMYLjmtowyqYKmqVkDVgZoIBq4uub4So8glCNQ8/pu21 9krZwyK/adxxKRXQF9JskoyjuO4Iyyzmcc+iaUubQfuB1WWAkNuvZH7SzgXH2iueUmaZ xl9A== 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=Rph5/YWztZo7f+7iLQyy6pT5CxZC682xIlOwCUdZJGU=; b=rAlRYDB8D9VR7CGXhWFeDM4YfATn1/tULTzOBOCGz15iDFh8+upoPr1JdT9cay34bq 0GKrUjkFDZwA96vQR0G1DmCRwMlRLN68jYZ/yYaY07gq1AYhHmPHG2W4r3VxWBGfz9GA n1KpmJpp37piKnqciToE1g1mZy8rrwZWV4ABwVeun14t0vCGP/UuatXKZgefTkWiYu5Y 7mQJAc+7VdnxojJb081hjVgTB+U/d0OFSxXweTuTyeO18OIYuTHwl+1k0Cjy4ROf7RqT hvASW3BMQcn76fPhDm1aHnL2rCyb6oYpeDlMn0dHVFTgKLYlmLqWH94CVYwwPdHvT2BW vxPg== X-Gm-Message-State: AOAM533yCn8JV5JZ/JfsyBrJJRgot0hPK27xSxOuOGiUAU/Fk1Iy2HUd oHneNdw3U1Tx39XBOQSuXLND2bSnNpjx8LD83Bqgrg== X-Google-Smtp-Source: ABdhPJz6jRq4so9Kku93b/xI4raH9teGz3t3kzluP1hOCGGalLxXVDra8crnobJ/ukY/Q1M04nnYt4HCSk9dpWgnvrQ= X-Received: by 2002:a17:90b:1087:: with SMTP id gj7mr421423pjb.41.1610476115545; Tue, 12 Jan 2021 10:28:35 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Andrey Konovalov Date: Tue, 12 Jan 2021 19:28:24 +0100 Message-ID: Subject: Re: [PATCH 06/11] kasan: rename CONFIG_TEST_KASAN_MODULE To: Marco Elver Cc: Catalin Marinas , Vincenzo Frascino , Dmitry Vyukov , Alexander Potapenko , Andrew Morton , Will Deacon , Andrey Ryabinin , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , kasan-dev , Linux ARM , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" 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 12, 2021 at 2:33 PM Marco Elver wrote: > > 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. Most tests in lib/ start with test_, so not using that pattern for KASAN tests could be confusing. Maybe we can move them to mm/kasan. Anyway, I won't look into this right now. Thanks!