Linux-kselftest Archive on
 help / color / Atom feed
* [PATCH AUTOSEL 5.6 13/41] kselftests: dmabuf-heaps: Fix confused return value on expected error testing
       [not found] <>
@ 2020-05-22 14:49 ` Sasha Levin
  0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2020-05-22 14:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: John Stultz, Shuah Khan, Sumit Semwal, Benjamin Gaignard,
	Brian Starkey, Laura Abbott, Andrew F. Davis, linux-kselftest,
	Shuah Khan, Sasha Levin, linux-api

From: John Stultz <>

[ 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" <>
Signed-off-by: John Stultz <>
Signed-off-by: Shuah Khan <>
Signed-off-by: Sasha Levin <>
 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;
 	if (dmabuf_fd >= 0)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2020-05-22 14:49 ` [PATCH AUTOSEL 5.6 13/41] kselftests: dmabuf-heaps: Fix confused return value on expected error testing Sasha Levin

Linux-kselftest Archive on

Archives are clonable:
	git clone --mirror linux-kselftest/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kselftest linux-kselftest/ \
	public-inbox-index linux-kselftest

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone