summaryrefslogtreecommitdiffstats
path: root/scripts/zfs-tests.sh
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-01-29 14:23:20 -0500
committerGitHub <[email protected]>2020-01-29 11:23:20 -0800
commit74b4d349b3740cf654f762e4afe1e51afc9febb8 (patch)
tree9987c164e77a18b28617bd40119244de8e5e8cc8 /scripts/zfs-tests.sh
parent0ecd9109238f1e322b9a3a44781277b7b7ce5c38 (diff)
ZTS: Reverse constrained path lookup order
FreeBSD base system zfs utils are in /sbin. ZoF utils install to /usr/local/sbin. Ensure we link to the ZoF utils not the base utils when searching for utils to constrain paths to for the tests. Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #9906
Diffstat (limited to 'scripts/zfs-tests.sh')
-rwxr-xr-xscripts/zfs-tests.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/zfs-tests.sh b/scripts/zfs-tests.sh
index ca680953e..e1e114128 100755
--- a/scripts/zfs-tests.sh
+++ b/scripts/zfs-tests.sh
@@ -239,8 +239,11 @@ create_links() {
constrain_path() {
. "$STF_SUITE/include/commands.cfg"
- SYSTEM_DIRS="/bin /sbin /usr/bin /usr/sbin"
- SYSTEM_DIRS+=" /usr/local/bin /usr/local/sbin"
+ # On FreeBSD, base system zfs utils are in /sbin and OpenZFS utils
+ # install to /usr/local/sbin. To avoid testing the wrong utils we
+ # need /usr/local to come before / in the path search order.
+ SYSTEM_DIRS="/usr/local/bin /usr/local/sbin"
+ SYSTEM_DIRS+=" /usr/bin /usr/sbin /bin /sbin"
if [ "$INTREE" = "yes" ]; then
# Constrained path set to ./zfs/bin/