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 <sh...@kernel.org>
Cc: Sumit Semwal <sumit.sem...@linaro.org>
Cc: Benjamin Gaignard <benjamin.gaign...@linaro.org>
Cc: Brian Starkey <brian.star...@arm.com>
Cc: Laura Abbott <labb...@redhat.com>
Cc: "Andrew F. Davis" <a...@ti.com>
Cc: linux-kselft...@vger.kernel.org
Signed-off-by: John Stultz <john.stu...@linaro.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

Reply via email to