diff options
Diffstat (limited to 'test/test-common.sh')
-rw-r--r-- | test/test-common.sh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/test-common.sh b/test/test-common.sh index f81738a..ed3bdd0 100644 --- a/test/test-common.sh +++ b/test/test-common.sh @@ -53,12 +53,9 @@ _cleanup_chrootdir() ( chrootdir=$1 shopt -s nullglob if [[ $SUDO ]]; then - local chroottype=$(stat -f -c %T "$chrootdir") - if [[ "$chroottype" == btrfs ]]; then - sudo find "$chrootdir" -type d -print0 | - LC_ALL=C sort -rz | - xargs -r0 sudo -n \ - btrfs subvolume delete &>/dev/null || true + if [[ "$(stat -f -c %T "$chrootdir")" == btrfs ]]; then + sudo find "$chrootdir" -depth -inum 256 -exec \ + btrfs subvolume delete {} \; &>/dev/null fi sudo rm -rf -- "$chrootdir" else |