From: Bartosz Golaszewski Date: Tue, 13 Jun 2017 13:00:29 +0000 (+0200) Subject: tests: improve sigprocmask()-related error messages X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0fb6c77c70067a768963f430a2b1a0f531d61bfc;p=qemu-gpiodev%2Flibgpiod.git tests: improve sigprocmask()-related error messages When sigprocmask() fails for how=SIG_BLOCK|SIG_UNBLOCK, say explicitly we were unable to block/unblock SIGCHLD. Signed-off-by: Bartosz Golaszewski --- diff --git a/tests/gpiod-test.c b/tests/gpiod-test.c index f7073eb..53cbc95 100644 --- a/tests/gpiod-test.c +++ b/tests/gpiod-test.c @@ -499,7 +499,7 @@ void test_tool_run(char *tool, ...) status = sigprocmask(SIG_BLOCK, &sigmask, NULL); if (status) - die_perr("unable to mask signals"); + die_perr("unable to block SIGCHLD"); proc->sig_fd = signalfd(-1, &sigmask, 0); if (proc->sig_fd < 0) @@ -592,7 +592,7 @@ void test_tool_wait(void) status = sigprocmask(SIG_UNBLOCK, &sigmask, NULL); if (status) - die_perr("unable to unblock signals"); + die_perr("unable to unblock SIGCHLD"); gpiotool_readall(proc->stdout_fd, &proc->stdout); gpiotool_readall(proc->stderr_fd, &proc->stderr);