From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id AC4AD10E328 for ; Tue, 6 Jun 2023 10:03:18 +0000 (UTC) From: Janusz Krzysztofik Date: Tue, 06 Jun 2023 12:03:04 +0200 Message-ID: <4686292.rnE6jSC6OK@jkrzyszt-mobl2.ger.corp.intel.com> In-Reply-To: <20230606111850.5fc2d92d@maurocar-mobl2> References: <20230605104716.5678-1-dominik.karol.piatkowski@intel.com> <2084363.bB369e8A3T@jkrzyszt-mobl2.ger.corp.intel.com> <20230606111850.5fc2d92d@maurocar-mobl2> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [igt-dev] [PATCH i-g-t 6/8] lib/igt_kmod: place KUnit tests on a subtest List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Mauro Carvalho Chehab Cc: igt-dev@lists.freedesktop.org List-ID: On Tuesday, 6 June 2023 11:18:50 CEST Mauro Carvalho Chehab wrote: > On Tue, 06 Jun 2023 10:41:40 +0200 > Janusz Krzysztofik wrote: > > > > > > + * and for documentation. > > > > > + */ > > > > > + igt_subtest_with_dynamic("all-tests") > > > > > > > > Why can't we use module_name as subtest name? > > > > > > We can, but this preserves the old behavior. So, the existing documentation > > > won't break. > > > > Where is this old behavior documented? In the current code I can't find any > > occurrence of "test-all" other than inside igt_kmod.c:igt_ksleftest(), not > > documented in any way. > > > > Wasn't the old behavior a result of a limitation rather than a feature? > > Take a look at igt_kselftests(): > > igt_subtest_with_dynamic(filter ?: "all-tests") { > igt_list_for_each_entry_safe(tl, tn, &tests, link) { > unsigned long taints; > > igt_dynamic_f("%s", unfilter(filter, tl->name)) > igt_kselftest_execute(&tst, tl, options, result); > free(tl); > > The default when "filter" is not used is "all-tests". Yes, I did look into igt_kselftest() and did notice the use of "all-tests", but for me that's not a documentation of an expected behavior, only a not quite fortunate implementation detail, forced by a mix of IGT contraints on one hand and implementation specifics of kernel side of i915 selftests on the other. When you call an IGT test with a subtest name specified then only that subtest is executed, no matter if that's a selftest or a userspace test. When you call a userspace IGT test with no subtest name (pattern) specified then all subtests are executed and their names displayed. But when you do the same for an IGT selftest then all selftests are executed as one subtest named "all-tests". Do you think that's intentional, not a result of some constraints which no longer apply for kunit tests? Why do you prefer to keep the old inconsistent behavior instead of implementing IGT kunit tests to behave consistently with userspace IGT tests? Thanks, Janusz > > Regards, > Mauro >