From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t] lib/igt_kms: Be more verbose about failure in kmstest_wait_for_pageflip
Date: Thu, 4 Apr 2019 16:17:40 +0300 [thread overview]
Message-ID: <20190404131740.14569-1-arkadiusz.hiler@intel.com> (raw)
First, we set errno to 0 before doing select() to avoid random pollution
of the assert message with things like:
"Last errno: 25, Inappropriate ioctl for device"
Second, we log explicitly if we exceeded the timeout (ret == 0).
Third, if we fail the select() we log that with some explanation.
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
lib/igt_kms.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index a975ff14..f8b0dab2 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1504,9 +1504,17 @@ void kmstest_wait_for_pageflip(int fd)
FD_ZERO(&fds);
FD_SET(fd, &fds);
do {
+ errno = 0;
ret = select(fd + 1, &fds, NULL, NULL, &timeout);
} while (ret < 0 && errno == EINTR);
- igt_assert_eq(ret, 1);
+
+ igt_fail_on_f(ret == 0,
+ "Exceeded timeout (50ms) while waiting for a pageflip\n");
+
+ igt_assert_f(ret == 1,
+ "Waiting for pageflip failed with %d from select(drmfd)\n",
+ ret);
+
igt_assert(drmHandleEvent(fd, &evctx) == 0);
}
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-04-04 13:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 13:17 Arkadiusz Hiler [this message]
2019-04-04 14:32 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_kms: Be more verbose about failure in kmstest_wait_for_pageflip Patchwork
2019-04-05 6:09 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-04-05 7:28 ` [igt-dev] [PATCH i-g-t] " Arkadiusz Hiler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190404131740.14569-1-arkadiusz.hiler@intel.com \
--to=arkadiusz.hiler@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox