[PATCH xserver 05/10 v2] test: Add a little xinit-like program for starting servers for testing.
Julien Cristau
jcristau at debian.org
Fri Sep 23 15:29:37 UTC 2016
On Fri, Sep 23, 2016 at 10:58:54 +0300, Eric Anholt wrote:
> 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.
>
> Signed-off-by: Eric Anholt <eric at anholt.net>
> ---
> test/.gitignore | 1 +
> test/Makefile.am | 13 ++-
> test/simple-xinit.c | 223 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 233 insertions(+), 4 deletions(-)
> create mode 100644 test/simple-xinit.c
>
Two other things I noticed:
- lack of error checking for fork()
- this allocation:
> + char **args_storage = calloc(argc + 2, sizeof(char **));
should be calloc(argc + 2, sizeof(char *))
(no actual difference, though, so meh)
Other than that the series looks good to me.
Cheers,
Julien
More information about the xorg-devel
mailing list