lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 13 May 2020 11:33:09 +0100
From:   Brian Starkey <brian.starkey@....com>
To:     John Stultz <john.stultz@...aro.org>
Cc:     lkml <linux-kernel@...r.kernel.org>, Shuah Khan <shuah@...nel.org>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        Laura Abbott <labbott@...hat.com>,
        "Andrew F. Davis" <afd@...com>, linux-kselftest@...r.kernel.org,
        nd@....com
Subject: Re: [PATCH] kselftests: dmabuf-heaps: Fix confused return value on
 expected error testing

Hi John,

On Fri, May 08, 2020 at 04:56:10AM +0000, John Stultz wrote:
> When I added the expected error testing, I forgot I need to set
> the return to zero when we successfully see an error.
> 
> Without this change we only end up testing a single heap
> before the test quits.
> 

The fix looks fine - feel free to add my r-b.

However taking a new look at the tests, what do you think about
conceptually replacing the 'break's with 'continue's? Is there a
reason to skip all the other heaps if one of them fails a test?

Thanks,
-Brian

> Cc: Shuah Khan <shuah@...nel.org>
> Cc: Sumit Semwal <sumit.semwal@...aro.org>
> Cc: Benjamin Gaignard <benjamin.gaignard@...aro.org>
> Cc: Brian Starkey <brian.starkey@....com>
> Cc: Laura Abbott <labbott@...hat.com>
> Cc: "Andrew F. Davis" <afd@...com>
> Cc: linux-kselftest@...r.kernel.org
> Signed-off-by: John Stultz <john.stultz@...aro.org>
> ---
>  tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
> index cd5e1f602ac9..909da9cdda97 100644
> --- a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
> +++ b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
> @@ -351,6 +351,7 @@ static int test_alloc_errors(char *heap_name)
>  	}
>  
>  	printf("Expected error checking passed\n");
> +	ret = 0;
>  out:
>  	if (dmabuf_fd >= 0)
>  		close(dmabuf_fd);
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ