[igt-dev] [PATCH] tests/template: Use DRIVER_ANY in for drm_open_driver
Petri Latvala
petri.latvala at intel.com
Thu Sep 23 09:04:11 UTC 2021
On Wed, Sep 22, 2021 at 07:36:23PM +0000, Mark Yacoub wrote:
> From: Mark Yacoub <markyacoub at google.com>
>
> [Why]
> Make it run on all drivers.
>
> [How]
> open any driver instead of intel only.
>
> Tested-on: ChromeOS Zork(amdgpu)
>
> Signed-off-by: Mark Yacoub <markyacoub at chromium.org>
> ---
> tests/template.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/template.c b/tests/template.c
> index 5fbd3104..eed81dbf 100644
> --- a/tests/template.c
> +++ b/tests/template.c
> @@ -61,7 +61,7 @@ int drm_fd;
> igt_main
> {
> igt_fixture {
> - drm_fd = drm_open_driver(DRIVER_INTEL);
> + drm_fd = drm_open_driver(DRIVER_ANY);
> igt_require(drm_fd >= 0);
Template becoming a more useful template, thanks.
Also remove that igt_require line, drm_open_driver cannot return <0.
With that change,
Reviewed-by: Petri Latvala <petri.latvala at intel.com>
>
> /* Set up other interesting stuff shared by all tests. */
> --
> 2.33.0.685.g46640cef36-goog
>
More information about the igt-dev
mailing list