[PATCH i-g-t] tests: Update assertion in invalid-wait-zero-handles
Kamil Konieczny
kamil.konieczny at linux.intel.com
Wed Oct 2 15:05:42 UTC 2024
Hi Krzysztof,
On 2024-10-02 at 13:34:19 +0200, Krzysztof Niemiec wrote:
write test nema in subject, so instead of
tests: Update assertion in invalid-wait-zero-handles
better:
tests/syncobj_timeline: Update assertion in invalid-wait-zero-handles
> The behavior of DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT has been changed in [1],
> but the invalid-wait-zero-handles test has not been updated to mirror
> this change. Fix the assert to check against 0 instead of -EINVAL.
>
> [1] https://patchwork.freedesktop.org/patch/554042/
>
> Signed-off-by: Krzysztof Niemiec <krzysztof.niemiec at intel.com>
> ---
> tests/syncobj_timeline.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tests/syncobj_timeline.c b/tests/syncobj_timeline.c
> index 96d5d8b45..8e94380de 100644
> --- a/tests/syncobj_timeline.c
> +++ b/tests/syncobj_timeline.c
> @@ -558,13 +558,12 @@ test_wait_bad_flags(int fd)
> }
>
> static const char *test_wait_zero_handles_desc =
> - "Verifies that waiting on an empty list of invalid syncobj handles is"
> - " rejected";
> + "Verifies that waiting on an empty list of syncobj handles returns 0";
s/returns 0/is accepted/
>From this it looks like it is no longer "invalid-" tests?
So why not changing also test name or moving this to other subtest?
Maybe also change test name and description:
* SUBTEST: invalid-query-zero-handles
* Description: Verifies that querying an empty list of syncobj handles is rejected
dropping "invalid-" looks ok:
* SUBTEST: query-zero-handles
* Description: Verifies that querying an empty list of syncobj handles is accepted
Regards,
Kamil
> static void
> test_wait_zero_handles(int fd)
> {
> struct drm_syncobj_timeline_wait wait = {};
> - igt_assert_eq(__syncobj_timeline_wait_ioctl(fd, &wait), -EINVAL);
> + igt_assert_eq(__syncobj_timeline_wait_ioctl(fd, &wait), 0);
> }
>
> static const char *test_wait_illegal_handle_desc =
> --
> 2.45.2
>
More information about the igt-dev
mailing list