Skip to content

Commit

Permalink
kselftests: dmabuf-heaps: Fix confused return value on expected error…
Browse files Browse the repository at this point in the history
… testing

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>
  • Loading branch information
John Stultz authored and Shuah Khan committed May 8, 2020
1 parent 0e698df commit 4bb9d46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4bb9d46

Please sign in to comment.