mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
iotests: Fix cluster size in parallels images tests (131)
In this test cluster size is 64k, but modern tools generate images with cluster size 1M. Calculate cluster size using track field from image header. Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com> Reviewed-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Denis V. Lunev <den@openvz.org>
This commit is contained in:
parent
dbfc55606a
commit
8e10861b7d
2 changed files with 26 additions and 23 deletions
|
@ -44,10 +44,13 @@ _supported_os Linux
|
|||
inuse_offset=$((0x2c))
|
||||
|
||||
size=$((64 * 1024 * 1024))
|
||||
CLUSTER_SIZE=$((64 * 1024))
|
||||
IMGFMT=parallels
|
||||
_make_test_img $size
|
||||
|
||||
# get cluster size in sectors from "tracks" header field
|
||||
CLUSTER_SIZE_OFFSET=28
|
||||
CLUSTER_SIZE=$(peek_file_le $TEST_IMG $CLUSTER_SIZE_OFFSET 4)
|
||||
CLUSTER_SIZE=$((CLUSTER_SIZE * 512))
|
||||
CLUSTER_HALF_SIZE=$((CLUSTER_SIZE / 2))
|
||||
CLUSTER_DBL_SIZE=$((CLUSTER_SIZE * 2))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue