Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: tomasz.mistat@intel.com, jari.tahvanainen@intel.com
Subject: [igt-dev] [PATCH i-g-t v3 7/7] scripts/test_list.py: don't be greedy while matching data from testlists
Date: Thu,  7 Sep 2023 12:17:38 +0200	[thread overview]
Message-ID: <20230907101852.522819-8-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20230907101852.522819-1-mauro.chehab@linux.intel.com>

From: Mauro Carvalho Chehab <mchehab@kernel.org>

Testlist regexes are not greedy: despite not containing a $ at the
end, they stop parsing at the end of string - well, sort of.

The way IGT runner handles it is that, if the strings matches
something like:

	igt@test

It will apply the testlist/blacklist to all subtests that belong
to test, e. g. igt@test@subtest will also match. However,
igt@test2 won't match.

 So, the actual regular expression for it should be:

	igt@test(\@.*)?$

Honour that, doing the same logic as IGT runner does.

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 scripts/test_list.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/test_list.py b/scripts/test_list.py
index bd03fcfc7efd..e339334cfbf6 100644
--- a/scripts/test_list.py
+++ b/scripts/test_list.py
@@ -457,6 +457,8 @@ class TestList:
                 if match:
                     test = match.group(1)
                     subtest = match.group(2)
+                    if not subtest.endswith("$"):
+                        subtest += r"(\@.*)?$"
                     testlist[name].append(re.compile(f"{test}{subtest}"))
 
     def __filter_subtest(self, test, subtest, field_not_found_value):
-- 
2.41.0

  parent reply	other threads:[~2023-09-07 10:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 10:17 [igt-dev] [PATCH i-g-t v3 0/7] Xe: set Run type from testlist instead of defining it Mauro Carvalho Chehab
2023-09-07 10:17 ` [igt-dev] [PATCH i-g-t v3 1/7] test_list.py: add support for reading testlist regular expressions Mauro Carvalho Chehab
2023-09-07 12:19   ` Kamil Konieczny
2023-09-08  8:14     ` Mauro Carvalho Chehab
2023-09-07 10:17 ` [igt-dev] [PATCH i-g-t v3 2/7] xe_test_config.json: add testlists and blocklists Mauro Carvalho Chehab
2023-09-07 12:39   ` Kamil Konieczny
2023-09-07 10:17 ` [igt-dev] [PATCH i-g-t v3 3/7] kms_test_config.json: " Mauro Carvalho Chehab
2023-09-07 12:42   ` Kamil Konieczny
2023-09-07 10:17 ` [igt-dev] [PATCH i-g-t v3 4/7] tests: Intel Xe: drop Run type field Mauro Carvalho Chehab
2023-09-07 10:17 ` [igt-dev] [PATCH i-g-t v3 5/7] tests: Intel KMS: " Mauro Carvalho Chehab
2023-09-07 12:47   ` Kamil Konieczny
2023-09-07 10:17 ` [igt-dev] [PATCH i-g-t v3 6/7] scripts/test_list.py: move "FULL" testlist to config file Mauro Carvalho Chehab
2023-09-07 13:09   ` Kamil Konieczny
2023-09-08  8:20     ` Mauro Carvalho Chehab
2023-09-07 10:17 ` Mauro Carvalho Chehab [this message]
2023-09-07 11:21 ` [igt-dev] ✗ Fi.CI.BAT: failure for Xe: set Run type from testlist instead of defining it Patchwork
2023-09-07 11:53 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230907101852.522819-8-mauro.chehab@linux.intel.com \
    --to=mauro.chehab@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jari.tahvanainen@intel.com \
    --cc=tomasz.mistat@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox