You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes the tst_brk() handling cleaner and saner as instead of
propagating the tst_brk() result in a return value an abort flag is
introduced into the shared memory.
Now:
- All the processes but the library one that reports the results exit
with 0
- tst_brk(TBROK, ...) increments result counters, sets the abort flag,
exit current process and makes sure all process group processes are
terminated
- all other tst_brk() variants will just increments the counters and
exits the current process (which is current iteration for
.all_filesystems, .test_variants, etc.)
This makes the tst_brk() behavior well defined so we can now even call
tst_brk() with TFAIL and TPASS as well. And since TBROK is supposed to
exit the test immediately (i.e. unrecoverable error) we are now
properly doing so.
The case that main test pid called TBROK was working correctly before
this patch, since send the SIGKILL signal to the process group after we
waited for the main test pid. All that was missing is a code that sends
a signal to the main test pid in the case that TBROK was triggered by
one of it's children and now we properly kill all test processes in that
case as well.
There is also special case where we call tst_brk() before the test
library has been initialized (mostly done by the C shell helpers) in
that case we have to exit with a proper return value, which is normally
done by the test library process.
Signed-off-by: Cyril Hrubis <[email protected]>
Acked-by: Andrea Cervesato <[email protected]>
Acked-by: Jan Stancek <[email protected]>
Reviewed-by: Petr Vorel <[email protected]>
0 commit comments