From 9b88ac7ee50801254d8f8aad902bf39e269e257e Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Tue, 26 Sep 2023 18:42:58 -0700 Subject: [PATCH] btrfs/300: check existence of unshare arguments 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" Reviewed-by: Filipe Manana Signed-off-by: Zorro Lang --- common/rc | 2 +- tests/btrfs/300 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index 95d397b0..84fad4b8 100644 --- 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 diff --git a/tests/btrfs/300 b/tests/btrfs/300 index ff87ee71..8a0eaecf 100755 --- a/tests/btrfs/300 +++ b/tests/btrfs/300 @@ -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() { -- 2.39.5