Skip to content

Commit

Permalink
ZTS: Fix 'could not unmount datasets' on Alma 9
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 the test running within the mounted
dataset directory (/var/tmp/testdir).  If you change to a different
directory before doing the zpool destroy the failure goes away.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
  • Loading branch information
tonyhutter committed Nov 18, 2023
1 parent cd67bc0 commit 58241e9
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 @@ -1569,7 +1569,13 @@ function destroy_pool #pool
# to destroy a pool to fail with EBUSY. We retry a few
# times allowing failures before requiring the destroy
# to succeed.
#
# Also, sometimes we're in the directory we're trying
# to unmount so to / when we're doing a destroy.
OLDPWD="$PWD"
cd /
log_must_busy zpool destroy -f $pool
cd "$OLDPWD"

[[ -d $mtpt ]] && \
log_must rm -rf $mtpt
Expand Down

0 comments on commit 58241e9

Please sign in to comment.