]> git.ipfire.org Git - thirdparty/glibc.git/commit
test-container: move postclean outside of namespace changes
authorDJ Delorie <dj@redhat.com>
Wed, 5 Dec 2018 17:39:47 +0000 (12:39 -0500)
committerDJ Delorie <dj@redhat.com>
Tue, 11 Dec 2018 03:37:58 +0000 (22:37 -0500)
commit304c61a24f909168c16793ccf7c686237e53d003
tree40615110b96a07ca41f77cd2991923dc99a74478
parentcb7be1590e9b18e272e72eb4e910a7ad06a53bd0
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: DJ Delorie <dj@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
[BZ #23948]
* support/test-container.c: Move postclean step to before we
change namespaces.
ChangeLog
support/test-container.c