In the function wait_for_events() has a double check in the select() function return as described below:
igt_assert_f(ret >= 0,
"select error (errno %i)\n", errno);
igt_assert_f(ret > 0,
"select timed out or error (ret %d)\n", ret);
Note that the second assert condition will not be reached because of the
first assertion. This commit removes the code duplication and update the
error message.
Signed-off-by: Rodrigo Siqueira <[email protected]>
---
tests/kms_flip.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 57138ec1..9ef77de9 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1014,9 +1014,7 @@ static unsigned int wait_for_events(struct test_output *o)
} while (ret < 0 && errno == EINTR);
igt_assert_f(ret >= 0,
- "select error (errno %i)\n", errno);
- igt_assert_f(ret > 0,
- "select timed out or error (ret %d)\n", ret);
+ "select error: %s (%d))\n", strerror(errno), ret);
igt_assert_f(!FD_ISSET(0, &fds),
"no fds active, breaking\n");
--
2.21.0
signature.asc
Description: PGP signature
_______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
