moby/pkg/chrootarchive
Cory Snider f77a3274b4
[chore] clean up reexec.Init() calls
Now that most uses of reexec have been replaced with non-reexec
solutions, most of the reexec.Init() calls peppered throughout the test
suites are unnecessary. Furthermore, most of the reexec.Init() calls in
test code neglects to check the return value to determine whether to
exit, which would result in the reexec'ed subprocesses proceeding to run
the tests, which would reexec another subprocess which would proceed to
run the tests, recursively. (That would explain why every reexec
callback used to unconditionally call os.Exit() instead of returning...)

Remove unneeded reexec.Init() calls from test and example code which no
longer needs it, and fix the reexec.Init() calls which are not inert to
exit after a reexec callback is invoked.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 4e0319c878)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-11 16:31:41 +02:00
..
archive.go Disable chrootarchive.init() on Windows 2023-01-18 16:34:13 +02:00
archive_test.go [chore] clean up reexec.Init() calls 2023-05-11 16:31:41 +02:00
archive_unix.go Disable chrootarchive.init() on Windows 2023-01-18 16:34:13 +02:00
archive_unix_test.go pkg/chrootarchive: gofumpt test files 2022-10-16 14:09:06 +02:00
archive_windows.go Add reusable chroot and unshare utilities 2022-10-26 12:06:31 -04:00
chroot_linux.go Add reusable chroot and unshare utilities 2022-10-26 12:06:31 -04:00
diff.go Add canonical import comment 2018-02-05 16:51:57 -05:00
diff_unix.go Add reusable chroot and unshare utilities 2022-10-26 12:06:31 -04:00
diff_windows.go pkg/archive: create whiteout temp dir under dest 2022-10-26 12:04:37 -04:00