aboutsummaryrefslogtreecommitdiff
path: root/tests/test-mul64.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2018-04-06 17:17:30 +0200
committerMax Reitz <mreitz@redhat.com>2018-05-15 16:15:21 +0200
commit81c6ddf49a76a663cea16c07a07d51b67c853209 (patch)
tree34cea042a0663c06a274b3ac5bac0d873dfba057 /tests/test-mul64.c
parent603790ef3aec6a19b1c095188a1d2171934a27de (diff)
iotests: Add failure matching to common.qemu
Currently, common.qemu only allows to match for results indicating success. The only way to fail is by provoking a timeout. However, sometimes we do have a defined failure output and can match for that, which saves us from having to wait for the timeout in case of failure. Because failure can sometimes just result in a _notrun in the test, it is actually important to care about being able to fail quickly. Also, sometimes we simply do not get any specific output in case of success. The only way to handle this currently would be to define an error message as the string to look for, which means that actual success results in a timeout. This is really bad because it unnecessarily slows down a succeeding test. Therefore, this patch adds a new parameter $success_or_failure to _timed_wait_for and _send_qemu_cmd. Setting this to a non-empty string makes both commands expect two match parameters: If the first matches, the function succeeds. If the second matches, the function fails. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20180406151731.4285-2-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/test-mul64.c')
0 files changed, 0 insertions, 0 deletions