[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210129030514.1231773-3-john.stultz@linaro.org>
Date: Fri, 29 Jan 2021 03:05:12 +0000
From: John Stultz <john.stultz@...aro.org>
To: lkml <linux-kernel@...r.kernel.org>
Cc: John Stultz <john.stultz@...aro.org>,
Shuah Khan <shuah@...nel.org>,
Brian Starkey <brian.starkey@....com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Laura Abbott <labbott@...nel.org>,
Hridya Valsaraju <hridya@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Sandeep Patil <sspatil@...gle.com>,
Daniel Mentz <danielmentz@...gle.com>,
linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kselftest@...r.kernel.org
Subject: [PATCH 3/5] kselftests: dmabuf-heaps: Softly fail if don't find a vgem device
While testing against a vgem device is helpful for testing importing
they aren't always configured in, so don't make it a fatal failure.
Cc: Shuah Khan <shuah@...nel.org>
Cc: Brian Starkey <brian.starkey@....com>
Cc: Sumit Semwal <sumit.semwal@...aro.org>
Cc: Laura Abbott <labbott@...nel.org>
Cc: Hridya Valsaraju <hridya@...gle.com>
Cc: Suren Baghdasaryan <surenb@...gle.com>
Cc: Sandeep Patil <sspatil@...gle.com>
Cc: Daniel Mentz <danielmentz@...gle.com>
Cc: linux-media@...r.kernel.org
Cc: dri-devel@...ts.freedesktop.org
Cc: linux-kselftest@...r.kernel.org
Signed-off-by: John Stultz <john.stultz@...aro.org>
---
.../testing/selftests/dmabuf-heaps/dmabuf-heap.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
index 46f6759a8acc..8cedd539c7fb 100644
--- a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
+++ b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
@@ -184,15 +184,14 @@ static int test_alloc_and_import(char *heap_name)
if (importer_fd < 0) {
ret = importer_fd;
printf("Failed to open vgem\n");
- goto out;
- }
-
- ret = import_vgem_fd(importer_fd, dmabuf_fd, &handle);
- if (ret < 0) {
- printf("Failed to import buffer\n");
- goto out;
+ } else {
+ ret = import_vgem_fd(importer_fd, dmabuf_fd, &handle);
+ if (ret < 0) {
+ printf("Failed to import buffer\n");
+ goto out;
+ }
+ printf("import passed\n");
}
- printf("import passed\n");
ret = dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_START);
if (ret < 0) {
--
2.25.1
Powered by blists - more mailing lists