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 Kroah-Hartman X-Patchwork-Id: 208447 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A6DFC433E0 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 1C195206E2 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);