Skip to content

iotests: Fix 125

Max Reitz qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iotests: Fix 125 for growth_mode = metadatatests/qemu-iotests/125+1 -11 reply
2/3iotests: Disable 125 on broken XFS versionstests/qemu-iotests/125+40 -02 replies
3/3iotests: Use stat -c %b in 125tests/qemu-iotests/125+1 -21 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] iotests: Fix 125

Hi,

iotest 125 is very broken. It uses qemu-img info’s “disk size” to determine an image’s on-disk size, but it does so in a wrong way: It just fetches the first number ([0-9]+), but that isn’t very useful because qemu-img info emits human-readable values that include units and decimal points.

We should ust stat -c %b instead. That’s done in patch 3. Unfortunately, doing so exposed more problems.

Patch 1 fixes a stupid bug in the test itself that we never noticed because of what patch 3 fixes. (Pull patch 3 before patch 1 and you’ll see.)

The other thing is actually a bug in XFS. Its fallocate() implementation rounds up the length independently of the offset, so if you try to fallocate an unaligned range, chances are that it might not allocate the last block your range touches. Patch 2 detects that case and skips the test then. (Pull patch 3 before patch 2 and you’ll see the test fail on XFS.)

Max Reitz (3):
iotests: Fix 125 for growth_mode = metadata
iotests: Disable 125 on broken XFS versions
iotests: Use stat -c %b in 125

 tests/qemu-iotests/125 | 45 +++++++++++++++++++++++++++++++++++++++---
 1 file changed, 42 insertions(+), 3 deletions(-)
Signature · 1 line
2.21.0