btrfs-progs: tests: remove temporary loopdev files

Remove files for testing loop devices when using the helper.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-09-12 18:17:51 +02:00
parent 29faad6339
commit 03fb34b6b4
1 changed files with 2 additions and 1 deletions

View File

@ -551,7 +551,7 @@ prepare_loopdevs()
done
}
# detach loop devices and reset their size to 0, does not delete the files
# detach loop devices and reset their size to 0, delete the files afterwards
cleanup_loopdevs()
{
for dev in ${loopdevs[@]}; do
@ -559,6 +559,7 @@ cleanup_loopdevs()
done
for i in `seq $nloopdevs`; do
truncate -s0 $loopdev_prefix$i
rm -- "$loopdev_prefix$i"
done
run_check $SUDO_HELPER losetup --all
}