On 12.09.2016 10:20, Erik Skultety wrote:
> The virsh-self-test script compared the test's return code with 1 and only if
> the return code matched this value then the test was marked as failed. Problem
> is that SIGSEGV returns 139 (or 11 to be precise, since shell reserves the MSB
> for abnormal exit signaling) which passes the check just fine and test then
> appears as successful which it most certainly wasn't.
> Therefore, flip the logic to compare against 0 instead and every other result
> will be treated as a failed test case.
> 
> Signed-off-by: Erik Skultety <eskul...@redhat.com>
> ---
>  tests/virsh-self-test | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/virsh-self-test b/tests/virsh-self-test
> index c51fcf4..641810f 100755
> --- a/tests/virsh-self-test
> +++ b/tests/virsh-self-test
> @@ -28,7 +28,7 @@ $abs_top_builddir/tools/virsh -c $test_url self-test > 
> /dev/null
>  status=$?
>  test_result 1 "virsh-self-test" $status
>  
> -if test "$status" = "1" ; then
> +if test "$status" != "0" ; then
>     fail=1
>  fi
>  
> 

ACK

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to