Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp323406pxa; Thu, 27 Aug 2020 03:26:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRIb8D9XtkAOOzT65tk9Mz8BpiCSq4S4g36W8cX8RPHpQJmb3hdI7ViG95WzNqFOXsTvIm X-Received: by 2002:a17:906:1154:: with SMTP id i20mr16602284eja.243.1598524005033; Thu, 27 Aug 2020 03:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598524005; cv=none; d=google.com; s=arc-20160816; b=1J69B8V/8en5E2z2Hx/J36GyyYvJyiNPdKZnIBja7e/N6OtWDv2tec9Dy3YHmzBkur qpFLLEnt0R9xLwkPCi4qQW+eRELqPZiloGhsZa4C4pxwPJAuznWZ2UFwk/cMGZDfZz7o MoAVcUdeAIpZVRoJRp06aaDebe/OqGwKrRFdOxG7DIuF9GY3qFfpiwuLFrW8JV2ka9HN eQLdMPEGfkQUrEU3Jz1FUW0sXY8BuslId/gE7+W5JzXfaRK1uPk5Tl/OPgiAWxl+7gz9 pk/udmtyI2sKvJ3lX4lZIBii9f8dxOFXdw5JEkRX2r0V2q7Z1pDS7fdvXJpgUYPGgo/4 H5Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0vdvNJDaA2R7UXSkN77bjSvK1qeX8JyEc0qDlajxxQs=; b=VJFI1F1FtXYppvfy5OwEaEhnuJSxGvFi9yMKg/3cW3O4gbKvgbVbBlP95f8i12x9ou 9YWUyqMvJauI9F8qxB0RRtoyN3w3CHqZUEDQMtM5hTdn1zWXoEbO0fdcJM2XQNFHbId3 Z2df21q0mOZ1ImV/1IvBtqeefIBtBff2IL3iNd5vtXrZoNh6vIQfRKM+uwgpSC2cfgBC uJqu6hdfNmmUzyd0lUW5thvydsfUXysqzHPSYyShe/YavOktSV/GeEMnhazSM8lQedwH SHNApY4zcHmrgMWs9/HJjUawpGEV4r2Fzrkqd/Eb+eBDx3oRFtoB5tmG6vbfonucV/Wq IbXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rL9s269p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d13si1029426eja.203.2020.08.27.03.26.22; Thu, 27 Aug 2020 03:26:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@google.com header.s=20161025 header.b=rL9s269p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728764AbgH0KXo (ORCPT + 99 others); Thu, 27 Aug 2020 06:23:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728666AbgH0KXl (ORCPT ); Thu, 27 Aug 2020 06:23:41 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29438C06121B for ; Thu, 27 Aug 2020 03:23:41 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id r15so4810111wrp.13 for ; Thu, 27 Aug 2020 03:23:41 -0700 (PDT) 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=0vdvNJDaA2R7UXSkN77bjSvK1qeX8JyEc0qDlajxxQs=; b=rL9s269pC6oLPkDI3tfzuJ3tZopAeQgT12ll7VhkWMrh63n8tMcGzsY2JpzvUyY+2V BnJoTVPMzTTKxL2ZYBqaJb/jvPfj/1afWfg89ZMHpUb3Svwd6G3PRT3EnIhj9OvUMJ54 ookJUfCmWVwiMG/53gmkqcqX5C6OZjjwKAMZzpAvBtwBJ86bjd7HemRjxRpSGfSLmA9i qXBv62SNbammdu2urTkc3+B87Y8ZtDUgCFBF7f6yzegW6wqTA5QKgw2GxtxNTbWOZDaB 9Caq/5XYLKnqKdOMzAiYdzHptBi95kgEr3utkviH2i+wTx5Qa3VoZmWOBbPe1L/dNfiI VaQw== 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=0vdvNJDaA2R7UXSkN77bjSvK1qeX8JyEc0qDlajxxQs=; b=pNkjcjw8MaMSWxaVxBoc8iktc6egsdWKSnp6JLkidpUGMlgpbFxROrrTmqR0geABKk o9HYiZHJBd5/aybsoArq8TEgTaxHRRFejzyMw4jrqsE81LEgISWKThq2NNso/aXMMciZ eoqmvzCG7Bm1YSJXnoD2xPJ/LhA/FkC4hvnMn836wylNEEvzHKEBRMwutm4Y4H79fQEM 8gJQ9fIOcJM3LlXkAyfr8riKTSDbvivhMheGFQpyMRZUVsbloyP80NU0xlHVGcET8jyE mzyh63hsLVivwRRvrckVEnih6RfWNOtaO0BitOEKpeUaZh3uoTqondiEgrncGBzEaYw/ EORQ== X-Gm-Message-State: AOAM5335BLc15cPr5ZtmfKQGrI6nRQsGFg0/u3oOMNPQ4kC6LyVNhRR8 Gg86FoSRrGAHZNKMJWTZDH0WUQ== X-Received: by 2002:adf:a48d:: with SMTP id g13mr3444805wrb.212.1598523819563; Thu, 27 Aug 2020 03:23:39 -0700 (PDT) Received: from elver.google.com ([100.105.32.75]) by smtp.gmail.com with ESMTPSA id k13sm4157086wmj.14.2020.08.27.03.23.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 03:23:38 -0700 (PDT) Date: Thu, 27 Aug 2020 12:23:33 +0200 From: Marco Elver To: Vitor Massaru Iha Cc: kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, brendanhiggins@google.com, skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, gregkh@linuxfoundation.org, tglx@linutronix.de, andriy.shevchenko@linux.intel.com, geert@linux-m68k.org, paul.gortmaker@windriver.com, akpm@linux-foundation.org, torvalds@linux-foundation.org, arnd@arndb.de, elfring@users.sourceforge.net, mhocko@suse.com Subject: Re: [PATCH] lib: kunit: add list_sort test conversion to KUnit Message-ID: <20200827102333.GA3564678@elver.google.com> References: <20200729192357.477350-1-vitor@massaru.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200729192357.477350-1-vitor@massaru.org> User-Agent: Mutt/1.14.4 (2020-06-18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 29, 2020 at 04:23PM -0300, Vitor Massaru Iha wrote: > This adds the conversion of the runtime tests of test_list_sort, > from `lib/test_list_sort.c` to KUnit tests. > > Please apply this commit first (linux-kselftest/kunit-fixes): > 3f37d14b8a3152441f36b6bc74000996679f0998 kunit: kunit_config: Fix parsing of CONFIG options with space > > Code Style Documentation: [0] > > Signed-off-by: Vitor Massaru Iha > Link: [0] https://lore.kernel.org/linux-kselftest/20200620054944.167330-1-davidgow@google.com/T/#u > --- > lib/Kconfig.debug | 29 +++++--- > lib/Makefile | 2 +- > lib/{test_list_sort.c => list_sort_kunit.c} | 73 +++++++++++---------- > 3 files changed, 58 insertions(+), 46 deletions(-) > rename lib/{test_list_sort.c => list_sort_kunit.c} (62%) > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 9ad9210d70a1..de4fd020a4af 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -1854,16 +1854,6 @@ config LKDTM > Documentation on how to use the module can be found in > Documentation/fault-injection/provoke-crashes.rst > > -config TEST_LIST_SORT > - tristate "Linked list sorting test" > - depends on DEBUG_KERNEL || m > - help > - Enable this to turn on 'list_sort()' function test. This test is > - executed only once during system boot (so affects only boot time), > - or at module load time. > - > - If unsure, say N. > - > config TEST_MIN_HEAP > tristate "Min heap test" > depends on DEBUG_KERNEL || m > @@ -2173,6 +2163,25 @@ config LIST_KUNIT_TEST > > If unsure, say N. > > +config LIST_SORT_KUNIT > + tristate "KUnit Linked list sorting test" > + depends on KUNIT > + depends on DEBUG_KERNEL || m I think the style [0] you linked suggests '*_KUNIT_TEST' for config variables. Only noticed this because I was doing a git grep 'config.*TEST' to find tests in the kernel + new tests floating on the LKML. Apologies for picking this patch to comment on, but if it's still changeable it might be worth adjusting. > + help > + Enable this to turn on 'list_sort()' function test. This test is > + executed only once during system boot (so affects only boot time), > + or at module load time. > + > + 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. Not a big deal, but I'm not sure if summarizing KUnit here is useful. You already link to the documentation below. > + For more information on KUnit and unit tests in general please refer > + to the KUnit documentation in Documentation/dev-tools/kunit/. ... Thanks, -- Marco