On 05/19/2014 08:34 PM, Nikolai Kondrashov wrote:
On 05/19/2014 07:40 PM, Lukas Slebodnik wrote:
> I had to execute tests without valgring argument "--error-exitcode=99".
> With this argument, talloc destructor "mock_server_cleanup" failed.
>
> src/tests/common_dbus.c
> mock_server_cleanup
> 66 /* Wait for the server child, it always returns mock */
> 67 verify_eq (waitpid(mock->pid, &child_status, 0),
mock->pid);
> >68 verify_eq (child_status, 0);
> 69
> 70 file = strchr(mock->dbus_address, '/');
>
> and verify_eq is macro which use abort.
>
> do { if ((x) != (y)) { fprintf(stderr, "failed: %s == %s\n", #x, #y);
abort(); } } while (0)
Yes, I managed not to notice this before, behind other errors, but I get these
too. It seems it is reall a Valgrind issue. I.e. it doesn't seem to make sense
to apply "--error-exitcode" to child processes.
However, it seems that the exit status of the process in question is hardcoded
to zero. So, can we perhaps work this around for now by changing the assertion
to the following?
verify_eq (WIFSIGNALED(child_status), 0);
If yes, I'll submit a patch.
Scratch that. The "--error-exitcode" option is useless with child tracking,
anyway. Any errors in children will not affect exit code of the parent
Valgrind. I guess I'll have to do XML Valgrind output and analyze that.
Sigh...
Nick