Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2412792rwi; Tue, 1 Nov 2022 07:27:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4oaSSHy7fP6TpZd+i5SJLj3Hcvc8yzz6wUdyqwC9gOTyo4zsF0DkXRsZCdpJDlmacAtIeo X-Received: by 2002:a17:906:8a7c:b0:7ad:ad3a:b206 with SMTP id hy28-20020a1709068a7c00b007adad3ab206mr18139382ejc.345.1667312859875; Tue, 01 Nov 2022 07:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667312859; cv=none; d=google.com; s=arc-20160816; b=YB44d8BWK6J2qmKnVBiv9HSZf7EqokERCabl/lWViFajwRWIr4vdfiThqN2YrpT8i9 2lcErftmG7r2MhjCNPqSQGMkdqX9E+lRUgSlDnTNkEQ1r2QmKVM1VVPWqaZp5AZIwVGv QYYO6dzyYdXDwHlPqU/OJi+D/kpX1q5AlhFP9huPXRnvvyquKAUOO5OQhsqjIP6NqMQA 0xIRiIWvXHZ8I6Eld5IykKFZU7jCXHrad3SSkj0lMZT+vqd4JGSCdNzdD8d5OGZEgNEk LRGzrpmhiBv6GGzXEkEgI85wQE3QuO7Ms4WH0nkkGN2k5XepT/zSeSpnE8wBPsOmM9kg 7FhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=eRBoacbaoODJ5GCvCURCXLTrh4I+CnWemyQg7Os8I/U=; b=Yt302KkBW+ocMnnQtTaOq6CCSQGFFgqBdxQ6Hg5GCiHiZRC3lLvo0P9mHsvbKB+K92 SOxNS/VIsz4/oQoTXNkdfIgL5kmZeAmF3XfhamQZ2vurxmtJuohkG1Mkuo7DX1QrWtB3 M8t79Zd8Jtx965iUcOev3ibRFj8H5V9Um+rjtS57TUB+BXDSu2R+GW20Vz+6rGiel58D 5VmxnS82KSmAbDjeM9K6KcG7dcPODa/pc/Zli0n2KvCKK8hKDvXZDOzWBA3og5/+orDQ Se6WWiVqWI5UUrouO6XlALyM6ChGeyewBxZF11wydgeJfunvI6xuY+26ZDDqt2KjPZB9 U2nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="G/ZbZQts"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a1709061f0500b007adacdfd08asi9700825ejj.295.2022.11.01.07.27.15; Tue, 01 Nov 2022 07:27:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="G/ZbZQts"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbiKANxr (ORCPT + 96 others); Tue, 1 Nov 2022 09:53:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229928AbiKANxp (ORCPT ); Tue, 1 Nov 2022 09:53:45 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 237E919293; Tue, 1 Nov 2022 06:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667310824; x=1698846824; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HbiE9H6K1QA3Gs6UeJRLL4w76SL9urnXizp/flcoQFA=; b=G/ZbZQtsoMxTmF3cRLrLZ2W7QCeIqAfns6v0ovJZhBV4rmGBFhWx35aI 5w8eWXx7gLId7Ik3s7SCtAlKOhgGqt08clRwF773W7zKV0szgfnn2R/qH Zr+QxEXY/5ECTyuaTPwYj5qIh6Ta8fu7rpHIwVuOEdldWctDYw6I8fpa6 6uZjf0RT8DzcmG6o23qtvcQppbW0JgCfyTcGQ0gAjDVIioVBm1yo4Sg0H ue2sR/He/3oYhdjH4dwtgWBA+AU9K/Zm/Gjva/UecLyBA8dlvKMnhJE0k 1ZMIBbq64nR2aL1k7Eb9GryqXFEWxrw+FmeCYZR6BkyGbyVOj5Qqogsa4 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="306752704" X-IronPort-AV: E=Sophos;i="5.95,231,1661842800"; d="scan'208";a="306752704" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2022 06:53:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="665153457" X-IronPort-AV: E=Sophos;i="5.95,231,1661842800"; d="scan'208";a="665153457" Received: from linux.intel.com ([10.54.29.200]) by orsmga008.jf.intel.com with ESMTP; 01 Nov 2022 06:53:43 -0700 Received: from maurocar-mobl2 (maurocar-mobl2.ger.corp.intel.com [10.252.29.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id D24EA580AA7; Tue, 1 Nov 2022 06:53:36 -0700 (PDT) Date: Tue, 1 Nov 2022 14:53:33 +0100 From: Mauro Carvalho Chehab To: Petri Latvala Cc: Isabella Basso , twoerner@gmail.com, linux-kselftest@vger.kernel.org, magalilemes00@gmail.com, maira.canal@usp.br, dlatypov@google.com, tales.aparecida@gmail.com, brendanhiggins@google.com, linux-kernel@vger.kernel.org, leandro.ribeiro@collabora.com, igt-dev@lists.freedesktop.org, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, n@nfraprado.net, davidgow@google.com, skhan@linuxfoundation.org, andrealmeid@riseup.net, kunit-dev@googlegroups.com Subject: Re: [igt-dev] [PATCH i-g-t v2 4/4] tests: DRM selftests: switch to KUnit Message-ID: <20221101145333.5960e6e7@maurocar-mobl2> In-Reply-To: References: <20220829000920.38185-1-isabbasso@riseup.net> <20220829000920.38185-5-isabbasso@riseup.net> <20221101135425.3ee12c9c@maurocar-mobl2> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 Nov 2022 15:16:02 +0200 Petri Latvala wrote: > On Tue, Nov 01, 2022 at 01:54:25PM +0100, Mauro Carvalho Chehab wrote: > > On Tue, 20 Sep 2022 11:18:25 +0300 > > Petri Latvala wrote: > > > > > On Sun, Aug 28, 2022 at 09:09:20PM -0300, Isabella Basso wrote: > > > > As the DRM selftests are now using KUnit [1], update IGT tests as well. > > > > > > > > [1] - https://lore.kernel.org/all/20220708203052.236290-1-maira.canal@usp.br/ > > > > > > > > Signed-off-by: Isabella Basso > > > > --- > > > > tests/drm_buddy.c | 7 ++++--- > > > > tests/drm_mm.c | 7 ++++--- > > > > tests/kms_selftest.c | 12 +++++++++--- > > > > 3 files changed, 17 insertions(+), 9 deletions(-) > > > > > > > > diff --git a/tests/drm_buddy.c b/tests/drm_buddy.c > > > > index 06876e0c..74c06dce 100644 > > > > --- a/tests/drm_buddy.c > > > > +++ b/tests/drm_buddy.c > > > > @@ -6,9 +6,10 @@ > > > > #include "igt.h" > > > > #include "igt_kmod.h" > > > > > > > > -IGT_TEST_DESCRIPTION("Basic sanity check of DRM's buddy allocator (struct drm_buddy)"); > > > > +IGT_TEST_DESCRIPTION("Basic sanity check of DRM's buddy allocator (struct \ > > > > + drm_buddy) using KUnit"); > > > > > > > > -igt_main > > > > +igt_simple_main > > > > { > > > > - igt_kselftests("test-drm_buddy", NULL, NULL, NULL); > > > > + igt_kunit("drm_buddy_test", NULL); > > > > } > > > > > > With kselftests we had the ability to only run a specified set of > > > tests, and with or without selection, we had sub-results for each > > > through dynamic subtests. Does kunit have that possibility? I mean I > > > know kunit itself does but what about igt_kunit()? > > > > I don't think so. I created a KUnit with the mock selftests: > > > > $ modinfo test-i915-mock > > filename: /lib/modules/6.1.0-rc2-drm-b1cab854a639+/kernel/drivers/gpu/drm/i915/test-i915-mock.ko > > import_ns: I915_SELFTEST > > license: GPL v2 > > depends: i915 > > retpoline: Y > > intree: Y > > name: test_i915_mock > > vermagic: 6.1.0-rc2-drm-b1cab854a639+ SMP preempt mod_unload > > > > There's no module parameters. Just loading it makes all tests > > there to run. > > Ah, the selection is in kunit.ko itself. kunit.filter_glob, set from > kunit.py with > > positional arguments: > filter_glob Filter which KUnit test suites/tests run at boot-time, e.g. list* or list*.*del_test > \ Gah, permissions are 0: module_param_named(filter_glob, filter_glob_param, charp, 0); You can't even see what filters were set via sysfs: $ ls /sys/module/kunit/parameters/ stats_enabled So, once set, there's no way to change it. I wonder why this isn't 0x644. It sounds that, if we want to control it at runtime, we'll need to build with kunit as module, and unload/reload it every time if/when we want to run IGT with a different filtering ruleset. Regards, Mauro