Skip to contentSkip to conversation

scripts/test_list.py: make filtering logic more generic

PATCH Superseded Mauro Carvalho Chehab 2 participants 2 messages Apr 4, 2023

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/test_list.py: make filtering logic more generic

From: Mauro Carvalho Chehab <[email protected]>

Allow multiple filter filters and filter also print outputs, except for the json one.

After the patch, applying multiple filters and display per-test documentation, for instance, could be done with commands like:

  ./scripts/igt_doc.py --config tests/xe/*.json --filter-field \
	 Sub-category=~execbuf run\ type=~bat --per-test

The filter will now be applied to all possible outputs of the script.

---
 scripts/igt_doc.py   | 12 ++++--
 scripts/test_list.py | 89 +++++++++++++++++++++++++++++++-------------
 2 files changed, 72 insertions(+), 29 deletions(-)
scripts/igt_doc.py +8 -4
index 547cb81bce02..4af0f045d13d 100755
@@ -32,8 +32,8 @@ parser.add_argument("--show-subtests", action="store_true",
                     help="Shows the name of the documented subtests in alphabetical order.")
 parser.add_argument("--sort-field",
                     help="modify --show-subtests to sort output based on SORT_FIELD value")
-parser.add_argument("--filter-field",
-                    help="modify --show-subtests to filter output based a regex given by FILTER_FIELD=~'regex'")
+parser.add_argument("--filter-field", nargs='*',
+                    help="filter subtests based on regular expressions given by FILTER_FIELD=~'regex'")
 parser.add_argument("--check-testlist", action="store_true",
                     help="Compare documentation against IGT runner testlist.")
 parser.add_argument("--include-plan", action="store_true",
@@ -54,10 +54,14 @@ parse_args = parser.parse_args()
 tests = TestList(parse_args.config, parse_args.include_plan, parse_args.files,
                  parse_args.igt_build_path, parse_args.igt_runner)
 
+if parse_args.filter_field:
+    for filter_expr in parse_args.filter_field:
+        tests.add_filter(filter_expr)
+
 RUN = 0
 if parse_args.show_subtests:
     RUN = 1
-    tests.show_subtests(parse_args.sort_field, parse_args.filter_field)
+    tests.show_subtests(parse_args.sort_field)
 
 if parse_args.check_testlist:
     RUN = 1
@@ -67,7 +71,7 @@ if parse_args.gen_testlist:
     RUN = 1
     if not parse_args.sort_field:
         sys.exit("Need a field to split the testlists")
-    tests.gen_testlist(parse_args.gen_testlist, parse_args.sort_field, parse_args.filter_field)
+    tests.gen_testlist(parse_args.gen_testlist, parse_args.sort_field)
 
 if parse_args.to_json:
     RUN = 1
scripts/test_list.py +64 -25

178 lines not on this page · raw message

Signature · 1 line
2.39.2
#1 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for scripts/test_list.py: make filtering logic more generic

== Series Details ==

== Series Details ==

Series: scripts/test_list.py: make filtering logic more generic
URL : https://patchwork.freedesktop.org/series/116098/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12965 -> IGTPW_8753
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_8753 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_8753, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/index.html

Participating hosts (38 -> 36)
------------------------------

Missing (2): fi-kbl-soraka fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_8753:

### IGT changes ###

#### Possible regressions ####

* igt@i915_module_load@reload:
- bat-jsl-3: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12965/bat-jsl-3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/bat-jsl-3/igt@[email protected]

Known issues
------------

Here are the changes found in IGTPW_8753 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@slpc:
- bat-rpls-2: NOTRUN -> [DMESG-FAIL][3] ([i915#6997] / [i915#7913])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-rpls-2: NOTRUN -> [SKIP][4] ([i915#7828])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/bat-rpls-2/igt@[email protected]
- bat-dg2-11: NOTRUN -> [SKIP][5] ([i915#7828])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/bat-dg2-11/igt@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][6] ([i915#5354])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/bat-dg2-11/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-rpls-2: NOTRUN -> [SKIP][7] ([i915#1845])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/bat-rpls-2/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [DMESG-FAIL][8] ([i915#5334]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12965/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@gt_lrc:
- bat-dg2-11: [INCOMPLETE][10] ([i915#7609] / [i915#7913]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12965/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html

* igt@i915_selftest@live@requests:
- bat-rpls-2: [ABORT][12] ([i915#4983] / [i915#7913]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12965/bat-rpls-2/igt@i915_selftest@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/bat-rpls-2/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_selftest@live@requests:
- bat-rpls-1: [ABORT][14] ([i915#4983] / [i915#7911]) -> [ABORT][15] ([i915#7911] / [i915#7982])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12965/bat-rpls-1/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/bat-rpls-1/igt@i915_selftest@[email protected]

[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7609]: https://gitlab.freedesktop.org/drm/intel/issues/7609
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7982]: https://gitlab.freedesktop.org/drm/intel/issues/7982

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_7236 -> IGTPW_8753

CI-20190529: 20190529
CI_DRM_12965: 53e37ca502cfe620396e498fae8430c293fb2c83 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8753: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/index.html
IGT_7236: bac5a4cc31b3212a205219a6cbc45a173d30d04b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8753/index.html