[libvirt] [PATCH 2/2] virt-aa-helper-test: only fails go to stdout by default

Jamie Strandboge jamie at canonical.com
Thu Oct 26 14:20:38 UTC 2017


On Thu, 2017-10-26 at 15:22 +0200, Christian Ehrhardt wrote:
> By Default (without -d) the tests will only print Failures.
> So a log should follow general "no message is a good message" style.
> 
> But the testfw checks always emit the skip info to stdout. Instead
> they should use the redirection that is controlled by -d.
> 
> This avoids mesages like the following to clutter the log:
>   Skipping FW AAVMF32 test. Could not find
> /usr/share/AAVMF/AAVMF32_CODE.fd
> 
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> ---
>  tests/virt-aa-helper-test | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/virt-aa-helper-test b/tests/virt-aa-helper-test
> index e837668..d2a557e 100755
> --- a/tests/virt-aa-helper-test
> +++ b/tests/virt-aa-helper-test
> @@ -155,7 +155,7 @@ testfw() {
>              -e "s,</os>,<loader readonly='yes'
> type='pflash'>$fwpath</loader></os>,g" "$template_xml" > "$test_xml"
>          testme "0" "$title" "-r -u $valid_uuid" "$test_xml"
>      else
> -        echo "Skipping FW $title test. Could not find $fwpath"
> +        echo "Skipping FW $title test. Could not find $fwpath"
> >$output
>      fi
>  }

LGTM. Thanks!

-- 
Jamie Strandboge             | http://www.canonical.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20171026/50f590c1/attachment-0001.sig>


More information about the libvir-list mailing list