btrfs-progs: convert tests: preserve test image permissions

If the test image is eg. on NFS it's not writable for root, so chmod
0777 fixes that but then we must not delete the file.

Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
David Sterba 2015-04-07 18:09:18 +02:00
parent 96563f961c
commit 35d53302ac
1 changed files with 3 additions and 1 deletions

View File

@ -24,8 +24,10 @@ convert_test() {
nodesize=$2
shift 2
echo "creating ext image with: $*" >> $RESULTS
# IMAGE not removed as the file might have special permissions, eg.
# when test image is on NFS and would not be writable for root
run_check truncate -s 0 $IMAGE
# 256MB is the smallest acceptable btrfs image.
run_check rm -f $IMAGE
run_check truncate -s 256M $IMAGE
run_check $* -F $IMAGE