diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-08-02 19:34:44 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-08-29 21:33:51 +0100 |
commit | b49e32d36ac6758f3e71a0f1a805b65cbbb07d92 (patch) | |
tree | 11809e15c1b3891a35aab7a7160f7ae8bb873c47 | |
parent | 7a62f8535158c509bd3b521f988f660b208f2c05 (diff) |
Additional error reporting in simple-xinit
-rw-r--r-- | test/bigreq/request-length.c | 8 | ||||
-rw-r--r-- | test/simple-xinit.c | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/test/bigreq/request-length.c b/test/bigreq/request-length.c index 8174813ae..d9938f709 100644 --- a/test/bigreq/request-length.c +++ b/test/bigreq/request-length.c @@ -23,6 +23,7 @@ #include <unistd.h> #include <stdlib.h> +#include <stdio.h> #include <poll.h> #include <xcb/xcb.h> #include <xcb/bigreq.h> @@ -31,6 +32,13 @@ int main(int argc, char **argv) { xcb_connection_t *c = xcb_connect(NULL, NULL); + + int e = xcb_connection_has_error(c); + if (e) { + fprintf(stderr, "connection has error %d\n", e); + return e; + } + int fd = xcb_get_file_descriptor(c); struct { diff --git a/test/simple-xinit.c b/test/simple-xinit.c index 26ff12bf7..66c9a44b3 100644 --- a/test/simple-xinit.c +++ b/test/simple-xinit.c @@ -133,8 +133,10 @@ start_client(char *const *client_args, int display) return 1; } - if (!WIFEXITED(wstatus)) + if (!WIFEXITED(wstatus)) { + fprintf(stderr, "Client stopped or terminated by signal %d\n", WTERMSIG(wstatus)); return 1; + } return WEXITSTATUS(wstatus); } else { |