From 240d6671ba930d5eec606928ec10c3dd5cd97455 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Fri, 30 Dec 2011 16:44:28 +0100 Subject: test_output: handle kmscon_comp*_use failure Move the call before the wakeup and also check its return code. Signed-off-by: David Herrmann --- tests/test_output.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_output.c b/tests/test_output.c index 730e7e1..c1320f6 100644 --- a/tests/test_output.c +++ b/tests/test_output.c @@ -180,6 +180,12 @@ int main(int argc, char **argv) return abs(ret); } + ret = kmscon_compositor_use(comp); + if (ret) { + log_err("Cannot use compositor: %d\n", ret); + goto err_unref; + } + log_info("Wakeing up compositor...\n"); ret = kmscon_compositor_wake_up(comp); if (ret < 0) { @@ -187,8 +193,6 @@ int main(int argc, char **argv) goto err_unref; } - kmscon_compositor_use(comp); - if (argc < 2) { ret = list_outputs(comp); if (ret) { -- cgit v1.2.3