kselftests: dmabuf-heaps: Fix confused return value on expected error testing
authorJohn Stultz <john.stultz@linaro.org>
Fri, 8 May 2020 04:56:10 +0000 (04:56 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 8 May 2020 15:40:58 +0000 (09:40 -0600)
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 <shuah@kernel.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Brian Starkey <brian.starkey@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: "Andrew F. Davis" <afd@ti.com>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c

index cd5e1f6..909da9c 100644 (file)
@@ -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);