On 09.03.22 04:54, John Snow wrote:
With the exceptional 'create' calls removed in the prior commit, change
qemu_img_log() and img_info_log() to call qemu_img() directly
instead.
In keeping with the spirit of diff-based tests, allow these calls to
qemu_img() to return an unchecked non-zero status code -- because any
error we'd see from the output is going into the log anyway.
:(
I’d prefer having an exception that points exactly to where in the test
the offending qemu-img call was. But then again, I dislike such
log-based tests anyway, and this is precisely one reason for it...
I think Kevin disliked my approach of just `assert qemu_img() == 0`
mainly because you don’t get the stderr output with it. But you’ve
solved that problem now, so I don’t think there’s a reason why we
wouldn’t want a raised exception.
Hanna
Every last call to qemu-img is now either checked for a return code of
zero or has its output logged. It should be very hard to accidentally
ignore the return code *or* output from qemu-img now; intentional malice
remains unhandled.
Signed-off-by: John Snow <js...@redhat.com>
---
tests/qemu-iotests/iotests.py | 26 +++++++-------------------
1 file changed, 7 insertions(+), 19 deletions(-)