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

Petr Vorel pvorel@suse.cz
Thu Oct 26 11:48:00 CEST 2023

Hi Marius,

> 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.

I'm sorry, I haven't noticed this when I was merging my old patch doing
similar check:


> 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"

Maybe checking with -s (size > 0) is better than for simple -f (file exists).
But OTOH how often can happen that backtrace gets generated but it's empty?
When no space left? But half of the LTP tests would blow up.

I'm closing this in patchwork because it's not applicable now, but feel free to
send rebased v2.

Kind regards,

More information about the ltp mailing list