* [Qemu-devel] [PATCH] iotests: Skip test for ENOMEM error
@ 2018-03-01 1:14 Fam Zheng
2018-03-01 20:15 ` Eric Blake
2018-03-05 17:06 ` Max Reitz
0 siblings, 2 replies; 3+ messages in thread
From: Fam Zheng @ 2018-03-01 1:14 UTC (permalink / raw)
To: qemu-devel; +Cc: famz, Kevin Wolf, Max Reitz, qemu-block, eblake
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>
---
tests/qemu-iotests/059 | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059
index 40f89eae18..530bbbe6ce 100755
--- a/tests/qemu-iotests/059
+++ b/tests/qemu-iotests/059
@@ -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
--
2.14.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: Skip test for ENOMEM error
2018-03-01 1:14 [Qemu-devel] [PATCH] iotests: Skip test for ENOMEM error Fam Zheng
@ 2018-03-01 20:15 ` Eric Blake
2018-03-05 17:06 ` Max Reitz
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2018-03-01 20:15 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: Kevin Wolf, Max Reitz, qemu-block
On 02/28/2018 07:14 PM, Fam Zheng wrote:
> 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>
> ---
> tests/qemu-iotests/059 | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059
> index 40f89eae18..530bbbe6ce 100755
> --- a/tests/qemu-iotests/059
> +++ b/tests/qemu-iotests/059
> @@ -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
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: Skip test for ENOMEM error
2018-03-01 1:14 [Qemu-devel] [PATCH] iotests: Skip test for ENOMEM error Fam Zheng
2018-03-01 20:15 ` Eric Blake
@ 2018-03-05 17:06 ` Max Reitz
1 sibling, 0 replies; 3+ messages in thread
From: Max Reitz @ 2018-03-05 17:06 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: Kevin Wolf, qemu-block, eblake
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
On 2018-03-01 02:14, Fam Zheng wrote:
> 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>
> ---
> tests/qemu-iotests/059 | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Thanks! Applied to my block branch:
https://github.com/XanClic/qemu/commits/block
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-05 17:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01 1:14 [Qemu-devel] [PATCH] iotests: Skip test for ENOMEM error Fam Zheng
2018-03-01 20:15 ` Eric Blake
2018-03-05 17:06 ` Max Reitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).