From patchwork Fri May 8 04:56:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 186310 Delivered-To: patches@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3820049ill; Thu, 7 May 2020 21:56:16 -0700 (PDT) X-Received: by 2002:a63:e118:: with SMTP id z24mr603299pgh.414.1588913776122; Thu, 07 May 2020 21:56:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588913776; cv=none; d=google.com; s=arc-20160816; b=fmTAuhBACZPfQnyaeU1v0QiG6lPp55vCB5laXMztO1Mfvcem4oJEL3BEkwpnBWLUu5 syPlTiGqlIqi1cyejtL897DiYlevaX58jb6zKVzfjIRFEDXAWyiaLh8mu24s8gBL7Ko2 nqVSrhAjwUhOpEmuq0UiT4+bXvG+Cg9llJ3ciUj2jcb3ibrGU+5QV0Sp724mqHMfnM87 MUC2/48pHAVOJ1CWBoEVCtmqsfj9uUSoczX6pu45LoCZZLnVZfBMqH5dBcqCQecEn6R+ ubGVQdaddG/8IYsEjNPeoFiz2rnTUgQ16WS9s9RYR2K4p6/Tij/nqy8YwMUQJWUxrHJe hZNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=4CNZy247ICcFx3HCeAu3lFAco0E9gMG+0QdnsbzPiRo=; b=M+UM9Ss6gTcc295I+MC9YEY13lfNWB2QQ392lYQ83Fkm/AlZgqBST+2XsCFi9GcLr7 wjmrJ2bZfYx1JcEiqrp8SYYNjdiuKIOYGSKruwq97nKniaU4j13bNLHtArrIrBtR0ZNp PiFyQYC1Asnx/z5E5cw3lNVg7uFy2bgD+99thfokWxYHVwU3JLA07TeqVvIjjcLN20ne Z42zixezIbPb/FnVbYVCK2FL1abA1axELVehns7/bn6W0TxttzlG/ucWJiKH+1cdZMEL 1aNczpEA6heP2NcQEYnxjG/dkLXjccimRycFfCPUWgPUr1d651z98VomtgwwBtllv2nE WrNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YongsVUN; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 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-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id s38sor743060pgm.12.2020.05.07.21.56.15 for (Google Transport Security); Thu, 07 May 2020 21:56:16 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YongsVUN; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 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; bh=4CNZy247ICcFx3HCeAu3lFAco0E9gMG+0QdnsbzPiRo=; b=YongsVUNpHD9pyODgLUWb/61UgHn39x8OVioXsqsF8t1wwG89KBDqSL6gSxorgd9k/ g5T8jWEiH3DSGv7acmuQXIGGzN7sTXF3NStQ2YTee6G0PEbK67HSSVAtPAHU9XybTN1M aQ49zkZht+DgamSC1QAGbZEfnNrfzBGWhEB/FJGNrkzwzZtGdLWQFuz02wCT9TT6IvwC JdFrTlS8NmCdS1cvcoyFmjapEa4vx4HKpdpKrw8Z0ql2EQG1ZMEzABuFIgLN6U99b9Ta gUYdOvR0cOs+31NukcL5XHWI8vGgztzelE+KIPZ0szEB++UYVvFk1gbHMIiKxJMQQh+u GA2Q== 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; bh=4CNZy247ICcFx3HCeAu3lFAco0E9gMG+0QdnsbzPiRo=; b=dm+HijdoAHYzAIDgUkxGoX5rr88dAHVZhER/rCubQOmDkDmRqatjAJ5sYRE3k+w+g3 iGTCG4pKK1up6Sx4y1dKT5nUCIQtOOTFTRG3CqKBaB/dvTtQZU+V6NcLIlNfuQrlCEHr 91csqjCv6Y5whCWHeZeFh1mlfl9gI9DqVppLEmkD4qewB0nWCuNPA5JmaSw57x4VqxMw k/kRjs3LpXUsgcnd+GGiItXl82vYsLaNaq9WFGTPxnl3Ake6Fx3QFtE7ERpumJOGuvjr fOWqAeZzEASJo6hFZQoO8xg3hLrYceIStkW1JPjT4T8Dzn2rytk85caKtLwC/kM+1DCo maNA== X-Gm-Message-State: AGi0PuYwWiZmR9KSlOB4pYeiX89RHL2V99SJAn9fUG5S2CH/H+n8BYe0 6pdTrOcfb/H/3Delq3EbCKJ7AYAC X-Google-Smtp-Source: APiQypKH7PmGUi/XHWEExL2pZ4ExfPw8tZVjceK5ZGdxg/94ViJwHsuu88DxdsCvzqKaPIiI68ArGA== X-Received: by 2002:a63:5824:: with SMTP id m36mr588890pgb.439.1588913775577; Thu, 07 May 2020 21:56:15 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id d124sm426812pfa.98.2020.05.07.21.56.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 21:56:14 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Shuah Khan , Sumit Semwal , Benjamin Gaignard , Brian Starkey , Laura Abbott , "Andrew F. Davis" , linux-kselftest@vger.kernel.org Subject: [PATCH] kselftests: dmabuf-heaps: Fix confused return value on expected error testing Date: Fri, 8 May 2020 04:56:10 +0000 Message-Id: <20200508045610.80522-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 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" Cc: linux-kselftest@vger.kernel.org Signed-off-by: John Stultz --- tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 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; out: if (dmabuf_fd >= 0) close(dmabuf_fd);