diff options
author | Imre Deak <imre.deak@intel.com> | 2012-10-15 21:18:40 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2012-10-16 19:40:06 +0300 |
commit | eecae8dfef452194bd183a86cfb7d31f8d93dcba (patch) | |
tree | 2f8c5a4a2890f2e065cc8d0c7c4ca85bf57b1d69 /tests/flip_test.c | |
parent | 6c2b53d8948a0660e6a95b4d7350a0d15bf78ceb (diff) |
flip_test: unify the name of the current test in status messages
Signed-off-by: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'tests/flip_test.c')
-rw-r--r-- | tests/flip_test.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/flip_test.c b/tests/flip_test.c index 5ea880d..351edb7 100644 --- a/tests/flip_test.c +++ b/tests/flip_test.c @@ -84,6 +84,7 @@ struct event_state { }; struct test_output { + const char *test_name; uint32_t id; int mode_valid; drmModeModeInfo mode; @@ -543,8 +544,8 @@ static void flip_mode(struct test_output *o, int crtc, int duration) if (!o->mode_valid) return; - fprintf(stdout, "Beginning page flipping on crtc %d, connector %d\n", - crtc, o->id); + fprintf(stdout, "Beginning %s on crtc %d, connector %d\n", + o->test_name, crtc, o->id); o->fb_width = o->mode.hdisplay; o->fb_height = o->mode.vdisplay; @@ -592,8 +593,8 @@ static void flip_mode(struct test_output *o, int crtc, int duration) check_final_state(o, &o->flip_state, ellapsed); - fprintf(stdout, "\npage flipping on crtc %d, connector %d: PASSED\n", - crtc, o->id); + fprintf(stdout, "\n%s on crtc %d, connector %d: PASSED\n\n", + o->test_name, crtc, o->id); kmstest_remove_fb(drm_fd, o->fb_ids[1]); kmstest_remove_fb(drm_fd, o->fb_ids[0]); @@ -615,7 +616,7 @@ static int get_pipe_from_crtc_id(int crtc_id) return pfci.pipe; } -static int run_test(int duration, int flags) +static int run_test(int duration, int flags, const char *test_name) { struct test_output o; int c, i; @@ -633,6 +634,7 @@ static int run_test(int duration, int flags) int crtc; memset(&o, 0, sizeof(o)); + o.test_name = test_name; o.id = resources->connectors[c]; o.flags = flags; o.flip_state.name = "flip"; @@ -672,7 +674,7 @@ int main(int argc, char **argv) for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) { printf("running testcase: %s\n", tests[i].name); - run_test(tests[i].duration, tests[i].flags); + run_test(tests[i].duration, tests[i].flags, tests[i].name); } close(drm_fd); |