From patchwork Sun Dec 29 17:23:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182558 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5461312ild; Sun, 29 Dec 2019 09:47:55 -0800 (PST) X-Google-Smtp-Source: APXvYqy91UF9O15UBQmKLgHGuieQItDWF+5AnOZzZ5YT0JO/L+9ZjJcxuWBL56ySrF1sUMUJYRXl X-Received: by 2002:a05:6830:1515:: with SMTP id k21mr53851229otp.177.1577641675894; Sun, 29 Dec 2019 09:47:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577641675; cv=none; d=google.com; s=arc-20160816; b=qYEImBuDrJBwHh60MAltNNQmcQbjtWzMpkt91H05ZdD8Iv2SS2RwKu/WemSz9D/fgL 59GUkFW6OQNub8BLiD45cq7zZPtWnpZjzMtcikgWVsgeIMsJcT9xQnMuu1hXg9Wrgmlo a4fTZQ20QKvupNiGNYXxKDkPL1rjuMpytRtbneD0mBN/+eerD/MZd3Zn5/ZoLj8zviqV 6zH3Cj2ZnG3EGJO7JGxE100POc4Gei9xG1MYYsTiV1xOjRUyf0FKNz1CnEHXungnvKf/ M6elrrVxI5uAFa0I2pE004AsJ+uA24I0Oeqx9/Lg4FUqnRUUcnvx9tcX89/lrGOXQzQt ZQEg== 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=Bgxr+BgoWDHJUZmIznQ4d2oVrSffrd4/XeOjnUd+O+o=; b=iqMzsolIL8SjdtvajA1Su0RSZ3lGL6EWzgRFdT8cWhZPz7SxbvhHVdeLgZYS7soVhB dobeDcAsl3a/Ej/Ec/8e4zlJ/XU97ERiV/lwzrlfaOoI7wb4hvYVM+cxrAS5TpDBFoxd N1nlV8A5u88pASySEoNf1YuSd9mazn3VqwSIjvCYfq/03PXFO1PELYiaI3hAyMDarLfE R+QpjTIPP9Yua3O/oKlQlBd5jGmyvyBjAnD6yzxcNVk1coovUPc1KWp+ssxk3B4wmURn Sc6c45oBevgqvnt5OGnoFl2UqY3TMVOZJTVha0mrSbD+gqL0BIGQQuNOxEnsBnneOuwY obpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SwOXNhza; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 d20si16766296oic.40.2019.12.29.09.47.55; Sun, 29 Dec 2019 09:47:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=SwOXNhza; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731354AbfL2Rry (ORCPT + 14 others); Sun, 29 Dec 2019 12:47:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:58750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731344AbfL2Rrv (ORCPT ); Sun, 29 Dec 2019 12:47:51 -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 E33E0208C4; Sun, 29 Dec 2019 17:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641670; bh=6qnczI6FHQazh9DmcWWErTsXpBXTUWcCdkBVEqjRnPc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SwOXNhza+QKTpeL8liSepb9iJupWjpHtf8Nzsvl5MK/VoXGDSwRpip9RyspJrMIJY GGg61GEeq5l35pog6forZyRMXhljyfGn1Q5GqHZJPzITNVqz2T97EceW+8X/S3ABEz y4RMHLaNYvm7IS/kDIrlQGO1T9sIRqc6QiHSwUi8= 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 5.4 145/434] perf test: Report failure for mmap events Date: Sun, 29 Dec 2019 18:23:18 +0100 Message-Id: <20191229172711.376706225@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 bce3a4cb4c89..ca0a6ca43b13 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c @@ -110,6 +110,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused if (evlist__mmap(evlist, 128) < 0) { pr_debug("failed to mmap events: %d (%s)\n", errno, str_error_r(errno, sbuf, sizeof(sbuf))); + err = -1; goto out_delete_evlist; }