Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH v1 1/1] runltp: Enable POSIX regex support for SKIPFILE (-S)
@ 2025-05-27  7:27 Jan Polensky
  2025-05-27  7:50 ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Polensky @ 2025-05-27  7:27 UTC (permalink / raw)
  To: ltp

Enhance the SKIPFILE (-S) option to support POSIX regular expressions, allowing
users to skip groups of tests using concise patterns instead of listing each
test individually.

Previous usage:
	cat > skip_file <<-EOF
		oom01  # reason foo
		oom03  # reason foo
		oom04  # reason foo
		oom05  # reason foo
		special_a # reason bar
		special_b # reason bar
	EOF

New usage:
	echo > skip_file <<-EOF
		oom0[13-5]  # reason foo
		spe.* # reason bar
	EOF

Note: The previous behavior remains fully supported for backward compatibility.

Signed-off-by: Jan Polensky <japo@linux.ibm.com>
---
 runltp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/runltp b/runltp
index 0d9062569141..c535775f2568 100755
--- a/runltp
+++ b/runltp
@@ -166,7 +166,7 @@ usage()
     -r LTPROOT      Fully qualified path where testsuite is installed.
     -R              Randomize test order.
     -s PATTERN      Only run test cases which match PATTERN.
-    -S SKIPFILE     Skip tests specified in SKIPFILE
+    -S SKIPFILE     Skip tests matching PATTERNs listed in SKIPFILE.
     -t DURATION     Execute the testsuite for given duration. Examples:
                       -t 60s = 60 seconds
                       -t 45m = 45 minutes
@@ -648,9 +648,9 @@ EOF

     # Blacklist or skip tests if a SKIPFILE was specified with -S
     if [ -n "${SKIPFILE}" ]; then
-        for test_name in $(awk '{print $1}' "${SKIPFILE}"); do
+        for test_name in $(awk '{gsub(/\./, "[^[:space:]]", $1); print $1}' "${SKIPFILE}"); do
             case "${test_name}" in \#*) continue;; esac
-            sed -i "/\<${test_name}\>/c\\${test_name} exit 32;" alltests
+            sed -i "s#\<\(${test_name}\)\>.*#\1 exit 32;#" alltests
         done
     fi

--
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH v1 1/1] runltp: Enable POSIX regex support for SKIPFILE (-S)
  2025-05-27  7:27 [LTP] [PATCH v1 1/1] runltp: Enable POSIX regex support for SKIPFILE (-S) Jan Polensky
@ 2025-05-27  7:50 ` Cyril Hrubis
  2025-05-27  9:36   ` Petr Vorel
  0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2025-05-27  7:50 UTC (permalink / raw)
  To: Jan Polensky; +Cc: ltp

Hi!
The runltp script is going to be removed soon, please switch to kirk
that is going to replace it.

https://github.com/linux-test-project/kirk

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH v1 1/1] runltp: Enable POSIX regex support for SKIPFILE (-S)
  2025-05-27  7:50 ` Cyril Hrubis
@ 2025-05-27  9:36   ` Petr Vorel
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2025-05-27  9:36 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: ltp

Hi Jan,

> Hi!
> The runltp script is going to be removed soon, please switch to kirk
> that is going to replace it.

> https://github.com/linux-test-project/kirk

I'll also vote not to touch runltp any more.

kirk is mature enough and therefore we want to kill this old shell script.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-27  9:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27  7:27 [LTP] [PATCH v1 1/1] runltp: Enable POSIX regex support for SKIPFILE (-S) Jan Polensky
2025-05-27  7:50 ` Cyril Hrubis
2025-05-27  9:36   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox