Make sure the installed unshare binary supports all the arguments that
it wants to use. The unshare program on my system (Ubuntu 22.04)
doesn't support --map-auto, so this test fails unnecessarily.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
_require_unshare() {
unshare -f -r -m -p -U $@ true &>/dev/null || \
- _notrun "unshare: command not found, should be in util-linux"
+ _notrun "unshare $*: command not found, should be in util-linux"
}
# Return a random file in a directory. A directory is *not* followed
_require_user
_require_group
_require_unix_perm_checking
-_require_unshare
+_require_unshare --keep-caps --map-auto --map-root-user
test_dir="${TEST_DIR}/${seq}"
cleanup() {