From: John Stultz Date: Fri, 8 May 2020 04:56:10 +0000 (+0000) Subject: kselftests: dmabuf-heaps: Fix confused return value on expected error testing X-Git-Tag: v5.6.16~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a592ca2172b8a0ed8be55d30a6ccb1028ab947fe;p=thirdparty%2Fkernel%2Fstable.git kselftests: dmabuf-heaps: Fix confused return value on expected error testing [ Upstream commit 4bb9d46d47b105a774f9dca642f5271375bca4b2 ] 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. Cc: Shuah Khan Cc: Sumit Semwal Cc: Benjamin Gaignard Cc: Brian Starkey Cc: Laura Abbott Cc: "Andrew F. Davis" Cc: linux-kselftest@vger.kernel.org Signed-off-by: John Stultz Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c index cd5e1f602ac9d..909da9cdda97f 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);