+# Subv2 may have already been unmounted, so here we ignore all output. +# This may hide some errors like -EBUSY, but the next rm line would +# detect any still mounted subvolume so we're still safe. +$UMOUNT_PROG "$subv2_mount" &> /dev/null + +# If above unmount, especially subv2 is not properly unmounted, +# the rm should fail with some error message +rm -r -- "$subv1_mount" "$subv2_mount"
nit: Nice, if unmounting $subvol2_mount fails, rm will fail as well. To capture the unmount error why not redirect its output to the test case’s full log: unmount $subvol2_mount >> $seqres.full. If you're fine with it, Zorro can consider to change this during the merge. Nevertheless, the code looks good. Reviewed-by: Anand Jain <anand.jain@xxxxxxxxxx> Thx, Anand