Commit Graph

5 Commits

Author SHA1 Message Date
Eric Anholt
164a37eac2 simple-xinit: Introduce an escaped "--" argument.
For testing xephyr-glamor on top of Xvfb in CI better, I want to be
able to make one command line describing the nested server invocation,
but that means I need to get two simple-xinits to split client/server
on different "--" arguments.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-03-27 09:50:19 -07:00
Eric Anholt
29aed56ec7 simple-xinit: Avoid hanging if the server fails to set up the display fd.
Early fatal errors may leave us with nothing in the displayfd pipe,
and we'd block forever.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-03-27 09:50:19 -07:00
Adam Jackson
0888b22fea test: Fix a thinko in simple-xinit
Spotted by clang courtesy of the shiny new OSX Travis target:

simple-xinit.c:90:65: warning: sizeof on pointer operation will return size of 'char *' instead of 'char [10]' [-Wsizeof-array-decay]
    ret = read(displayfd, display_string, sizeof(display_string - 1));

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-09-25 15:37:59 -04:00
Eric Anholt
3336291fc6 test: Return error from simple-xinit if the client crashes.
I want to be able to call client tests with simple-xinit, so assertion
failures should be an error.

v2: Clean up identical returns.

Signed-off-by: Eric Anholt <eric@anholt.net>
2017-09-20 13:19:27 -04:00
Eric Anholt
7ac130a066 test: Add a little xinit-like program for starting servers for testing
The normal xinit is racy because it doesn't use -displayfd.  This
implements the bare minimum for testing purposes, using -displayfd to
sequence starting the client, and avoids adding yet another dependency
to the server.

v2: Fix asprintf error checks.
v3: Add error checking for fork(), clarify calloc() arg.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28 12:44:20 -04:00