Skip to contentSkip to conversation

iotests: Make 087 pass without AIO enabled

PATCH Applied Max Reitz 2 participants 3 messages Nov 15, 2017 – Nov 17, 2017

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

PATCH 1/1 iotests: Make 087 pass without AIO enabled

If AIO has not been enabled in the qemu build that is to be tested, we should skip the "aio=native without O_DIRECT" test instead of failing.

---
Cleber wanted to fix this in July with his "build configuration query tool and conditional (qemu-io)test skip" series
(https://lists.gnu.org/archive/html/qemu-block/2017-07/msg01303.html),
but unfortunately there hasn't been any activity on that (as far as I can see), so let's just solve it the simple way.

---
 tests/qemu-iotests/087 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
tests/qemu-iotests/087 +8 -1
index 27ab6c5151..2561a14456 100755
@@ -102,7 +102,14 @@ echo
 echo === aio=native without O_DIRECT ===
 echo
 
-run_qemu <<EOF
+# Skip this test if AIO is not enabled in this build
+function run_qemu_filter_aio()
+{
+    run_qemu "$@" | \
+        sed -e 's/is not supported in this build/it requires cache.direct=on, which was not specified/'
+}
+
+run_qemu_filter_aio <<EOF
 { "execute": "qmp_capabilities" }
 { "execute": "blockdev-add",
   "arguments": {
Signature · 1 line
2.13.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Max Reitz

If AIO has not been enabled in the qemu build that is to be tested, we should skip the "aio=native without O_DIRECT" test instead of failing.

---
Cleber wanted to fix this in July with his "build configuration query tool and conditional (qemu-io)test skip" series
(https://lists.gnu.org/archive/html/qemu-block/2017-07/msg01303.html),
but unfortunately there hasn't been any activity on that (as far as I can see), so let's just solve it the simple way.

Quoted 3 lines
---
 tests/qemu-iotests/087 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Yep, that's about as simple as possible.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
author Applied
#2 lore raw
In reply to Max Reitz
Quoted 10 lines · Max Reitz

If AIO has not been enabled in the qemu build that is to be tested, we should skip the "aio=native without O_DIRECT" test instead of failing.

---
Cleber wanted to fix this in July with his "build configuration query tool and conditional (qemu-io)test skip" series
(https://lists.gnu.org/archive/html/qemu-block/2017-07/msg01303.html),
but unfortunately there hasn't been any activity on that (as far as I can see), so let's just solve it the simple way.

Quoted 3 lines
---
 tests/qemu-iotests/087 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Applied to my block branch:

https://github.com/XanClic/qemu/commits/block

Max