Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4070391rwb; Mon, 31 Jul 2023 00:12:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlG0iWq1o6iAbAyvjOjdNU/5ohLAePQvyqByns2bkNrydrPOoAeAl/3GgHa23usPHtL233RM X-Received: by 2002:a05:6402:78e:b0:522:27c4:3865 with SMTP id d14-20020a056402078e00b0052227c43865mr6740817edy.41.1690787579509; Mon, 31 Jul 2023 00:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690787579; cv=none; d=google.com; s=arc-20160816; b=X1byeyvgybxqWao4WfJ9lvuHwzKmybGmIfO99Kr+9VXqfEEHhSvWTflbI4S2VXVNJn IgA5v6/o5nhmHsYFowXlWvX528ttEG3sM1QTJOUCmXHtyOKVlGdLTcWDEWUXQPP30PWO xCx6s+fMrVXXoJK1eUC/YC4MVOWGtZ8TQBWTooxZryeOYxWr9VFuP7dZiGLNRkgTklyh YIVlgsVViYzo5Kg68IdHOxNAB0m41ZOVBPGWeJIeyvPXs6K82lUIVKyK+UYmSCXZL52X 4VhA9sUeDZjfVzJo1d8niXxz4Ycldesmbwrd0cMsPGEswBe4TBszac7OOPivcRyRASFH 7ZnQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=+wBt8kpS7ublpfgJacA8TvEpgC/ob/VFU7oUmrgPHgA=; fh=j6L+uVtzJZqXE2DwNxEp+xVr3d5QX+4t1Wa1bWrjFSE=; b=F3OwwyQcdm2ZIiWaCmUjZxEgDEXM2PlyKvy9P/CPe7Y7t5f4fo8AvFcy0H0fG+XUOX pdyDB24EjTn2bEh8f4Am/GUds7uYbnynjoZWmDxBkzj/zt0PYRbvE/+59cxzdBUrfwJz JhumLazY2Nqx6XjloDPCyzQFpASuZfDoeyDBZO7+rU2mj3KOc7qBeFf1VJ/ssfiX3sRR HoISSC1aW7CKTruee4rbtMqm7k673mLPNpO+tjHEkp+Q8YxG/HIJ8r0omj/9UxNNZMeS dsl4l4B7r/qMpuUsM5Iqvs2LGmiHezv5sOcvDQV7tqYOTTXTwwDmoxcgBQoQ4JmIWxtI +7Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VKHhr16a; 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 j26-20020aa7ca5a000000b005221da47f59si6056619edt.172.2023.07.31.00.12.35; Mon, 31 Jul 2023 00:12:59 -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=VKHhr16a; 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 S229452AbjGaGRa (ORCPT + 99 others); Mon, 31 Jul 2023 02:17:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbjGaGR1 (ORCPT ); Mon, 31 Jul 2023 02:17:27 -0400 Received: from mgamail.intel.com (unknown [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6C0E10EA; Sun, 30 Jul 2023 23:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690784221; x=1722320221; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=KRtFQ2+1X4QJ3GHF5S3ruCx9W9SpVuuAs5HerfEdF1I=; b=VKHhr16aIpVDsfYN82kYqJw0W63PUdWjiBIA2m4bCnvOTDS+0Hx9rLja 8gmqD+P59PwZ3saGPi9o1aErW/TW39UwHktSiZubK8VwE6sfwbtFWNdlJ 6vd8gghy6daQWlvT52XJnt/CMpcC/Pis31cRrUvg/uSZPH5svJjA5Y/WN iHBHQLds9INmHD9nc4VA6bwDSmILL3w/+9QivlctO2RP08jtDby5F6bkm Mxom0Mc1BpZNLD2P29qSIFgfDbjLx4mBFvTa4ve9oikgDGB/Z4hGQ2t7L w+H9lNORnUAI0K/EOlooNIfWDRsDeCBmgwIFznlbR+M5vuGI7UIX8Q4dy A==; X-IronPort-AV: E=McAfee;i="6600,9927,10787"; a="435231332" X-IronPort-AV: E=Sophos;i="6.01,244,1684825200"; d="scan'208";a="435231332" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2023 23:16:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10787"; a="1058827619" X-IronPort-AV: E=Sophos;i="6.01,244,1684825200"; d="scan'208";a="1058827619" Received: from jkrzyszt-mobl2.ger.corp.intel.com (HELO jkrzyszt-mobl2.intranet) ([10.213.1.128]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2023 23:16:41 -0700 From: Janusz Krzysztofik To: Brendan Higgins , David Gow Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Mauro Carvalho Chehab , igt-dev@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] kunit: Expose some built-in features to modules Date: Mon, 31 Jul 2023 07:45:53 +0200 Message-ID: <20230731054552.2145292-5-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Submit the top-level headers also from the kunit test module notifier initialization callback, so external tools that are parsing dmesg for kunit test output are able to tell how many test suites should be expected and whether to continue parsing after complete output from the first test suite is collected. Extend kunit module notifier initialization callback with a processing path for only listing the tests provided by a module if the kunit action parameter is set to "list", so external tools can obtain a list of test cases to be executed in advance and can make a better job on assigning kernel messages interleaved with kunit output to specific tests. Use test filtering functions in kunit module notifier callback functions, so external tools are able to execute individual test cases from kunit test modules in order to still better isolate their potential impact on kernel messages that appear interleaved with output from other tests. v2: Fix new name of a structure moved to kunit namespace not updated across all uses. Janusz Krzysztofik (3): kunit: Report the count of test suites in a module kunit: Make 'list' action available to kunit test modules kunit: Allow kunit test modules to use test filtering include/kunit/test.h | 14 +++++++++++ lib/kunit/executor.c | 57 +++++++++++++++++++++++++------------------- lib/kunit/test.c | 57 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 103 insertions(+), 25 deletions(-) -- 2.41.0