[PATCH 1/2] lib/igt_facts: Make igt_facts_test noreturn
Kamil Konieczny
kamil.konieczny at linux.intel.com
Tue Jan 21 14:02:46 UTC 2025
Hi Pravalika,
On 2025-01-21 at 12:02:06 +0530, Pravalika Gurram wrote:
> noreturn attribute is used to improve the optimization by informing to
> the compiler that function does not return .
>
> Signed-off-by: Pravalika Gurram <pravalika.gurram at intel.com>
> ---
> lib/igt_facts.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/igt_facts.c b/lib/igt_facts.c
> index 2e04a7c86..bd6742065 100644
> --- a/lib/igt_facts.c
> +++ b/lib/igt_facts.c
> @@ -748,7 +748,7 @@ static void igt_facts_test_mark_and_sweep(struct igt_list_head *head)
> *
> * Returns: bool indicating if the tests passed
> */
> -void igt_facts_test(void)
> +__noreturn void igt_facts_test(void)
This makes our CI pieline fails, see:
https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1349299
https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/69671923
9/443 lib igt_exit_handler OK 2.14 s
10/443 lib igt_facts FAIL 0.33 s (exit status 98)
11/443 lib igt_fork OK 6.65 s
Imho it is better to test it first on your machine locally with:
meson test -C build --num-processes 4
then send it as a separate patch.
Regards,
Kamil
> {
> const char *last_test = "Unit Testing";
>
> @@ -776,4 +776,6 @@ void igt_facts_test(void)
> /* Clean up the list and call igt_facts(). This should not crash */
> igt_facts_list_mark_and_sweep(&igt_facts_list_pci_gpu_head);
> igt_facts(last_test);
> +
> + igt_exit();
> }
> --
> 2.34.1
>
More information about the igt-dev
mailing list