ZTS: Fix 'could not unmount datasets' on Alma 9 (#15542)

Many tests are failing on AlmaLinux 9 because ZTS could not destroy the
pool in cleanup.  This was due to $PWD being set to '.' instead of the
expected full path.  This patch sets $PWD to the full path.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Don Brady <don.brady@delphix.com>
This commit is contained in:
Tony Hutter 2023-11-20 16:07:32 -08:00 committed by GitHub
parent cd67bc0ae4
commit a94860a6de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,12 @@
. ${STF_SUITE}/include/math.shlib . ${STF_SUITE}/include/math.shlib
. ${STF_SUITE}/include/blkdev.shlib . ${STF_SUITE}/include/blkdev.shlib
# On AlmaLinux 9 we will see $PWD = '.' instead of the full path. This causes
# some tests to fail. Fix it up here.
if [ "$PWD" = "." ] ; then
PWD="$(readlink -f $PWD)"
fi
# #
# Apply constrained path when available. This is required since the # Apply constrained path when available. This is required since the
# PATH may have been modified by sudo's secure_path behavior. # PATH may have been modified by sudo's secure_path behavior.