diff mbox series

[blktests] nvme/039: adjust to util-linux v2.40 dmesg format change

Message ID 20240429013851.181700-1-shinichiro.kawasaki@wdc.com (mailing list archive)
State New, archived
Headers show
Series [blktests] nvme/039: adjust to util-linux v2.40 dmesg format change | expand

Commit Message

Shin'ichiro Kawasaki April 29, 2024, 1:38 a.m. UTC
Since util-linux version 2.40, dmesg supports "caller ID". When Linux
kernel supports CONFIG_PRINTK_CALLER, dmesg adds thread ID or CPU ID
with parenthesis such as [    T123] or [     C16] to each message. This
made the dmesg string check of the test case nvme/039 fail. Fix this by
filtering out the added caller ID field.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/nvme/039 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Shin'ichiro Kawasaki May 9, 2024, 10:41 a.m. UTC | #1
On Apr 29, 2024 / 10:38, Shin'ichiro Kawasaki wrote:
> Since util-linux version 2.40, dmesg supports "caller ID". When Linux
> kernel supports CONFIG_PRINTK_CALLER, dmesg adds thread ID or CPU ID
> with parenthesis such as [    T123] or [     C16] to each message. This
> made the dmesg string check of the test case nvme/039 fail. Fix this by
> filtering out the added caller ID field.
> 
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

FYI, this patch has got applied.
diff mbox series

Patch

diff --git a/tests/nvme/039 b/tests/nvme/039
index f92f852..a0f135c 100755
--- a/tests/nvme/039
+++ b/tests/nvme/039
@@ -24,7 +24,8 @@  last_dmesg()
 {
 	local nr_lines=$1
 
-	dmesg -t | grep -v "callbacks suppressed" | tail "-$nr_lines"
+	dmesg -t | grep -v "callbacks suppressed" | tail "-$nr_lines" \
+		| sed 's/\[.*\] //'
 }
 
 inject_unrec_read_on_read()