]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
btrfs/300: check existence of unshare arguments
authorDarrick J. Wong <djwong@kernel.org>
Wed, 27 Sep 2023 01:42:58 +0000 (18:42 -0700)
committerZorro Lang <zlang@kernel.org>
Thu, 5 Oct 2023 14:41:09 +0000 (22:41 +0800)
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>
common/rc
tests/btrfs/300

index 95d397b05094e8f04b2037ef4e425658c4fa1f07..84fad4b8560c1e03ca41bf3d047aec71251029d5 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -5288,7 +5288,7 @@ _soak_loop_running() {
 
 _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
index ff87ee7112d3c34104330258a75e5d5f28538880..8a0eaecf87f7cd417c59c073508a31cbe198f288 100755 (executable)
@@ -20,7 +20,7 @@ _require_test
 _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() {