summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-02 15:59:58 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-02 15:59:58 +0200
commit4c7fc65cb63374a42ec9a41f4d5067d50e053aac (patch)
tree65d7ae2034dafe5ab69a1a910bebbe297daa017d
parent6b034a6fd69c9e5bfac682a4c98208433079501c (diff)
tests/flip_test: actually try to check what I want to check
/me sucks
-rw-r--r--tests/flip_test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/flip_test.c b/tests/flip_test.c
index 1ae6f808..d8abb712 100644
--- a/tests/flip_test.c
+++ b/tests/flip_test.c
@@ -70,7 +70,7 @@ struct test_output {
unsigned int current_fb_id;
unsigned int fb_ids[2];
struct kmstest_fb fb_info[2];
- struct timeval last_flip_ts;
+ struct timeval last_flip;
};
static void emit_dummy_load(struct test_output *o)
@@ -162,12 +162,12 @@ static void page_flip_handler(int fd, unsigned int frame, unsigned int sec,
timersub(&pageflip_ts, &now, &diff);
if (diff.tv_sec > 0 || diff.tv_usec > 2000) {
- fprintf(stderr, "pageflip timestamp delayed for too long: %us, %uusec\n",
- (unsigned) diff.tv_sec, (unsigned) diff.tv_usec);
+ fprintf(stderr, "pageflip timestamp delayed for too long: %is, %iusec\n",
+ (int) diff.tv_sec, (int) diff.tv_usec);
exit(5);
}
- if (!timercmp(&o->last_flip_ts, &now, <)) {
+ if (!timercmp(&o->last_flip, &pageflip_ts, <)) {
fprintf(stderr, "pageflip ts before the pageflip was issued!\n");
exit(6);
}
@@ -190,7 +190,7 @@ static void page_flip_handler(int fd, unsigned int frame, unsigned int sec,
if (o->flags & TEST_DPMS)
do_or_die(set_dpms(o, DRM_MODE_DPMS_OFF));
- o->last_flip_ts = now;
+ o->last_flip = now;
}
static void connector_find_preferred_mode(struct test_output *o, int crtc_id)
@@ -366,7 +366,7 @@ static void flip_mode(struct test_output *o, int crtc, int duration)
evctx.page_flip_handler = page_flip_handler;
gettimeofday(&end, NULL);
- gettimeofday(&o->last_flip_ts, NULL);
+ gettimeofday(&o->last_flip, NULL);
end.tv_sec += duration;
while (1) {