Skip to content

Commit

Permalink
ZTS: Fix 'could not unmount datasets' on Alma 9 (#15542)
Browse files Browse the repository at this point in the history
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]>
Reviewed-by: Don Brady <[email protected]>
  • Loading branch information
tonyhutter authored and behlendorf committed Feb 13, 2024
1 parent dffe59c commit bc42a2f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/zfs-tests/include/libtest.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@

. ${STF_SUITE}/include/tunables.cfg

# 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.
Expand Down

0 comments on commit bc42a2f

Please sign in to comment.