]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
iotests: Skip test for ENOMEM error
authorFam Zheng <famz@redhat.com>
Thu, 1 Mar 2018 01:14:13 +0000 (09:14 +0800)
committerMax Reitz <mreitz@redhat.com>
Fri, 9 Mar 2018 14:40:07 +0000 (15:40 +0100)
The AFL image is to exercise the code validating image size, which
doesn't work on 32 bit or when out of memory (there is a large
allocation before the interesting point). So check that and skip the
test, instead of faking the result.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 20180301011413.11531-1-famz@redhat.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
tests/qemu-iotests/059

index 40f89eae18b879dbfa683b32081efe1d793ed5d0..530bbbe6ce4eff257bc44ae5092f34a76a7fcd8d 100755 (executable)
@@ -152,9 +152,8 @@ done
 echo
 echo "=== Testing afl image with a very large capacity ==="
 _use_sample_img afl9.vmdk.bz2
-# The sed makes this test pass on machines with little RAM
-# (and also with 32 bit builds)
-_img_info | sed -e 's/Cannot allocate memory/Invalid argument/'
+_img_info | grep -q 'Cannot allocate memory' && _notrun "Insufficent memory, skipped test"
+_img_info
 _cleanup_test_img
 
 # success, all done