From: Jan Polensky <japo@linux.ibm.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v1 1/1] runltp: Enable POSIX regex support for SKIPFILE (-S)
Date: Tue, 27 May 2025 09:27:34 +0200 [thread overview]
Message-ID: <20250527072734.41451-1-japo@linux.ibm.com> (raw)
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
next reply other threads:[~2025-05-27 7:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 7:27 Jan Polensky [this message]
2025-05-27 7:50 ` [LTP] [PATCH v1 1/1] runltp: Enable POSIX regex support for SKIPFILE (-S) Cyril Hrubis
2025-05-27 9:36 ` Petr Vorel
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=20250527072734.41451-1-japo@linux.ibm.com \
--to=japo@linux.ibm.com \
--cc=ltp@lists.linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.