[igt-dev] [PATCH i-g-t] tests/prime_vgem: Fix broken handling of interprocess pipes

Chris Wilson chris at chris-wilson.co.uk
Mon Jul 1 11:40:31 UTC 2019


Quoting Janusz Krzysztofik (2019-07-01 12:28:38)
> If a child process dies for any reason while basic-fence-read or
> basic-fence-mmap subtest is run, the subtest may hang indefinitely on
> read() from a pipe which is supposed to be written to by that child (can
> be interrupted though).  Fix it by first closing unused pipe ends on both
> parent and child side before using the pipe, as recommended by pipe(2)
> manual page.
> 
> Please note that due to the IGT library way of handling signals, now the
> subtests may fail with error code 141 (128 + SIGPIPE) and no usual DEBUG
> message block on stderr nor FAIL message line on stdout, however some
> meaningful error messages will still be printed on stderr by the failing
> child processes.
> 
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>

That will teach me for being lazy. (Who am I kidding? When it is simpler
to simply say that (a) igt used to explode if a igt_fork()ed child died,
and (b) we should never fail ;)

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the igt-dev mailing list