Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4617148rwb; Mon, 31 Jul 2023 09:27:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlGgY/vA+Q/dhGVGpgMq/mNoXIrfbvDN25nkGGxCOTPn9vuUkwjdCg5KwGHsV9xdd1zwr72h X-Received: by 2002:a17:903:41c6:b0:1b8:971c:b7b7 with SMTP id u6-20020a17090341c600b001b8971cb7b7mr13149406ple.56.1690820867865; Mon, 31 Jul 2023 09:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690820867; cv=none; d=google.com; s=arc-20160816; b=JcDsbCZUs2s+RIac211T+F7c1Lxfg9Ux+PSKXEe5U6lQ5DyAL2UMVayBiCW6GvJ7IK 7vJQg+4VpuZeDLP720/KngwLbGJ9Rn10Ya70zKKrq8xvJxavEWSveQo3YyG4KH4HgAto +j6yOR55O2oIMb6teT5sU5vNILW4fosCdnnrEFAU69qfOLfE+FzDeZzdlYJvY13jkjGg 18uV/fAjCckFQCXGibkT5QFK0cOeMiBNKC79IGzLyr2krq+s6bAZuph1qOVz1KqEsf8Y vbSRE5dzJuaKC9XTvS7nVINUu5LvEPXyIFYwSZlBLO0oBqDH08kqhtStlVULDnDHa3j1 aifQ== 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=f/rCl/afWY1o7bGd+xkUcMPoyLhNC06xHhWkPFoy5GM=; fh=2DascdEigk5YKkI7xsPhzXnEwnq6+gHGf5jSQyJPeBg=; b=HMkEf4JKmLOmAA4gWuUBxa6eou+HcauuzanEI0yd27akqikz3DBP4PHUSnh+7hb/F8 V0/2UCxu2UX1l9b9uJi/aTnbek/gWxRLrDLV999YLDrEibs6rCptwZ6jR5pKLSPPR04c 4+ByYpnCK0rt/PyUE+Uz16a3rKAIGqHUx39lt2icoP+gfmqwXAda/k/1XEcaiU/ynYpg coOIy9kJsxchpD/jw3BImJqjY2ds26OBYcNEElDBciBnz6kWUwdQy31pezPIeJIAs5v/ bFZHOhPNpx94ney8PUo5Jh2pChfwz48JHyT/4TVCAwoXldeeHOz2W2dxtxGcK5mQjbOU 8n2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iFOLej+3; 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 x20-20020a17090300d400b001b3d6c68bd1si7169398plc.643.2023.07.31.09.27.35; Mon, 31 Jul 2023 09:27:47 -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=iFOLej+3; 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 S231855AbjGaOMt (ORCPT + 99 others); Mon, 31 Jul 2023 10:12:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231731AbjGaOMq (ORCPT ); Mon, 31 Jul 2023 10:12:46 -0400 Received: from mgamail.intel.com (unknown [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96CEBB3; Mon, 31 Jul 2023 07:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690812761; x=1722348761; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8lJQW7XtYIZJGUpSg5bDxxZ5nMixXPpf80t0cGGyY2I=; b=iFOLej+3Gi4EcqvZla2V8O8GivIhFXW062mjL1Hz1WPAJOK6oObhtYud f9eNwqfzO7IgKYKcUEHPoswLNY0DiptA0aCMDFLP2QtDxAkcTxJldOKVc CLLoBS6KqYFSOO/I8UZYa6jtBmJDTvuMlofollJbRaykBY0Gng8ZWaoGp GgKK8zTvKDSrSWS+EUVQQPw6ql/45P7OnGorOsI1+XL5MCwpXNb7QlTW6 K/EDd9sRAAlpM7v/VOTY5vs977qrKXB6NIkuc2T5I2GJvYUijvnHZlhFV JJF59oIS2ngeU+pGmjy3HhNZGDNETbys/ZRnFHi7gqDhSAjI5+LCgpv6Y Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10788"; a="455403611" X-IronPort-AV: E=Sophos;i="6.01,244,1684825200"; d="scan'208";a="455403611" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2023 07:12:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10788"; a="728324343" X-IronPort-AV: E=Sophos;i="6.01,244,1684825200"; d="scan'208";a="728324343" Received: from jkrzyszt-mobl2.ger.corp.intel.com (HELO jkrzyszt-mobl2.intranet) ([10.213.1.128]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2023 07:12:38 -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, Janusz Krzysztofik Subject: [PATCH v3 0/3] kunit: Expose some built-in features to modules Date: Mon, 31 Jul 2023 16:10:22 +0200 Message-ID: <20230731141021.2854827-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=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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. v3: Fix CONFIG_GLOB, required by filtering fuctions, not selected when building as a module. 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/Kconfig | 2 +- lib/kunit/executor.c | 57 +++++++++++++++++++++++++------------------- lib/kunit/test.c | 57 +++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 104 insertions(+), 26 deletions(-) -- 2.41.0