From: Petr Vorel <pvorel@suse.cz>
To: Vincent Chen <vincent.chen@sifive.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] locking/lock_torture: accept optional "[debug]" in result string
Date: Wed, 14 Jan 2026 17:55:00 +0100 [thread overview]
Message-ID: <20260114165500.GA427531@pevik> (raw)
In-Reply-To: <20260114101834.3397158-1-vincent.chen@sifive.com>
Hi Vincent,
> lock_torture.sh parses the lock_torture result from dmesg by
> matching the "End of test: <RESULT>:" line.
> When the kernel is built with lock debugging enabled (e.g.
> CONFIG_DEBUG_MUTEXES, CONFIG_DEBUG_RT_MUTEXES, CONFIG_DEBUG_SPINLOCK),
> lock_torture may print "End of test: SUCCESS [debug]: ...".
> The current regexp expects "SUCCESS:" and fails to match, causing the
> test to be reported as failure.
> Allow an optional " [debug]" token between the result string and the
> colon so the test can correctly detect SUCCESS on debug kernels.
Indeed:
torture_type, tag, cxt.debug_lock ? " [debug]": "", [1]
based on config you mentioned [2].
Thanks, merged!
Kind regards,
Petr
[1] https://elixir.bootlin.com/linux/v6.19-rc5/source/kernel/locking/locktorture.c#L1103
[2] https://elixir.bootlin.com/linux/v6.19-rc5/source/kernel/locking/locktorture.c#L1279
> Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
> ---
> testcases/kernel/device-drivers/locking/lock_torture.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/testcases/kernel/device-drivers/locking/lock_torture.sh b/testcases/kernel/device-drivers/locking/lock_torture.sh
> index dfa57373f..d9bd95da2 100755
> --- a/testcases/kernel/device-drivers/locking/lock_torture.sh
> +++ b/testcases/kernel/device-drivers/locking/lock_torture.sh
> @@ -83,7 +83,7 @@ for type in $lock_type; do
> tst_brkm TBROK "failed to unload module"
> # check module status in dmesg
> - result_str=`dmesg | sed -nE '$s/.*End of test: ([A-Z]+):.*/\1/p'`
> + result_str=`dmesg | sed -nE '$s/.*End of test: ([A-Z]+)([[:space:]]+\[debug\])?:.*/\1/p'`
> if [ "$result_str" = "SUCCESS" ]; then
> tst_resm TPASS "$type: completed"
> else
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-01-14 16:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 10:18 [LTP] [PATCH] locking/lock_torture: accept optional "[debug]" in result string Vincent Chen via ltp
2026-01-14 16:55 ` Petr Vorel [this message]
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=20260114165500.GA427531@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=vincent.chen@sifive.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