From patchwork Sun Dec 29 17:18:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182579 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5486715ild; Sun, 29 Dec 2019 10:17:07 -0800 (PST) X-Google-Smtp-Source: APXvYqzSSHpgVNRIPwdJ5GUHyILp+N/hMOSvnIsoQVm2yt09qOkhHkrGntAXet8+eh/Fhh7nfRp2 X-Received: by 2002:a9d:730e:: with SMTP id e14mr65982272otk.62.1577643427382; Sun, 29 Dec 2019 10:17:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577643427; cv=none; d=google.com; s=arc-20160816; b=bH+Rsxi4b/8NmIhGX1tdBbo46OaKWxnltFdE5Dl5f+yXUYpQw19yGfj0WsBB6e5Kni ibxR14qwJj2yBxfZYTBBdihK8nSpMAmbI50sTs6pNPlY369PDg8QmGSJIYlXj3+8aq+R OK0+07yz6PvVvxW7akjSKOYkw2os2ki22J6oS8yZDdD9hvbGyOiA6UK4Lrm+zibo4Qtl tFVchFMs2JAWMNG2TF3WACWaFJQEvZjG0cSwSWTJyrWsz+srvBp5hRNhfrNuKP1tu8je nPSLB/vEHwFsQRx6epq9NiDjE5+uvw2n1lL/wBV+vyKQsnlgjXOzIV0z9u0OzRw7Dj5T J8fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IEH/fFxNML3oJnvKFwX0j2E50OjpHfSw2OxR/9TNL3A=; b=gDXuP06rI3V94NwRFxqb/ZWkqHO95VPAQk50GpGSDQnwsrl4ipcwpzL6WXlSkFvR2F TXCReu8GaTOoft3WtG7/fHlFIyP0wnENM/yR7htMFtiRoQ22aODKWMgcnOnxXqrorvme ZxvT1VYXDIC5Xx4d+9ZPMekdVTGZZ8qDBPwcKvdCETn0kYU3RMq8IDzDwFbLsk61JQID aM1YMADKoZZ7eaNDY47OHJlZMWrh9s76ZU8C4RHpB6WvP+2cSc6zzxQsjv01cHs1LjJj 5uRPYuh4gfFgQWzr+TeROLMvNv2YePDpT4I2iZho0ed/7oQZNVRMQrF88MsPichsRQFI Gkmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bqpfgQzU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l2si18364836oti.303.2019.12.29.10.17.07; Sun, 29 Dec 2019 10:17:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bqpfgQzU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727215AbfL2RX1 (ORCPT + 27 others); Sun, 29 Dec 2019 12:23:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:40886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727523AbfL2RXX (ORCPT ); Sun, 29 Dec 2019 12:23:23 -0500 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 D818B207FF; Sun, 29 Dec 2019 17:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577640202; bh=j/zL3L0ZTW9/R0p1OEI97exdIz+cMlX2FZgmmFNH1Rg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bqpfgQzUE9UKsvkj2WhCPpeGSnfxkLzZdrBv/R50/vOQCZtHUWlMM6BEJv310Ien8 6ktfklrzb8I7TDKX1MB16FBCNYP3SqqJLfdZDugDrT+Ih2zWk/y5qjAYasY+KJy/wl kkfurYvjZDlPYslk49jReD3U/4z52UabvPUoQ2mU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leo Yan , Alexander Shishkin , Jiri Olsa , Mark Rutland , Namhyung Kim , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.14 060/161] perf test: Report failure for mmap events Date: Sun, 29 Dec 2019 18:18:28 +0100 Message-Id: <20191229162417.653410127@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229162355.500086350@linuxfoundation.org> References: <20191229162355.500086350@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan [ Upstream commit 6add129c5d9210ada25217abc130df0b7096ee02 ] When fail to mmap events in task exit case, it misses to set 'err' to -1; thus the testing will not report failure for it. This patch sets 'err' to -1 when fails to mmap events, thus Perf tool can report correct result. Fixes: d723a55096b8 ("perf test: Add test case for checking number of EXIT events") Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20191011091942.29841-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/tests/task-exit.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index 89c8e1604ca7..94fe5464bc6f 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c @@ -104,6 +104,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused if (perf_evlist__mmap(evlist, 128, true) < 0) { pr_debug("failed to mmap events: %d (%s)\n", errno, str_error_r(errno, sbuf, sizeof(sbuf))); + err = -1; goto out_delete_evlist; }