[PATCH i-g-t 1/2] tests/core_getversion: fix driver closing
Cavitt, Jonathan
jonathan.cavitt at intel.com
Wed Dec 18 20:29:21 UTC 2024
-----Original Message-----
From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Kamil Konieczny
Sent: Wednesday, December 18, 2024 11:04 AM
To: igt-dev at lists.freedesktop.org
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Subject: [PATCH i-g-t 1/2] tests/core_getversion: fix driver closing
>
> Test uses __drm_open_*() functions for opening a device, so
> it should also use corresponding __drm_close_driver() function.
>
> Also while at this sort includes, system ones should be first.
Maybe reword that last sentence as:
"""
Also, while we're here, sort the includes field. System includes should go first.
"""
But otherwise:
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt
>
> Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
> tests/core_getversion.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/tests/core_getversion.c b/tests/core_getversion.c
> index 158133da7..0842b7db6 100644
> --- a/tests/core_getversion.c
> +++ b/tests/core_getversion.c
> @@ -25,9 +25,11 @@
> *
> */
>
> -#include "igt.h"
> #include <string.h>
> #include <sys/ioctl.h>
> +
> +#include "igt.h"
> +
> /**
> * TEST: core getversion
> * Description: Tests the DRM_IOCTL_GET_VERSION ioctl and libdrm's drmGetVersion() interface to it.
> @@ -77,7 +79,7 @@ static void check_all_drm(void)
>
> check(fd2, info, sizeof(info));
> igt_info("%d: %s\n", i, info);
> - drm_close_driver(fd2);
> + __drm_close_driver(fd2);
> }
> }
>
> @@ -102,5 +104,5 @@ igt_main
> check_all_drm();
>
> igt_fixture
> - drm_close_driver(fd);
> + __drm_close_driver(fd);
> }
> --
> 2.47.1
>
>
More information about the igt-dev
mailing list