diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-12-13 21:10:58 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-12-17 15:30:53 +0100 |
commit | 8ed0112f88a8738d3e813428e5045333a6e07fbf (patch) | |
tree | 36c29704a55aa3c3c62e47cc94b0b8a579e59974 | |
parent | f185699a4ba904569db286cdb3386512a2540af2 (diff) |
tests/flip_test: split out timestamp checks into subtest
This way we can still test basic pageflips on kernels with broken
locking while still failing when the timestamps/framecounts are wrong.
Also disable the delay check on analog tv, timings on those ports are
truely screwed-up
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | tests/flip_test.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/flip_test.c b/tests/flip_test.c index 5ad62d118..c3615e1fb 100644 --- a/tests/flip_test.c +++ b/tests/flip_test.c | |||
@@ -373,7 +373,8 @@ static void check_state(struct test_output *o, struct event_state *es) | |||
373 | double usec_interflip; | 373 | double usec_interflip; |
374 | 374 | ||
375 | timersub(&es->current_ts, &es->current_received_ts, &diff); | 375 | timersub(&es->current_ts, &es->current_received_ts, &diff); |
376 | if (diff.tv_sec > 0 || (diff.tv_sec == 0 && diff.tv_usec > 2000)) { | 376 | if ((!analog_tv_connector(o)) && |
377 | (diff.tv_sec > 0 || (diff.tv_sec == 0 && diff.tv_usec > 2000))) { | ||
377 | fprintf(stderr, "%s ts delayed for too long: %is, %iusec\n", | 378 | fprintf(stderr, "%s ts delayed for too long: %is, %iusec\n", |
378 | es->name, (int)diff.tv_sec, (int)diff.tv_usec); | 379 | es->name, (int)diff.tv_sec, (int)diff.tv_usec); |
379 | exit(5); | 380 | exit(5); |
@@ -407,16 +408,14 @@ static void check_state(struct test_output *o, struct event_state *es) | |||
407 | fprintf(stderr, "inter-%s ts jitter: %is, %ius\n", | 408 | fprintf(stderr, "inter-%s ts jitter: %is, %ius\n", |
408 | es->name, | 409 | es->name, |
409 | (int) diff.tv_sec, (int) diff.tv_usec); | 410 | (int) diff.tv_sec, (int) diff.tv_usec); |
410 | /* atm this is way too easy to hit, thanks to the hpd | 411 | exit(9); |
411 | * poll helper :( hence make it non-fatal for now */ | ||
412 | //exit(9); | ||
413 | } | 412 | } |
414 | 413 | ||
415 | if (es->current_seq != es->last_seq + es->seq_step) { | 414 | if (es->current_seq != es->last_seq + es->seq_step) { |
416 | fprintf(stderr, "unexpected %s seq %u, expected %u\n", | 415 | fprintf(stderr, "unexpected %s seq %u, expected %u\n", |
417 | es->name, es->current_seq, | 416 | es->name, es->current_seq, |
418 | es->last_seq + es->seq_step); | 417 | es->last_seq + es->seq_step); |
419 | /* no exit, due to the same reason as above */ | 418 | exit(9); |
420 | } | 419 | } |
421 | } | 420 | } |
422 | } | 421 | } |
@@ -969,7 +968,8 @@ int main(int argc, char **argv) | |||
969 | int flags; | 968 | int flags; |
970 | const char *name; | 969 | const char *name; |
971 | } tests[] = { | 970 | } tests[] = { |
972 | { 15, TEST_VBLANK | TEST_CHECK_TS, "wf_vblank" }, | 971 | { 15, TEST_VBLANK, "wf_vblank" }, |
972 | { 15, TEST_VBLANK | TEST_CHECK_TS, "wf_vblank-ts-check" }, | ||
973 | { 15, TEST_VBLANK | TEST_VBLANK_BLOCK | TEST_CHECK_TS, | 973 | { 15, TEST_VBLANK | TEST_VBLANK_BLOCK | TEST_CHECK_TS, |
974 | "blocking-wf_vblank" }, | 974 | "blocking-wf_vblank" }, |
975 | { 5, TEST_VBLANK | TEST_VBLANK_ABSOLUTE, | 975 | { 5, TEST_VBLANK | TEST_VBLANK_ABSOLUTE, |
@@ -983,7 +983,8 @@ int main(int argc, char **argv) | |||
983 | { 30, TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_LOAD, | 983 | { 30, TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_LOAD, |
984 | "delayed-wf_vblank-vs-modeset" }, | 984 | "delayed-wf_vblank-vs-modeset" }, |
985 | 985 | ||
986 | { 15, TEST_FLIP | TEST_CHECK_TS | TEST_EBUSY , "plain-flip" }, | 986 | { 15, TEST_FLIP | TEST_EBUSY , "plain-flip" }, |
987 | { 15, TEST_FLIP | TEST_CHECK_TS | TEST_EBUSY , "plain-flip-ts-check" }, | ||
987 | { 30, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" }, | 988 | { 30, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" }, |
988 | { 30, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_LOAD, "delayed-flip-vs-dpms" }, | 989 | { 30, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_LOAD, "delayed-flip-vs-dpms" }, |
989 | { 5, TEST_FLIP | TEST_PAN, "flip-vs-panning" }, | 990 | { 5, TEST_FLIP | TEST_PAN, "flip-vs-panning" }, |