Skip to content
Commit 304c61a2 authored by DJ Delorie's avatar DJ Delorie
Browse files

test-container: move postclean outside of namespace changes



During postclean.req testing it was found that the fork in the
parent process (after the unshare syscall) would fail with ENOMEM
(see recursive_remove() in test-container.c).  While failing with
ENOMEM is certainly unexpected, it is simply easier to refactor
the design and have the parent remain outside of the namespace.
This change moves the postclean.req processing to a distinct
process (the parent) that then forks the test process (which will
have to fork once more to complete uid/gid transitions). When the
test process exists the cleanup process will ensure all files are
deleted when a post clean is requested.

Signed-off-by: default avatarDJ Delorie <dj@redhat.com>
Reviewed-by: default avatarCarlos O'Donell <carlos@redhat.com>

[BZ #23948]
* support/test-container.c: Move postclean step to before we
change namespaces.
parent cb7be159
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment