Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4226381rwo; Tue, 25 Jul 2023 02:44:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlHTI8x4JyeZ2YRzDbRp8SyrfM5H+QPkSg5KuqkuyYQM5d5/bCZhhrKIrG81peQZOpYoevDJ X-Received: by 2002:a05:6a20:b903:b0:136:e26b:6401 with SMTP id fe3-20020a056a20b90300b00136e26b6401mr13057248pzb.16.1690278251837; Tue, 25 Jul 2023 02:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690278251; cv=none; d=google.com; s=arc-20160816; b=exMaec55RpLM5Zyfwq7A6zYZSOuDT8cwoTGNAxkFaiTcks2Bm44Z0jFx+H9eCU0DWT swYDsGkBitmPOe+JVNrZ2B3XaOMVLL2OG20efAAcxRnzCqfVWnfs2vJQFyIy4M0qBGW8 Abqv+7bb9Byu5e7f3StT34wHoLbzHEIORExNLCriX5jN+cmK8PsIAUQn+t86ED5nxNRV 9uYt7GgBM7FRUCp7u5LStSFfHHwcQzC6s+xfXs7i+ffFzVBHf0ODxEQjaBovtP3x90vs kXBCNL780Y/tFl/xSHJmMf3P4wKKLBS1fJ49gvAYBk6M3hlPQE5S68K8qVpxWJn7nAJV 15AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DTZgKfzLHKFzwK6BjQFLwR4UK3a4zvRR5zzOh1gJjL4=; fh=L7oH5M+T1MlIwVp1Gmto8D/kSs/oJug5gdpk5/Eui40=; b=UXJZsok7vZhU1Uffxp6XursNcusHbC5WGz5fBnh0BGBFJuy931tBzDYzuLcjfkfmk7 Ur34oAyjTsIZRdk/Dzw7A0T0+4d0t2j5y8jHLTnFChM6TrhHVSJJrBMy/YsoR1kmXVnm xsg33YTkKLxyQYJ2LQNN6o0t2wkUAzgA6WH+y2qAq8ApK6QlXmuk0wsV9YHbDa66j4/Q H+ZRv1PpKtL87nCnVQZm4KGW0/K8r+pQy4y5B4rcM/tQiVw6UbCWVePVwVA0pXX1bHqg 88ieISAmFtjolQlhHbJOI93BRkMsgTiFn/IbtpDcA5ZwnSKNK/GUs00wXj05wcU3X1mK xKOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=pnKhrQD+; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p10-20020a056a000b4a00b0065dba8cc3a6si11860484pfo.376.2023.07.25.02.43.59; Tue, 25 Jul 2023 02:44:11 -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=@google.com header.s=20221208 header.b=pnKhrQD+; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230331AbjGYIoI (ORCPT + 99 others); Tue, 25 Jul 2023 04:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233110AbjGYInh (ORCPT ); Tue, 25 Jul 2023 04:43:37 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14B312688 for ; Tue, 25 Jul 2023 01:42:37 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fbb07e7155so58625e9.0 for ; Tue, 25 Jul 2023 01:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690274555; x=1690879355; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DTZgKfzLHKFzwK6BjQFLwR4UK3a4zvRR5zzOh1gJjL4=; b=pnKhrQD+J7n9aixTtaigFA2CdbB3rPSUAcEbiAts3kWsgY+aqZ25Hkmriotepl/KLs q2FeE+rLMWBqFnIlhDL7sd38XUpk3WAuIadYfnecn1+V7KRpsL36VSWrBH07TK87YGtz qpEkQk7rWqQPep7PpsIVA13wCghPNmvnBPB1GUyWu7qSUKIt332Fxr0spr34fGDDTvbY nMmoVgTT/KVQQS2EArinnI6klVnoxJuF2zcb0CrD2tAxPATQ+RR4vnf/mw+Veg0IxOtV MHxzbcIURegyCUo2OE/pBt032La+EQ7zxxhzOP8kPaWxY7eAiThZUIQgcHTM812NUirQ dgEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690274555; x=1690879355; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DTZgKfzLHKFzwK6BjQFLwR4UK3a4zvRR5zzOh1gJjL4=; b=YFX95SspuB5hILK00/bDc0M97phCMKrXttMUmLTsb1H3c4pkxxKK3c6hQLL6JCgLqJ wntr/UyF8tZOUKwU4hK5y9f+ion3oQZ0w0O9taZkmZDF5+XOEH0u8KcMKbBXOx3BNFXS /Bj5Y6nLsV9mvxoYwsOWTVYFckPBmYisApCCjZrdoM4iw9dSE2pH/vJhdkWlohjyE/RQ JwNVNIPUXMP6mcl7WqZJHtGfQacy0E1vQg0F8p9TnJcaTK71dT0Cm6HhyvBoe8UDcjyP cRMj+GB2bSsjJk3LBJIE5pD6QksA5AuKe+9u7ua7BZWewq5r9TVtwH2yURboB+5SXaEp aVvQ== X-Gm-Message-State: ABy/qLag6QAAzvz95eB5+mCwjs7MZh2cz1MW3YEjSYP8MBZJMJqXqCAG 5vHysKwHvgsFU6RIHFdK3/y3RQ/iwWS30mbpx1JwsQ== X-Received: by 2002:a7b:cd93:0:b0:3f6:f4b:d4a6 with SMTP id y19-20020a7bcd93000000b003f60f4bd4a6mr33475wmj.7.1690274555439; Tue, 25 Jul 2023 01:42:35 -0700 (PDT) MIME-Version: 1.0 References: <20230724162834.1354164-1-rmoar@google.com> <20230724162834.1354164-6-rmoar@google.com> In-Reply-To: <20230724162834.1354164-6-rmoar@google.com> From: David Gow Date: Tue, 25 Jul 2023 16:42:23 +0800 Message-ID: Subject: Re: [PATCH v2 5/9] kunit: tool: Add command line interface to filter and report attributes To: Rae Moar Cc: shuah@kernel.org, dlatypov@google.com, brendan.higgins@linux.dev, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, keescook@chromium.org, linux-hardening@vger.kernel.org, jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000078e55206014bb624" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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 --00000000000078e55206014bb624 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 25 Jul 2023 at 00:30, Rae Moar wrote: > > Add ability to kunit.py to filter attributes and report a list of tests > including attributes without running tests. > > Add flag "--filter" to input filters on test attributes. Tests will be > filtered out if they do not match all inputted filters. > > Example: --filter speed=3Dslow (This filter would run only the tests that= are > marked as slow) > > Filters have operations: <, >, <=3D, >=3D, !=3D, and =3D. But note that t= he > characters < and > are often interpreted by the shell, so they may need t= o > be quoted or escaped. > > Example: --filter "speed>slow" or --filter speed\>slow (This filter would > run only the tests that have the speed faster than slow. > > Additionally, multiple filters can be used. > > Example: --filter "speed=3Dslow, module!=3Dexample" (This filter would ru= n > only the tests that have the speed slow and are not in the "example" > module) > > Note if the user wants to skip filtered tests instead of not > running/showing them use the "--filter_action=3Dskip" flag. > > Expose the output of kunit.action=3Dlist option with flag "--list_tests" = to > output a list of tests. Additionally, add flag "--list_tests_attr" to > output a list of tests and their attributes. These flags are useful to se= e > tests and test attributes without needing to run tests. > > Example of the output of "--list_tests_attr": > example > example.test_1 > example.test_2 > # example.test_2.speed: slow > > This output includes a suite, example, with two test cases, test_1 and > test_2. And in this instance test_2 has been marked as slow. > > Signed-off-by: Rae Moar > --- Looks good, working well here. Reviewed-by: David Gow -- David > > Changes since v1: > - No major changes > > Changes since RFC v2: > - Remove --filter_skip flag and replace with =E2=80=93-filter_action > - Make KUnit executor errors visible in kunit.py and raw_output > - Fix up help comments > > Changes since RFC v1: > - Change method for inputting filters to allow for spaces in filtering > values > - Add option to skip filtered tests instead of not run or show them with > the -=E2=80=93filter_skip flag > - Separate the new feature to list tests and their attributes into both > =E2=80=93-list_tests (lists just tests) and =E2=80=93-list_tests_attr (= lists all) > > tools/testing/kunit/kunit.py | 70 ++++++++++++++++++++++++-- > tools/testing/kunit/kunit_kernel.py | 8 ++- > tools/testing/kunit/kunit_parser.py | 11 +++- > tools/testing/kunit/kunit_tool_test.py | 39 +++++++------- > 4 files changed, 99 insertions(+), 29 deletions(-) > > diff --git a/tools/testing/kunit/kunit.py b/tools/testing/kunit/kunit.py > index 3905c43369c3..bc74088c458a 100755 > --- a/tools/testing/kunit/kunit.py > +++ b/tools/testing/kunit/kunit.py > @@ -55,8 +55,12 @@ class KunitExecRequest(KunitParseRequest): > build_dir: str > timeout: int > filter_glob: str > + filter: str > + filter_action: Optional[str] > kernel_args: Optional[List[str]] > run_isolated: Optional[str] > + list_tests: bool > + list_tests_attr: bool > > @dataclass > class KunitRequest(KunitExecRequest, KunitBuildRequest): > @@ -102,19 +106,41 @@ def config_and_build_tests(linux: kunit_kernel.Linu= xSourceTree, > > def _list_tests(linux: kunit_kernel.LinuxSourceTree, request: KunitExecR= equest) -> List[str]: > args =3D ['kunit.action=3Dlist'] > + > + if request.kernel_args: > + args.extend(request.kernel_args) > + > + output =3D linux.run_kernel(args=3Dargs, > + timeout=3Drequest.timeout, > + filter_glob=3Drequest.filter_glob, > + filter=3Drequest.filter, > + filter_action=3Drequest.filter_action, > + build_dir=3Drequest.build_dir) > + lines =3D kunit_parser.extract_tap_lines(output) > + # Hack! Drop the dummy TAP version header that the executor print= s out. > + lines.pop() > + > + # Filter out any extraneous non-test output that might have gotte= n mixed in. > + return [l for l in output if re.match(r'^[^\s.]+\.[^\s.]+$', l)] > + > +def _list_tests_attr(linux: kunit_kernel.LinuxSourceTree, request: Kunit= ExecRequest) -> Iterable[str]: > + args =3D ['kunit.action=3Dlist_attr'] > + > if request.kernel_args: > args.extend(request.kernel_args) > > output =3D linux.run_kernel(args=3Dargs, > timeout=3Drequest.timeout, > filter_glob=3Drequest.filter_glob, > + filter=3Drequest.filter, > + filter_action=3Drequest.filter_action, > build_dir=3Drequest.build_dir) > lines =3D kunit_parser.extract_tap_lines(output) > # Hack! Drop the dummy TAP version header that the executor print= s out. > lines.pop() > > # Filter out any extraneous non-test output that might have gotte= n mixed in. > - return [l for l in lines if re.match(r'^[^\s.]+\.[^\s.]+$', l)] > + return lines > > def _suites_from_test_list(tests: List[str]) -> List[str]: > """Extracts all the suites from an ordered list of tests.""" > @@ -128,10 +154,18 @@ def _suites_from_test_list(tests: List[str]) -> Lis= t[str]: > suites.append(suite) > return suites > > - > - > def exec_tests(linux: kunit_kernel.LinuxSourceTree, request: KunitExecRe= quest) -> KunitResult: > filter_globs =3D [request.filter_glob] > + if request.list_tests: > + output =3D _list_tests(linux, request) > + for line in output: > + print(line.rstrip()) > + return KunitResult(status=3DKunitStatus.SUCCESS, elapsed_= time=3D0.0) > + if request.list_tests_attr: > + attr_output =3D _list_tests_attr(linux, request) > + for line in attr_output: > + print(line.rstrip()) > + return KunitResult(status=3DKunitStatus.SUCCESS, elapsed_= time=3D0.0) > if request.run_isolated: > tests =3D _list_tests(linux, request) > if request.run_isolated =3D=3D 'test': > @@ -155,6 +189,8 @@ def exec_tests(linux: kunit_kernel.LinuxSourceTree, r= equest: KunitExecRequest) - > args=3Drequest.kernel_args, > timeout=3Drequest.timeout, > filter_glob=3Dfilter_glob, > + filter=3Drequest.filter, > + filter_action=3Drequest.filter_action, > build_dir=3Drequest.build_dir) > > _, test_result =3D parse_tests(request, metadata, run_res= ult) > @@ -341,6 +377,16 @@ def add_exec_opts(parser: argparse.ArgumentParser) -= > None: > nargs=3D'?', > default=3D'', > metavar=3D'filter_glob') > + parser.add_argument('--filter', > + help=3D'Filter KUnit tests with attributes, ' > + 'e.g. module=3Dexample or speed>slow', > + type=3Dstr, > + default=3D'') > + parser.add_argument('--filter_action', > + help=3D'If set to skip, filtered tests will b= e skipped, ' > + 'e.g. --filter_action=3Dskip. Otherwise t= hey will not run.', > + type=3Dstr, > + choices=3D['skip']) > parser.add_argument('--kernel_args', > help=3D'Kernel command-line parameters. Maybe= be repeated', > action=3D'append', metavar=3D'') > @@ -350,6 +396,12 @@ def add_exec_opts(parser: argparse.ArgumentParser) -= > None: > 'what ran before it.', > type=3Dstr, > choices=3D['suite', 'test']) > + parser.add_argument('--list_tests', help=3D'If set, list all test= s that will be ' > + 'run.', > + action=3D'store_true') > + parser.add_argument('--list_tests_attr', help=3D'If set, list all= tests and test ' > + 'attributes.', > + action=3D'store_true') > > def add_parse_opts(parser: argparse.ArgumentParser) -> None: > parser.add_argument('--raw_output', help=3D'If set don\'t parse o= utput from kernel. ' > @@ -398,8 +450,12 @@ def run_handler(cli_args: argparse.Namespace) -> Non= e: > json=3Dcli_args.json, > timeout=3Dcli_args.timeout, > filter_glob=3Dcli_args.filter_glo= b, > + filter=3Dcli_args.filter, > + filter_action=3Dcli_args.filter_a= ction, > kernel_args=3Dcli_args.kernel_arg= s, > - run_isolated=3Dcli_args.run_isola= ted) > + run_isolated=3Dcli_args.run_isola= ted, > + list_tests=3Dcli_args.list_tests, > + list_tests_attr=3Dcli_args.list_t= ests_attr) > result =3D run_tests(linux, request) > if result.status !=3D KunitStatus.SUCCESS: > sys.exit(1) > @@ -441,8 +497,12 @@ def exec_handler(cli_args: argparse.Namespace) -> No= ne: > json=3Dcli_args.json, > timeout=3Dcli_args.timeout, > filter_glob=3Dcli_args.filter_glo= b, > + filter=3Dcli_args.filter, > + filter_action=3Dcli_args.filter_a= ction, > kernel_args=3Dcli_args.kernel_arg= s, > - run_isolated=3Dcli_args.run_isola= ted) > + run_isolated=3Dcli_args.run_isola= ted, > + list_tests=3Dcli_args.list_tests, > + list_tests_attr=3Dcli_args.list_t= ests_attr) > result =3D exec_tests(linux, exec_request) > stdout.print_with_timestamp(( > 'Elapsed time: %.3fs\n') % (result.elapsed_time)) > diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/ku= nit_kernel.py > index 7f648802caf6..0b6488efed47 100644 > --- a/tools/testing/kunit/kunit_kernel.py > +++ b/tools/testing/kunit/kunit_kernel.py > @@ -330,11 +330,15 @@ class LinuxSourceTree: > return False > return self.validate_config(build_dir) > > - def run_kernel(self, args: Optional[List[str]]=3DNone, build_dir:= str=3D'', filter_glob: str=3D'', timeout: Optional[int]=3DNone) -> Iterato= r[str]: > + def run_kernel(self, args: Optional[List[str]]=3DNone, build_dir:= str=3D'', filter_glob: str=3D'', filter: str=3D'', filter_action: Optional= [str]=3DNone, timeout: Optional[int]=3DNone) -> Iterator[str]: > if not args: > args =3D [] > if filter_glob: > - args.append('kunit.filter_glob=3D'+filter_glob) > + args.append('kunit.filter_glob=3D' + filter_glob) > + if filter: > + args.append('kunit.filter=3D"' + filter + '"') > + if filter_action: > + args.append('kunit.filter_action=3D' + filter_act= ion) > args.append('kunit.enable=3D1') > > process =3D self._ops.start(args, build_dir) > diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/ku= nit_parser.py > index fbc094f0567e..79d8832c862a 100644 > --- a/tools/testing/kunit/kunit_parser.py > +++ b/tools/testing/kunit/kunit_parser.py > @@ -212,6 +212,7 @@ KTAP_START =3D re.compile(r'\s*KTAP version ([0-9]+)$= ') > TAP_START =3D re.compile(r'\s*TAP version ([0-9]+)$') > KTAP_END =3D re.compile(r'\s*(List of all partitions:|' > 'Kernel panic - not syncing: VFS:|reboot: System halted)') > +EXECUTOR_ERROR =3D re.compile(r'\s*kunit executor: (.*)$') > > def extract_tap_lines(kernel_output: Iterable[str]) -> LineStream: > """Extracts KTAP lines from the kernel output.""" > @@ -242,6 +243,8 @@ def extract_tap_lines(kernel_output: Iterable[str]) -= > LineStream: > # remove the prefix, if any. > line =3D line[prefix_len:] > yield line_num, line > + elif EXECUTOR_ERROR.search(line): > + yield line_num, line > return LineStream(lines=3Disolate_ktap_output(kernel_output)) > > KTAP_VERSIONS =3D [1] > @@ -447,7 +450,7 @@ def parse_diagnostic(lines: LineStream) -> List[str]: > Log of diagnostic lines > """ > log =3D [] # type: List[str] > - non_diagnostic_lines =3D [TEST_RESULT, TEST_HEADER, KTAP_START] > + non_diagnostic_lines =3D [TEST_RESULT, TEST_HEADER, KTAP_START, T= AP_START] > while lines and not any(re.match(lines.peek()) > for re in non_diagnostic_lines): > log.append(lines.pop()) > @@ -713,6 +716,11 @@ def parse_test(lines: LineStream, expected_num: int,= log: List[str], is_subtest: > """ > test =3D Test() > test.log.extend(log) > + > + # Parse any errors prior to parsing tests > + err_log =3D parse_diagnostic(lines) > + test.log.extend(err_log) > + > if not is_subtest: > # If parsing the main/top-level test, parse KTAP version = line and > # test plan > @@ -774,6 +782,7 @@ def parse_test(lines: LineStream, expected_num: int, = log: List[str], is_subtest: > # Don't override a bad status if this test had one report= ed. > # Assumption: no subtests means CRASHED is from Test.__in= it__() > if test.status in (TestStatus.TEST_CRASHED, TestStatus.SU= CCESS): > + print_log(test.log) > test.status =3D TestStatus.NO_TESTS > test.add_error('0 tests run!') > > diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit= /kunit_tool_test.py > index be35999bb84f..b28c1510be2e 100755 > --- a/tools/testing/kunit/kunit_tool_test.py > +++ b/tools/testing/kunit/kunit_tool_test.py > @@ -597,7 +597,7 @@ class KUnitMainTest(unittest.TestCase): > self.assertEqual(self.linux_source_mock.build_reconfig.ca= ll_count, 0) > self.assertEqual(self.linux_source_mock.run_kernel.call_c= ount, 1) > self.linux_source_mock.run_kernel.assert_called_once_with= ( > - args=3DNone, build_dir=3D'.kunit', filter_glob=3D= '', timeout=3D300) > + args=3DNone, build_dir=3D'.kunit', filter_glob=3D= '', filter=3D'', filter_action=3DNone, timeout=3D300) > self.print_mock.assert_any_call(StrContains('Testing comp= lete.')) > > def test_run_passes_args_pass(self): > @@ -605,7 +605,7 @@ class KUnitMainTest(unittest.TestCase): > self.assertEqual(self.linux_source_mock.build_reconfig.ca= ll_count, 1) > self.assertEqual(self.linux_source_mock.run_kernel.call_c= ount, 1) > self.linux_source_mock.run_kernel.assert_called_once_with= ( > - args=3DNone, build_dir=3D'.kunit', filter_glob=3D= '', timeout=3D300) > + args=3DNone, build_dir=3D'.kunit', filter_glob=3D= '', filter=3D'', filter_action=3DNone, timeout=3D300) > self.print_mock.assert_any_call(StrContains('Testing comp= lete.')) > > def test_exec_passes_args_fail(self): > @@ -629,7 +629,7 @@ class KUnitMainTest(unittest.TestCase): > kunit.main(['run']) > self.assertEqual(e.exception.code, 1) > self.linux_source_mock.run_kernel.assert_called_once_with= ( > - args=3DNone, build_dir=3D'.kunit', filter_glob=3D= '', timeout=3D300) > + args=3DNone, build_dir=3D'.kunit', filter_glob=3D= '', filter=3D'', filter_action=3DNone, timeout=3D300) > self.print_mock.assert_any_call(StrContains(' 0 tests run= !')) > > def test_exec_raw_output(self): > @@ -670,13 +670,13 @@ class KUnitMainTest(unittest.TestCase): > self.linux_source_mock.run_kernel =3D mock.Mock(return_va= lue=3D[]) > kunit.main(['run', '--raw_output', 'filter_glob']) > self.linux_source_mock.run_kernel.assert_called_once_with= ( > - args=3DNone, build_dir=3D'.kunit', filter_glob=3D= 'filter_glob', timeout=3D300) > + args=3DNone, build_dir=3D'.kunit', filter_glob=3D= 'filter_glob', filter=3D'', filter_action=3DNone, timeout=3D300) > > def test_exec_timeout(self): > timeout =3D 3453 > kunit.main(['exec', '--timeout', str(timeout)]) > self.linux_source_mock.run_kernel.assert_called_once_with= ( > - args=3DNone, build_dir=3D'.kunit', filter_glob=3D= '', timeout=3Dtimeout) > + args=3DNone, build_dir=3D'.kunit', filter_glob=3D= '', filter=3D'', filter_action=3DNone, timeout=3Dtimeout) > self.print_mock.assert_any_call(StrContains('Testing comp= lete.')) > > def test_run_timeout(self): > @@ -684,7 +684,7 @@ class KUnitMainTest(unittest.TestCase): > kunit.main(['run', '--timeout', str(timeout)]) > self.assertEqual(self.linux_source_mock.build_reconfig.ca= ll_count, 1) > self.linux_source_mock.run_kernel.assert_called_once_with= ( > - args=3DNone, build_dir=3D'.kunit', filter_glob=3D= '', timeout=3Dtimeout) > + args=3DNone, build_dir=3D'.kunit', filter_glob=3D= '', filter=3D'', filter_action=3DNone, timeout=3Dtimeout) > self.print_mock.assert_any_call(StrContains('Testing comp= lete.')) > > def test_run_builddir(self): > @@ -692,7 +692,7 @@ class KUnitMainTest(unittest.TestCase): > kunit.main(['run', '--build_dir=3D.kunit']) > self.assertEqual(self.linux_source_mock.build_reconfig.ca= ll_count, 1) > self.linux_source_mock.run_kernel.assert_called_once_with= ( > - args=3DNone, build_dir=3Dbuild_dir, filter_glob= =3D'', timeout=3D300) > + args=3DNone, build_dir=3Dbuild_dir, filter_glob= =3D'', filter=3D'', filter_action=3DNone, timeout=3D300) > self.print_mock.assert_any_call(StrContains('Testing comp= lete.')) > > def test_config_builddir(self): > @@ -710,7 +710,7 @@ class KUnitMainTest(unittest.TestCase): > build_dir =3D '.kunit' > kunit.main(['exec', '--build_dir', build_dir]) > self.linux_source_mock.run_kernel.assert_called_once_with= ( > - args=3DNone, build_dir=3Dbuild_dir, filter_glob= =3D'', timeout=3D300) > + args=3DNone, build_dir=3Dbuild_dir, filter_glob= =3D'', filter=3D'', filter_action=3DNone, timeout=3D300) > self.print_mock.assert_any_call(StrContains('Testing comp= lete.')) > > def test_run_kunitconfig(self): > @@ -786,7 +786,7 @@ class KUnitMainTest(unittest.TestCase): > kunit.main(['run', '--kernel_args=3Da=3D1', '--kernel_arg= s=3Db=3D2']) > self.assertEqual(self.linux_source_mock.build_reconfig.ca= ll_count, 1) > self.linux_source_mock.run_kernel.assert_called_once_with= ( > - args=3D['a=3D1','b=3D2'], build_dir=3D'.kunit', fil= ter_glob=3D'', timeout=3D300) > + args=3D['a=3D1','b=3D2'], build_dir=3D'.kunit', fil= ter_glob=3D'', filter=3D'', filter_action=3DNone, timeout=3D300) > self.print_mock.assert_any_call(StrContains('Testing comp= lete.')) > > def test_list_tests(self): > @@ -794,13 +794,11 @@ class KUnitMainTest(unittest.TestCase): > self.linux_source_mock.run_kernel.return_value =3D ['TAP = version 14', 'init: random output'] + want > > got =3D kunit._list_tests(self.linux_source_mock, > - kunit.KunitExecRequest(None, None, '= .kunit', 300, 'suite*', None, 'suite')) > - > + kunit.KunitExecRequest(None, None, '= .kunit', 300, 'suite*', '', None, None, 'suite', False, False)) > self.assertEqual(got, want) > # Should respect the user's filter glob when listing test= s. > self.linux_source_mock.run_kernel.assert_called_once_with= ( > - args=3D['kunit.action=3Dlist'], build_dir=3D'.kun= it', filter_glob=3D'suite*', timeout=3D300) > - > + args=3D['kunit.action=3Dlist'], build_dir=3D'.kun= it', filter_glob=3D'suite*', filter=3D'', filter_action=3DNone, timeout=3D3= 00) > > @mock.patch.object(kunit, '_list_tests') > def test_run_isolated_by_suite(self, mock_tests): > @@ -809,10 +807,10 @@ class KUnitMainTest(unittest.TestCase): > > # Should respect the user's filter glob when listing test= s. > mock_tests.assert_called_once_with(mock.ANY, > - kunit.KunitExecRequest(None, None, '= .kunit', 300, 'suite*.test*', None, 'suite')) > + kunit.KunitExecRequest(None, None, '= .kunit', 300, 'suite*.test*', '', None, None, 'suite', False, False)) > self.linux_source_mock.run_kernel.assert_has_calls([ > - mock.call(args=3DNone, build_dir=3D'.kunit', filt= er_glob=3D'suite.test*', timeout=3D300), > - mock.call(args=3DNone, build_dir=3D'.kunit', filt= er_glob=3D'suite2.test*', timeout=3D300), > + mock.call(args=3DNone, build_dir=3D'.kunit', filt= er_glob=3D'suite.test*', filter=3D'', filter_action=3DNone, timeout=3D300), > + mock.call(args=3DNone, build_dir=3D'.kunit', filt= er_glob=3D'suite2.test*', filter=3D'', filter_action=3DNone, timeout=3D300)= , > ]) > > @mock.patch.object(kunit, '_list_tests') > @@ -822,13 +820,12 @@ class KUnitMainTest(unittest.TestCase): > > # Should respect the user's filter glob when listing test= s. > mock_tests.assert_called_once_with(mock.ANY, > - kunit.KunitExecRequest(None, None, '= .kunit', 300, 'suite*', None, 'test')) > + kunit.KunitExecRequest(None, None, '= .kunit', 300, 'suite*', '', None, None, 'test', False, False)) > self.linux_source_mock.run_kernel.assert_has_calls([ > - mock.call(args=3DNone, build_dir=3D'.kunit', filt= er_glob=3D'suite.test1', timeout=3D300), > - mock.call(args=3DNone, build_dir=3D'.kunit', filt= er_glob=3D'suite.test2', timeout=3D300), > - mock.call(args=3DNone, build_dir=3D'.kunit', filt= er_glob=3D'suite2.test1', timeout=3D300), > + mock.call(args=3DNone, build_dir=3D'.kunit', filt= er_glob=3D'suite.test1', filter=3D'', filter_action=3DNone, timeout=3D300), > + mock.call(args=3DNone, build_dir=3D'.kunit', filt= er_glob=3D'suite.test2', filter=3D'', filter_action=3DNone, timeout=3D300), > + mock.call(args=3DNone, build_dir=3D'.kunit', filt= er_glob=3D'suite2.test1', filter=3D'', filter_action=3DNone, timeout=3D300)= , > ]) > > - > if __name__ =3D=3D '__main__': > unittest.main() > -- > 2.41.0.487.g6d72f3e995-goog > --00000000000078e55206014bb624 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIPnwYJKoZIhvcNAQcCoIIPkDCCD4wCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ggz5MIIEtjCCA56gAwIBAgIQeAMYYHb81ngUVR0WyMTzqzANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA3MjgwMDAwMDBaFw0yOTAzMTgwMDAwMDBaMFQxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSowKAYDVQQDEyFHbG9iYWxTaWduIEF0bGFz IFIzIFNNSU1FIENBIDIwMjAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvLe9xPU9W dpiHLAvX7kFnaFZPuJLey7LYaMO8P/xSngB9IN73mVc7YiLov12Fekdtn5kL8PjmDBEvTYmWsuQS 6VBo3vdlqqXZ0M9eMkjcKqijrmDRleudEoPDzTumwQ18VB/3I+vbN039HIaRQ5x+NHGiPHVfk6Rx c6KAbYceyeqqfuJEcq23vhTdium/Bf5hHqYUhuJwnBQ+dAUcFndUKMJrth6lHeoifkbw2bv81zxJ I9cvIy516+oUekqiSFGfzAqByv41OrgLV4fLGCDH3yRh1tj7EtV3l2TngqtrDLUs5R+sWIItPa/4 AJXB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