[PATCH i-g-t] lib/igt_core: Workaround igt_thread failure when libunwind is not present
Jeevaka Prabu Badrappan
jeevaka.badrappan at intel.com
Wed May 21 18:31:20 UTC 2025
igt_thread test expects the test failure accompanied by a stack trace
and it matches the trace prefix "Stack trace: " to determine test result.
With the commit "Add a dummy workaround when libunwind is not present",
this trace prefix "Stack trace: " is not printed, resulting in an
igt_thread test failure.
There are 2 solutions to fix this issue:
1. Print the trace "Stack trace: not implemented"
2. Run the failure test only if libunwind is present.
This patch implements the first approach.
Signed-off-by: Jeevaka Prabu Badrappan <jeevaka.badrappan at intel.com>
---
lib/igt_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/igt_core.c b/lib/igt_core.c
index f698494e1..b06cdfd89 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -378,7 +378,7 @@ static int _igt_dynamic_tests_executed = -1;
static void print_backtrace(void)
{
#ifndef HAVE_LIBUNWIND
- igt_info("backtrace not implemented\n");
+ igt_info("Stack trace: not implemented\n");
#else
unw_cursor_t cursor;
unw_context_t uc;
@@ -2242,7 +2242,7 @@ xprintf(const char *fmt, ...)
static void print_backtrace_sig_safe(void)
{
#ifndef HAVE_LIBUNWIND
- igt_info("backtrace not implemented\n");
+ igt_info("Stack trace: not implemented\n");
#else
unw_cursor_t cursor;
unw_context_t uc;
--
2.49.0
More information about the igt-dev
mailing list