Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2008799ybl; Tue, 3 Dec 2019 16:40:12 -0800 (PST) X-Google-Smtp-Source: APXvYqzPEskf/oOZzjHreWZnhYqJxmpCqLSFqu0R6RU4N7one6TrMlT6g6IxAWp/l7oRIuNFfi1n X-Received: by 2002:a9d:154:: with SMTP id 78mr584400otu.294.1575420012102; Tue, 03 Dec 2019 16:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575420012; cv=none; d=google.com; s=arc-20160816; b=PSKSDXM1IFTNSzO3c2D4i0AS6MSCQ/Rqtvwfk1bt0BnU8AEKqCjNyfbDBSgm3uQ4hO lO3yHZSYyrAKximrcYUe5LTVdznrAH6g+AmIUQMyy9uuIazAu37ItzPHL9rG8kk2Hy9z OjKRxAKMBvY4KMv5OrN/W5RWJrcKUZobsFBAKJlLXhwwxUAB5L4/ZDUTXTMhubB0fuRx Ra9THR59dgIMc8S5GdAqwr0xhswy2AHzrgSbctpgMOmfRRmFrv/evF4eJP2Bv4CG0QvN RWi21KLvzUChtKTeeYmbdA/bG4GQXnjY4500yqC833c614ZYma2XFYZkd4MlHX9Amhl8 32Pw== 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; bh=wZC5viaO2u7Bf8NChPHdXg3YeSQecspV2t2p3Dl8K34=; b=OSItJvshGWBFyJvWZbUqS37irchU+RmmcyV4dYQTKap0S8oJB8zlT59sGV3Hz1783L 2Ip+ZgQU20QBAf4lyJdiJsiMIj7q9DZWAgTnIoxq0ZzEmd2PapJPZPVqexzEDwDbDzAP zBikpxtYMEPCrW82NtdbAWAEYo4AuLOSifa4w/vD3cW/vmQYGb3BBmGb6BZvGuyPgqwN ZH0jmVe/QxQBTbxSkI+KniOIJdTCvfXwu6MKhUbe3K16/HNj4XrZM6KGuPGBHtUgUQ3J 0mISng2QUIhQwbX5M1/Z9jzhSKp15YAwu8jGF7of+gdNt54lgZHEBtmjco2SHPlfgy3/ QP6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u130si2358872oif.94.2019.12.03.16.39.59; Tue, 03 Dec 2019 16:40:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726162AbfLDAjY (ORCPT + 99 others); Tue, 3 Dec 2019 19:39:24 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:47416 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726008AbfLDAjY (ORCPT ); Tue, 3 Dec 2019 19:39:24 -0500 Received: from callcc.thunk.org (guestnat-104-133-0-111.corp.google.com [104.133.0.111] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id xB40cpqi007825 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 3 Dec 2019 19:38:52 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 2474D421A48; Tue, 3 Dec 2019 19:38:51 -0500 (EST) Date: Tue, 3 Dec 2019 19:38:51 -0500 From: "Theodore Y. Ts'o" To: Brendan Higgins Cc: Alan Maguire , Iurii Zaikin , David Gow , "open list:KERNEL SELFTEST FRAMEWORK" , Linux Kernel Mailing List , KUnit Development , Kees Cook , Andrew Morton , Masahiro Yamada , catalin.marinas@arm.com, joe.lawrence@redhat.com, penguin-kernel@i-love.sakura.ne.jp, urezki@gmail.com, andriy.shevchenko@linux.intel.com, Jonathan Corbet , adilger.kernel@dilger.ca, Luis Chamberlain , "open list:DOCUMENTATION" , Knut Omang Subject: Re: [PATCH v5 linux-kselftest-test 3/6] kunit: allow kunit tests to be loaded as a module Message-ID: <20191204003851.GF86484@mit.edu> References: <1575374868-32601-1-git-send-email-alan.maguire@oracle.com> <1575374868-32601-4-git-send-email-alan.maguire@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 03, 2019 at 09:54:25AM -0800, Brendan Higgins wrote: > On Tue, Dec 3, 2019 at 4:08 AM Alan Maguire wrote: > > > > As tests are added to kunit, it will become less feasible to execute > > all built tests together. By supporting modular tests we provide > > a simple way to do selective execution on a running system; specifying > > > > CONFIG_KUNIT=y > > CONFIG_KUNIT_EXAMPLE_TEST=m > > > > ...means we can simply "insmod example-test.ko" to run the tests. > > > > To achieve this we need to do the following: > > > > o export the required symbols in kunit > > o string-stream tests utilize non-exported symbols so for now we skip > > building them when CONFIG_KUNIT_TEST=m. > > o support a new way of declaring test suites. Because a module cannot > > do multiple late_initcall()s, we provide a kunit_test_suites() macro > > to declare multiple suites within the same module at once. > > o some test module names would have been too general ("test-test" > > and "example-test" for kunit tests, "inode-test" for ext4 tests); > > rename these as appropriate ("kunit-test", "kunit-example-test" > > and "ext4-inode-test" respectively). > > > > Co-developed-by: Knut Omang > > Signed-off-by: Knut Omang > > Signed-off-by: Alan Maguire > > Reviewed-by: Brendan Higgins Acked-by: Theodore Ts'o # for ext4 bits I do have one question, out of curiosity --- for people who aren't using UML to run Kunit tests, and are either running the kunit tests during boot, or when the module is loaded, is there the test framework to automatically extract the test reports out of dmesg? I can boot a kernel with kunit tests enabled using kvm, and I see it splatted intermixed with the rest of the kernel boot messages. This is how I tested the 32-bit ext4 inode test fix. But I had to manually find the test output. Is that the expected way people are supposed to be using Kunit tests w/o using UML and the python runner? Thanks, - Ted