[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/36] iotests: Use stat -c %b in 125
From: |
Max Reitz |
Subject: |
[PULL 28/36] iotests: Use stat -c %b in 125 |
Date: |
Thu, 10 Oct 2019 13:42:52 +0200 |
125 should not use qemu-img to get the on-disk image size, because that
reports it in a human-readable format that is useless to us. Just use
stat instead (like we do to get the image file length).
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/125 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/125 b/tests/qemu-iotests/125
index 0ef51f1e21..4e31aa4e5f 100755
--- a/tests/qemu-iotests/125
+++ b/tests/qemu-iotests/125
@@ -34,8 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
get_image_size_on_host()
{
- $QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep "disk size" \
- | sed -e 's/^[^0-9]*\([0-9]\+\).*$/\1/'
+ echo $(($(stat -c '%b * %B' "$TEST_IMG_FILE")))
}
# get standard environment and filters
--
2.21.0
- [PULL 18/36] qapi: add unmap to BlockDeviceStats, (continued)
- [PULL 18/36] qapi: add unmap to BlockDeviceStats, Max Reitz, 2019/10/10
- [PULL 19/36] block: add empty account cookie type, Max Reitz, 2019/10/10
- [PULL 20/36] ide: account UNMAP (TRIM) operations, Max Reitz, 2019/10/10
- [PULL 21/36] scsi: store unmap offset and nb_sectors in request struct, Max Reitz, 2019/10/10
- [PULL 22/36] scsi: move unmap error checking to the complete callback, Max Reitz, 2019/10/10
- [PULL 23/36] scsi: account unmap operations, Max Reitz, 2019/10/10
- [PULL 24/36] file-posix: account discard operations, Max Reitz, 2019/10/10
- [PULL 25/36] qapi: query-blockstat: add driver specific file-posix stats, Max Reitz, 2019/10/10
- [PULL 27/36] iotests: Disable 125 on broken XFS versions, Max Reitz, 2019/10/10
- [PULL 26/36] iotests: Fix 125 for growth_mode = metadata, Max Reitz, 2019/10/10
- [PULL 28/36] iotests: Use stat -c %b in 125,
Max Reitz <=
- [PULL 29/36] block/backup: move in-flight requests handling from backup to block-copy, Max Reitz, 2019/10/10
- [PULL 30/36] block/backup: move write_flags calculation inside backup_job_create, Max Reitz, 2019/10/10
- [PULL 31/36] block/block-copy: split block_copy_set_callbacks function, Max Reitz, 2019/10/10
- [PULL 34/36] nbd: add empty .bdrv_reopen_prepare, Max Reitz, 2019/10/10
- [PULL 32/36] block: introduce backup-top filter driver, Max Reitz, 2019/10/10
- [PULL 36/36] iotests/162: Fix for newer Linux 5.3+, Max Reitz, 2019/10/10
- [PULL 35/36] tests: fix I/O test for hosts defaulting to LUKSv2, Max Reitz, 2019/10/10
- [PULL 33/36] block/backup: use backup-top instead of write notifiers, Max Reitz, 2019/10/10