[igt-dev] [PATCH i-g-t] tests/xe/xe_create: Exercise oversized object detection
Kumar, Janga Rahul
janga.rahul.kumar at intel.com
Tue May 2 09:44:29 UTC 2023
> -----Original Message-----
> From: Dandamudi, Priyanka <priyanka.dandamudi at intel.com>
> Sent: 02 May 2023 14:23
> To: Dandamudi, Priyanka <priyanka.dandamudi at intel.com>; Gandi, Ramadevi
> <ramadevi.gandi at intel.com>; Kumar, Janga Rahul
> <janga.rahul.kumar at intel.com>; igt-dev at lists.freedesktop.org
> Subject: [PATCH i-g-t] tests/xe/xe_create: Exercise oversized object detection
>
> From: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
>
> Create an oversized object and try to check if it throws an error.
>
> Cc: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
> ---
> tests/xe/xe_create.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tests/xe/xe_create.c b/tests/xe/xe_create.c index
> ae841f80..a4dc6a12 100644
> --- a/tests/xe/xe_create.c
> +++ b/tests/xe/xe_create.c
> @@ -82,6 +82,13 @@ static void create_invalid_size(int fd)
> }
> igt_assert_eq(ret, -EINVAL);
> }
> + /* Try creating size greater than available */
I will recommend you to add this as a separate subtest as it is not checking for any invalid error.
Add the new subtest to XE BAT as well.
> + ret = __create_bo(fd, vm, -1ULL << 32, region, &handle);
> + if (!ret) {
> + gem_close(fd, handle);
> + xe_vm_destroy(fd, vm);
> + }
> + igt_assert_eq(ret, -ENOSPC);
> }
>
> xe_vm_destroy(fd, vm);
> --
> 2.25.1
With above suggested minor changes.
Acked-by: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
More information about the igt-dev
mailing list