aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/211
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-02-18 19:06:46 +0100
committerMax Reitz <mreitz@redhat.com>2019-02-25 15:11:28 +0100
commit6a4e88e17966a963ee818daab3d0c9fa6bf73903 (patch)
tree2e82fcbdb5617c9b7741ec4a9676904507356a94 /tests/qemu-iotests/211
parent26c9296c31bc5d0fab24379af0a1684b099067de (diff)
downloadqemu-6a4e88e17966a963ee818daab3d0c9fa6bf73903.zip
qemu-6a4e88e17966a963ee818daab3d0c9fa6bf73903.tar.gz
qemu-6a4e88e17966a963ee818daab3d0c9fa6bf73903.tar.bz2
iotests: Skip 211 on insufficient memory
VDI keeps the whole bitmap in memory, and the maximum size (which is tested here) is 2 GB. This may not be available on all machines, and it rarely is available when running a 32 bit build. Fix this by making VM.run_job() return the error string if an error occurred, and checking whether that contains "Could not allocate bmap" in 211. If so, the test is skipped. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190218180646.30282-1-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/211')
-rwxr-xr-xtests/qemu-iotests/2114
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/qemu-iotests/211 b/tests/qemu-iotests/211
index 5d28545..6afc894 100755
--- a/tests/qemu-iotests/211
+++ b/tests/qemu-iotests/211
@@ -32,7 +32,9 @@ def blockdev_create(vm, options):
if 'return' in result:
assert result['return'] == {}
- vm.run_job('job0')
+ error = vm.run_job('job0')
+ if error and 'Could not allocate bmap' in error:
+ iotests.notrun('Insufficient memory')
iotests.log("")
with iotests.FilePath('t.vdi') as disk_path, \