[Mesa-dev] [PATCH] xvmc: Disable errors from tests when the host doesn't support XVMC.
Dylan Baker
dylan at pnwbakers.com
Tue Jul 10 20:37:56 UTC 2018
I think meson will report skip the return code is 127 or 128 (can't remember),
but this seems fine too, or we can just remove them from the set of tests like
Ilia suggested. For any of the above options,
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Quoting Eric Anholt (2018-07-10 12:42:34)
> These are connected as unit tests, so no breaking the build just because
> the host can't do it. If you wanted to test on a non-supporting host,
> you'd need some sort of mocking.
> ---
> src/gallium/state_trackers/xvmc/tests/test_blocks.c | 2 +-
> src/gallium/state_trackers/xvmc/tests/test_context.c | 2 +-
> src/gallium/state_trackers/xvmc/tests/test_rendering.c | 2 +-
> src/gallium/state_trackers/xvmc/tests/test_subpicture.c | 2 +-
> src/gallium/state_trackers/xvmc/tests/test_surface.c | 2 +-
> src/gallium/state_trackers/xvmc/tests/xvmc_bench.c | 2 +-
> 6 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/gallium/state_trackers/xvmc/tests/test_blocks.c b/src/gallium/state_trackers/xvmc/tests/test_blocks.c
> index 53c29bc5ae1b..4a14b24b0a89 100644
> --- a/src/gallium/state_trackers/xvmc/tests/test_blocks.c
> +++ b/src/gallium/state_trackers/xvmc/tests/test_blocks.c
> @@ -66,7 +66,7 @@ int main(int argc, char **argv)
> {
> XCloseDisplay(display);
> fprintf(stderr, "Error, unable to find a good port.\n");
> - exit(1);
> + exit(0);
> }
>
> if (is_overlay)
> diff --git a/src/gallium/state_trackers/xvmc/tests/test_context.c b/src/gallium/state_trackers/xvmc/tests/test_context.c
> index 81d26fcffd57..573b5d535bcb 100644
> --- a/src/gallium/state_trackers/xvmc/tests/test_context.c
> +++ b/src/gallium/state_trackers/xvmc/tests/test_context.c
> @@ -62,7 +62,7 @@ int main(int argc, char **argv)
> {
> XCloseDisplay(display);
> fprintf(stderr, "Error, unable to find a good port.\n");
> - exit(1);
> + exit(0);
> }
>
> if (is_overlay)
> diff --git a/src/gallium/state_trackers/xvmc/tests/test_rendering.c b/src/gallium/state_trackers/xvmc/tests/test_rendering.c
> index c5494ecc8c2f..6f12f219af44 100644
> --- a/src/gallium/state_trackers/xvmc/tests/test_rendering.c
> +++ b/src/gallium/state_trackers/xvmc/tests/test_rendering.c
> @@ -171,7 +171,7 @@ int main(int argc, char **argv)
> {
> XCloseDisplay(display);
> fprintf(stderr, "Error, unable to find a good port.\n");
> - exit(1);
> + exit(0);
> }
>
> if (is_overlay)
> diff --git a/src/gallium/state_trackers/xvmc/tests/test_subpicture.c b/src/gallium/state_trackers/xvmc/tests/test_subpicture.c
> index 006972fa8ee7..673488a1fd25 100644
> --- a/src/gallium/state_trackers/xvmc/tests/test_subpicture.c
> +++ b/src/gallium/state_trackers/xvmc/tests/test_subpicture.c
> @@ -89,7 +89,7 @@ int main(int argc, char **argv)
> {
> XCloseDisplay(display);
> fprintf(stderr, "Error, unable to find a good port.\n");
> - exit(1);
> + exit(0);
> }
>
> if (is_overlay)
> diff --git a/src/gallium/state_trackers/xvmc/tests/test_surface.c b/src/gallium/state_trackers/xvmc/tests/test_surface.c
> index d5a121d5ab0d..6b455bc00ebe 100644
> --- a/src/gallium/state_trackers/xvmc/tests/test_surface.c
> +++ b/src/gallium/state_trackers/xvmc/tests/test_surface.c
> @@ -63,7 +63,7 @@ int main(int argc, char **argv)
> {
> XCloseDisplay(display);
> fprintf(stderr, "Error, unable to find a good port.\n");
> - exit(1);
> + exit(0);
> }
>
> if (is_overlay)
> diff --git a/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c b/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c
> index 3cd23173c7c7..bf6272b0a3e6 100644
> --- a/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c
> +++ b/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c
> @@ -219,7 +219,7 @@ int main(int argc, char **argv)
> {
> XCloseDisplay(display);
> fprintf(stderr, "Error, unable to find a good port.\n");
> - exit(1);
> + exit(0);
> }
>
> if (is_overlay)
> --
> 2.18.0
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180710/9d730c6a/attachment.sig>
More information about the mesa-dev
mailing list