[LTP] [PATCH 1/1] tst_test.sh: Remove LTP_ERR string from error message

Petr Vorel pvorel@suse.cz
Fri Jul 10 09:55:48 CEST 2026


It's not an error, but it can be confusing for a reviewer.

Fixes: c4b0907760 ("lib/tst_test.sh: add TST_RTNL_CHK() helper function")
Reported-by: Avinesh Kumar <avinesh.kumar@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/lib/tst_test.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
index 8701bb3903..b3e7e29bbf 100644
--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -274,6 +274,7 @@ TST_RTNL_CHK()
 	local msg match
 
 	echo "$output" | grep -q "LTP_ERR" || return 0
+	output=$(echo "$output" | sed 's/LTP_ERR$//')
 
 	for msg in "$msg1" "$msg2" "$msg3" "$msg4"; do
 		match=$(echo "$output" | grep "$msg") && \
-- 
2.54.0



More information about the ltp mailing list