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 <sh...@kernel.org> Cc: Brian Starkey <brian.star...@arm.com> Cc: Sumit Semwal <sumit.sem...@linaro.org> Cc: Laura Abbott <labb...@kernel.org> Cc: Hridya Valsaraju <hri...@google.com> Cc: Suren Baghdasaryan <sur...@google.com> Cc: Sandeep Patil <sspa...@google.com> Cc: Daniel Mentz <danielme...@google.com> Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Cc: linux-kselft...@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro.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