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 <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #9906
This commit is contained in:
Ryan Moeller 2020-01-29 14:23:20 -05:00 committed by GitHub
parent 0ecd910923
commit 74b4d349b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -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/