diff options
author | Tony Hutter <[email protected]> | 2023-11-18 13:07:06 -0800 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2023-11-20 13:20:56 -0800 |
commit | 78287023ced23c956b953a953006c0c2b884954d (patch) | |
tree | bc8460945b079f3c4f09723b09264a33c81ed4d9 /tests | |
parent | 479dca51c66a731e637bd2d4f9bba01a05f9ac9f (diff) |
ZTS: Fix 'could not unmount datasets' on Alma 9
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 <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/zfs-tests/include/libtest.shlib | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index d5d7bb6c8..b4d2b91dd 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -37,6 +37,12 @@ . ${STF_SUITE}/include/math.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 # PATH may have been modified by sudo's secure_path behavior. |