[PATCH i-g-t] lib/igt_core: Workaround igt_thread failure when libunwind is not present
Kamil Konieczny
kamil.konieczny at linux.intel.com
Thu May 22 09:04:11 UTC 2025
Hi Jeevaka,
On 2025-05-21 at 18:31:20 +0000, 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.
Looks good, I tested it with container build-debian-minimal so
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Btw I will adjust a little your subject and description and
will merge it soon as this fixes our GitLab CI pipeline.
Regards,
Kamil
>
> 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