aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/tests/qsd-jobs
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2021-04-01 15:28:39 +0200
committerKevin Wolf <kwolf@redhat.com>2021-04-09 18:00:29 +0200
commit66f18320f751f9649e0f230e814dd556e38bc1fe (patch)
tree1e9f2ea2711fc7cd669691ea75a719caa06e1671 /tests/qemu-iotests/tests/qsd-jobs
parentb084b420d9d6347dede328fbcf18c8e4c695f7e8 (diff)
iotests/qsd-jobs: Filter events in the first test
The job may or may not be ready before the 'quit' is issued. Whether it is is irrelevant; for the purpose of the test, it only needs to still be there. Filter the job status change and READY events from the output so it becomes reliable. Reported-by: Peter Maydell <peter.maydell@linaro.org> Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210401132839.139939-1-mreitz@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/tests/qsd-jobs')
-rwxr-xr-xtests/qemu-iotests/tests/qsd-jobs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/qemu-iotests/tests/qsd-jobs b/tests/qemu-iotests/tests/qsd-jobs
index 972b6b3898..510bf0a9dc 100755
--- a/tests/qemu-iotests/tests/qsd-jobs
+++ b/tests/qemu-iotests/tests/qsd-jobs
@@ -52,9 +52,12 @@ echo "=== Job still present at shutdown ==="
echo
# Just make sure that this doesn't crash
+# (Filter job status and READY events, because their order may differ
+# between runs, particularly around when 'quit' is issued)
$QSD --chardev stdio,id=stdio --monitor chardev=stdio \
--blockdev node-name=file0,driver=file,filename="$TEST_IMG" \
- --blockdev node-name=fmt0,driver=qcow2,file=file0 <<EOF | _filter_qmp
+ --blockdev node-name=fmt0,driver=qcow2,file=file0 <<EOF \
+ | _filter_qmp | grep -v JOB_STATUS_CHANGE | grep -v BLOCK_JOB_READY
{"execute":"qmp_capabilities"}
{"execute": "block-commit", "arguments": {"device": "fmt0", "job-id": "job0"}}
{"execute": "quit"}