Thread (19 messages) 19 messages, 3 authors, 2023-05-24

Re: [PATCH tests 3/5] tests: support to skip checking dmesg

From: Mariusz Tkaczyk <hidden>
Date: 2023-05-24 08:42:03

On Tue, 23 May 2023 21:38:58 +0800
Yu Kuai [off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Yu Kuai <redacted>

Prepare to add a regression test for raid10 that require error injection
to trigger error path, and kernel will complain about io error, checking
dmesg for error log will make it impossible to pass this test.

Signed-off-by: Yu Kuai <redacted>
---
 test | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/test b/test
index 61d9ee83..b244453b 100755
--- a/test
+++ b/test
@@ -107,8 +107,12 @@ do_test() {
 		echo -ne "$_script... "
 		if ( set -ex ; . $_script ) &> $targetdir/log
 		then
-			dmesg | grep -iq "error\|call trace\|segfault" &&
-				die "dmesg prints errors when testing
$_basename!"
+			if [ -f "${_script}.inject_error" ]; then
+				echo "dmesg checking is skipped because test
inject error"
Following the convention, I would say that it is a "negative test' or just
'negative/md_negative' so errors are expected.

Why not just add some sort of "negative" to the test name?

Anyway:
Acked-by: Mariusz Tkaczyk <redacted>

Thanks,
Mariusz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help