We use the prepare_test_dev helper to make sure the image has at least
this size. The "at least" part is not desired by some tests as the
device might be larger than the test expects.
Signed-off-by: David Sterba <dsterba@suse.com>
[[ "$size" ]] || size='2G'
# Still truncate it to new size
if [ -n "$TEST_DEV" ]; then
[[ "$size" ]] || size='2G'
# Still truncate it to new size
if [ -n "$TEST_DEV" ]; then
+ truncate -s 0 "$TEST_DEV"
truncate -s "$size" "$TEST_DEV"
return;
fi
truncate -s "$size" "$TEST_DEV"
return;
fi
"$RESULTS"
TEST_DEV="$TOP/tests/test.img"
"$RESULTS"
TEST_DEV="$TOP/tests/test.img"
+ truncate -s 0 "$TEST_DEV"
truncate -s "$size" "$TEST_DEV" || _not_run "create file for loop device failed"
}
truncate -s "$size" "$TEST_DEV" || _not_run "create file for loop device failed"
}