From patchwork Mon Jun 1 17:53:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11582527 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C1F9157C for ; Mon, 1 Jun 2020 18:40:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 321EB2073B for ; Mon, 1 Jun 2020 18:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591036825; bh=oqZ+NsD3VxSpXbZh521LmVgD1/qZripK/UNHLLtpTDY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=tOVeKkAoj0I3koDFGnr1RdI4vJAWfVJMJG+g1pt6N3ffln1zVgauDKWdrMefCbYdZ WCys5abFJwezT1Nra449q4h6w/Ed9i5x/hxPPZSKlfWAwXjCe7PCRZqWWYjz+G3w6W viTQGH0qHxOk7GTWHXrEbHVKmkrwuXXKcTNhIZXw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731337AbgFASN0 (ORCPT ); Mon, 1 Jun 2020 14:13:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:32910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729979AbgFASNZ (ORCPT ); Mon, 1 Jun 2020 14:13:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D223F2065C; Mon, 1 Jun 2020 18:13:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591035204; bh=oqZ+NsD3VxSpXbZh521LmVgD1/qZripK/UNHLLtpTDY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LArHRnFLTKcGwWn2k/QhrvnBkIYL5W24MY6bHz+t80ucuglBYYvA0z4ws++9Z85tA HpyhsnoJIuxfzZ0doQKduc7jcgpGO2ZDmI3jDbcimImKT0+WE0uSJsI0TBwmtPy2mA pfbyDrvziyRUipz7G/5dw6ZEBzwaJDr4sL4NT+xM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shuah Khan , Sumit Semwal , Benjamin Gaignard , Brian Starkey , Laura Abbott , "Andrew F. Davis" , linux-kselftest@vger.kernel.org, John Stultz , Shuah Khan , Sasha Levin Subject: [PATCH 5.6 056/177] kselftests: dmabuf-heaps: Fix confused return value on expected error testing Date: Mon, 1 Jun 2020 19:53:14 +0200 Message-Id: <20200601174053.677670993@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174048.468952319@linuxfoundation.org> References: <20200601174048.468952319@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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" Cc: linux-kselftest@vger.kernel.org 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; out: if (dmabuf_fd >= 0) close(dmabuf_fd);