* [LTP] [PATCH] lib: Fix bug in tst_test metadata validation
@ 2025-04-08 14:09 Martin Doucha
2025-04-11 11:59 ` Petr Vorel
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Martin Doucha @ 2025-04-08 14:09 UTC (permalink / raw)
To: ltp
The results pointer is NULL when do_setup() checks tst_test metadata
validity. Print the invalid runtime value from the correct pointer.
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
lib/tst_test.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 9a23cd4a0..694861d95 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1267,10 +1267,8 @@ static void do_setup(int argc, char *argv[])
tst_test->timeout);
}
- if (tst_test->runtime < 0) {
- tst_brk(TBROK, "Invalid runtime value %i",
- results->runtime);
- }
+ if (tst_test->runtime < 0)
+ tst_brk(TBROK, "Invalid runtime value %i", tst_test->runtime);
if (tst_test->tconf_msg)
tst_brk(TCONF, "%s", tst_test->tconf_msg);
--
2.49.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [LTP] [PATCH] lib: Fix bug in tst_test metadata validation
2025-04-08 14:09 [LTP] [PATCH] lib: Fix bug in tst_test metadata validation Martin Doucha
@ 2025-04-11 11:59 ` Petr Vorel
2025-04-11 12:00 ` Petr Vorel
2025-04-11 12:11 ` Cyril Hrubis
2 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2025-04-11 11:59 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp
Hi Martin,
> The results pointer is NULL when do_setup() checks tst_test metadata
> validity. Print the invalid runtime value from the correct pointer.
Ah, core dump. Good catch, thanks!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
> lib/tst_test.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
> diff --git a/lib/tst_test.c b/lib/tst_test.c
> index 9a23cd4a0..694861d95 100644
> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -1267,10 +1267,8 @@ static void do_setup(int argc, char *argv[])
> tst_test->timeout);
> }
> - if (tst_test->runtime < 0) {
> - tst_brk(TBROK, "Invalid runtime value %i",
> - results->runtime);
> - }
> + if (tst_test->runtime < 0)
> + tst_brk(TBROK, "Invalid runtime value %i", tst_test->runtime);
> if (tst_test->tconf_msg)
> tst_brk(TCONF, "%s", tst_test->tconf_msg);
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [LTP] [PATCH] lib: Fix bug in tst_test metadata validation
2025-04-08 14:09 [LTP] [PATCH] lib: Fix bug in tst_test metadata validation Martin Doucha
2025-04-11 11:59 ` Petr Vorel
@ 2025-04-11 12:00 ` Petr Vorel
2025-04-11 12:11 ` Cyril Hrubis
2 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2025-04-11 12:00 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp
Also:
Fixes: a6a369c5ee ("lib: redefine the overall timeout logic of test")
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [LTP] [PATCH] lib: Fix bug in tst_test metadata validation
2025-04-08 14:09 [LTP] [PATCH] lib: Fix bug in tst_test metadata validation Martin Doucha
2025-04-11 11:59 ` Petr Vorel
2025-04-11 12:00 ` Petr Vorel
@ 2025-04-11 12:11 ` Cyril Hrubis
2025-04-11 13:02 ` Petr Vorel
2 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2025-04-11 12:11 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp
Hi!
Good catch.
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-11 13:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08 14:09 [LTP] [PATCH] lib: Fix bug in tst_test metadata validation Martin Doucha
2025-04-11 11:59 ` Petr Vorel
2025-04-11 12:00 ` Petr Vorel
2025-04-11 12:11 ` Cyril Hrubis
2025-04-11 13:02 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox