[LTP] [PATCH v1] Prevent vma05 from passing wrongly when no coredump generated at all

Marius Kittler mkittler@suse.de
Wed Oct 11 16:29:27 CEST 2023


When debugging this test I noticed that it passes when no coredump could
be generated at all. This change adds a check to verify whether the test is
provoking a coredump as intended.

Signed-off-by: Marius Kittler <mkittler@suse.de>
---
 testcases/kernel/mem/vma/vma05.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/mem/vma/vma05.sh b/testcases/kernel/mem/vma/vma05.sh
index c9e4becdb..bcc3b9623 100755
--- a/testcases/kernel/mem/vma/vma05.sh
+++ b/testcases/kernel/mem/vma/vma05.sh
@@ -54,6 +54,7 @@ vma_report_check()
 
 	rm -rf core*
 	{ vma05_vdso; } > /dev/null 2>&1
+	[ -s ./core* ] || tst_brk TBROK "[vdso] no backtrace generated"
 	TRACE=$(gdb -silent -ex="thread apply all backtrace" -ex="quit"\
 		vma05_vdso ./core* 2> /dev/null)
 	if echo "$TRACE" | grep -qF "??"; then
-- 
2.42.0



More information about the ltp mailing list