summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2011-12-30 16:44:28 +0100
committerDavid Herrmann <dh.herrmann@googlemail.com>2011-12-30 16:44:28 +0100
commit240d6671ba930d5eec606928ec10c3dd5cd97455 (patch)
tree850ddab198e6043c3be7cc86678a2da6b8dd82dc /tests
parent290601396ead99b6d45297be73002a7aae73cde4 (diff)
test_output: handle kmscon_comp*_use failure
Move the call before the wakeup and also check its return code. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_output.c8
1 files changed, 6 insertions, 2 deletions
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) {