|
From: | Hanna Reitz |
Subject: | Re: [PATCH 12/14] iotests: remove qemu_img_pipe_and_status() |
Date: | Thu, 17 Mar 2022 16:28:22 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
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 <jsnow@redhat.com> --- tests/qemu-iotests/iotests.py | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-)
[Prev in Thread] | Current Thread | [Next in Thread] |