From patchwork Fri Jan 29 03:05:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 373275 Delivered-To: patches@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1807960jam; Thu, 28 Jan 2021 19:05:20 -0800 (PST) X-Received: by 2002:a63:3e49:: with SMTP id l70mr2442768pga.96.1611889520810; Thu, 28 Jan 2021 19:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611889520; cv=none; d=google.com; s=arc-20160816; b=Rn3Gfi6ZGQ6fH+g140UwNFX2TMvGyDHnNaymEJD5Yr+IWNBfeR0X/0Hsf8/wKBpMZl xs9/7Mve31YXcxFTTlcdRaSlBAa/EsHbi7mtRhvoplno7PpjU9DfYe/h8wZWX3XhiQJL 53l2sA6AQmrmQlkt7OXjJuK4lbYNxjRvQ3NYxf388y05Gbcs/FvtatbV1Cyml++5zEyg K3R2XJGuIHhHNJhDYNpmUPXLC3KVEueirm09xehLkKmxEMOQ/Xd8acphGOnXJAJ6VWWZ 16LYa1wMsu1kI1df9D0s4FbgmztkaUlVTYaks5sWAm4uq6+E0+1QEe/tJIbEyGU3g4Df Mh5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zTNb1lTIEVQ6SY+1PM+jItpjx6YB2483ibK9X9oBYPQ=; b=A8G5C9Emaq0AkuYdErfPZQVRnPPNIarXxjayRd7L9JFmSkNIh6E9FEfCGzAwcO9pyw rIWDPevNzgZsFPKXVFEfKyxxusGRAROUKdK76lTkYwxJIYAo9Q9ZqNX1tHy1SHnQ8UMU Aj9D2DuRP+GW4sQYgB/kXrVIRbi61fhOKZdSpyWk0jKQgWKRr66ZZX5/lPrZL1O3/CHw ynaGTR8dV8Uvk5rVd+Ouznd9YC3O9IR4BC33x51395K7JqgXAcFczUeXq3poOsdAKvGV TRXn3oZUUADUBi5Wuob4rpjkGLAGd9w+7yqaCWCpBdwTvBwY2DaGmGqiCIBaphljulsK XqNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z1kwyFNg; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id v29sor3915223pgk.51.2021.01.28.19.05.20 for (Google Transport Security); Thu, 28 Jan 2021 19:05:20 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z1kwyFNg; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zTNb1lTIEVQ6SY+1PM+jItpjx6YB2483ibK9X9oBYPQ=; b=z1kwyFNg5hSYRi20ZvZ8wuUsM10FJZoI8McYKRlownqrb/9vwSuD19hHoANIKl9o7S NM3r0rFYtS7BoYRIxUKv2hJYefP+6PduFPKe6sNVWE7NJvVoSFSo+oGB5ds50UhCUA9V SyK9daFDnwbPsOxmmmogF/izeRWdoG3OgCQ6k0DmEgOaW1qa9ZwCI/06RZVukTBn91KD jWkK57VznZPmUOrJGfJnxT8iH5+1O3xSd8qHCSqHOszD3n07tm6upXSk82uB3LtU1IAy N+1l7G24LEncO+U+I1O4bg5Gt8C/bhkcHAaGe6YPBKuBSfvXS+AFhnzu9hoyFu2QqGYg S+4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zTNb1lTIEVQ6SY+1PM+jItpjx6YB2483ibK9X9oBYPQ=; b=RP8oimMTJB0tpYkFVUekgBMmmxSM60r6ukokvD1Redvl1O8Xcc92gVjnLHTxt5xUrC 5HVB41EB6PRB8CNAJzHykOeVoRt79pIcBv7Ke9Rii0lpopx6AnZAJXx1sjSc5mKgaSUG i/SxBE6tY7J68sBvcLBEIvqWOEXZ0fYI3JSUp1QMR75UGi+qaMYYzakjHIvxPfr97uTN BAEcHF+bz3sIv9N6DOGTZdiYbxjb867GLtyGQrp08mvM9j4dsdioLkoa/JclMLi+xvrn pX6L+1gWlP1hlAXNzEI2fFDvon/60YrZe/bsNEzLDboYCx9tp4icTykhpEegrtJL+sUX chkw== X-Gm-Message-State: AOAM531kYWOMq/ucqo/KEDEBh5cswrorzC2En7iPPW3z+v+a6dsfZfqX AG3kcDN0zMH/TPAs1neo24B2mOFs X-Google-Smtp-Source: ABdhPJxgU85/WQXQ6xIZh5kol/FeQ53pYxb2sLTuRnfE+yO6MQ1sib5AHGRb02vCaC8rjeUx7mU2rw== X-Received: by 2002:a63:f404:: with SMTP id g4mr2518687pgi.114.1611889520497; Thu, 28 Jan 2021 19:05:20 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id y75sm6854496pfg.119.2021.01.28.19.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 19:05:19 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , Shuah Khan , Brian Starkey , Sumit Semwal , Laura Abbott , Hridya Valsaraju , Suren Baghdasaryan , Sandeep Patil , Daniel Mentz , linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kselftest@vger.kernel.org Subject: [PATCH 3/5] kselftests: dmabuf-heaps: Softly fail if don't find a vgem device Date: Fri, 29 Jan 2021 03:05:12 +0000 Message-Id: <20210129030514.1231773-3-john.stultz@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210129030514.1231773-1-john.stultz@linaro.org> References: <20210129030514.1231773-1-john.stultz@linaro.org> MIME-Version: 1.0 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 Cc: Brian Starkey Cc: Sumit Semwal Cc: Laura Abbott Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-kselftest@vger.kernel.org Signed-off-by: John Stultz --- .../testing/selftests/dmabuf-heaps/dmabuf-heap.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) -- 2.25.1 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) {