This tests that the -u, -g, -G, and -n options all work pretty much as
described. For -u we ensure that the group isn't touched, but this
might need re-worked in the future if we start taking the user's groups
with us.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 66251 Build 63134: arc lint + arc unit
Event Timeline
usr.sbin/chroot/tests/chroot_test.sh | ||
---|---|---|
61 | I'm guessing that the assumption is that /COPYRIGHT exists on the running system? It seems like it would be a good idea to create a known file in rootdir then test for it instead. |
usr.sbin/chroot/tests/chroot_test.sh | ||
---|---|---|
61 | We're looking for something that's not in rootdir, presumably to make sure that the chroot worked. We could perhaps atf_skip if /COPYRIGHT doesn't exist, or check that only the expected files exist or if that's too awkward just that the right number of files exist e.g. find / | wc -l? |
usr.sbin/chroot/tests/chroot_test.sh | ||
---|---|---|
61 | I think a positive test for /.chroot_file would probably be fine here. I was somewhat thinking of failures modes and had initially landed on making sure that something known to exist in the system root doesn't exist in the chroot, but some failure mode where the new root ends up being a mix of chroot-path files and system-root files would be very weird. |
atf_set "require.config" "allow_sysctl_side_effects" should be tested as well in the testcase headers for the tests that modify the systemwide sysctls.