[PATCH i-g-t] lib/igt_core: Workaround igt_thread failure when libunwind is not present

Anirban, Sk sk.anirban at intel.com
Thu May 22 04:58:37 UTC 2025


Hi,

On 22-05-2025 00:01, Jeevaka Prabu Badrappan wrote:
> 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;
looks good to me.

Reviewed-by: Sk Anirban <sk.anirban at intel.com>

Let's wait to see the full results from xe and hear any additional 
feedback from others.

Thanks,
Anirban


More information about the igt-dev mailing list