public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] Prevent vma05 from passing wrongly when no coredump generated at all
@ 2023-10-11 14:29 Marius Kittler
  2023-10-26  9:48 ` Petr Vorel
  0 siblings, 1 reply; 2+ messages in thread
From: Marius Kittler @ 2023-10-11 14:29 UTC (permalink / raw)
  To: ltp

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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH v1] Prevent vma05 from passing wrongly when no coredump generated at all
  2023-10-11 14:29 [LTP] [PATCH v1] Prevent vma05 from passing wrongly when no coredump generated at all Marius Kittler
@ 2023-10-26  9:48 ` Petr Vorel
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2023-10-26  9:48 UTC (permalink / raw)
  To: Marius Kittler; +Cc: ltp

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:

https://patchwork.ozlabs.org/project/ltp/patch/20230926124647.152972-3-pvorel@suse.cz/
https://lore.kernel.org/ltp/20230926124647.152972-3-pvorel@suse.cz/

> 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,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-26  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-11 14:29 [LTP] [PATCH v1] Prevent vma05 from passing wrongly when no coredump generated at all Marius Kittler
2023-10-26  9:48 ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox