lib/igt_core: Print stacktrace in initialization/fixture blocks.
PATCH 1/1 lib/igt_core: Print stacktrace in initialization/fixture blocks.
Likely candidate for this behaviour is the igt_fixture block. Seen in the CI by running tests/kms_psr_sink_crc which is causing segfaults in the fixture block.
While at it fix some minor printing bugs.
Signed-off-by Marius Vlad <[email protected]>
CC Chris Wilson <[email protected]>
--- lib/igt_core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
lib/igt_core.c +5 -4
@@ -1122,7 +1122,7 @@ static void printnum(unsigned long long num, unsigned base) {int i =0 ; -unsigned long long __num; +unsigned long long __num = num;/* determine from where we should start dividing */ do {
@@ -1264,7 +1264,7 @@ static void print_backtrace_sig_safe(void)unw_word_t off;if (unw_get_proc_name (&cursor, name,255 , &off) <0 ) -xstrlcpy (name,"<unknown>" ,9 ); +xstrlcpy (name,"<unknown>" ,10 );xprintf (" #%d [%s+0x%x]\n" , stack_num++, name, (unsigned int ) off);
@@ -1740,7 +1740,7 @@ static void fatal_sig_handler(int sig)igt_assert_eq (write (STDERR_FILENO ,".\n" ,2 ),2 ); } -if (in_subtest &&crash_signal (sig)) { +if (crash_signal (sig)) {/* Linux standard to return exit code as 128 + signal */ if (!failed_one) igt_exitcode =128 + sig;
@@ -1749,7 +1749,8 @@ static void fatal_sig_handler(int sig)#ifdef HAVE_LIBUNWIND print_backtrace_sig_safe ();#endif -exit_subtest ("CRASH" ); +if (in_subtest) +exit_subtest ("CRASH" ); }break ; }
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 18 lines · Marius Vlad
Likely candidate for this behaviour is the
igt_fixtureblock. Seen in the CI by running tests/kms_psr_sink_crc which is causing segfaults in the fixture block.While at it fix some minor printing bugs.
Signed-off-by Marius Vlad <[email protected]>CC Chris Wilson <[email protected]>---
lib/igt_core.c +1
-1@@ -1740,7 +1740,7 @@ static void fatal_sig_handler(int sig)igt_assert_eq (write (STDERR_FILENO ,".\n" ,2 ),2 ); } -if (in_subtest &&crash_signal (sig)) { +if (crash_signal (sig)) {/* Linux standard to return exit code as 128 + signal */ if (!failed_one) igt_exitcode =128 + sig;
lib/igt_core.c static void fatal_sig_handler(int sig) · line 1753
Quoted 6 lines
lib/igt_core.c +2
-1@@ -1749,7 +1749,8 @@ static void fatal_sig_handler(int sig)#ifdef HAVE_LIBUNWIND print_backtrace_sig_safe ();#endif -exit_subtest ("CRASH" ); +if (in_subtest) +exit_subtest ("CRASH" );
Makes sense, I think - as much as I know this part of igt at least! -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx