From patchwork Sun Dec 29 17:17:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 182540 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5447354ild; Sun, 29 Dec 2019 09:30:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxlMR4bdVdLR4r27NrxzJjUs/ut8239AXFMDA5muYGRyQs9MYjr2lCh/zkeWyZD8q7K8h46 X-Received: by 2002:a05:6830:16d1:: with SMTP id l17mr48247431otr.21.1577640643559; Sun, 29 Dec 2019 09:30:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577640643; cv=none; d=google.com; s=arc-20160816; b=VTGHfXoIePGVUEHBF/Z9bAizQWP9yObxlwHFwG0W9/v02nndXdkVlAaFiqcFC5vh9K Fnz5eANXsmZ796AQ/3nSv6H/RcmQiNum0aTcm85ppLiuYHQ27GCdHuVrY2RK5UwC39h6 0jpmPXwGFgmxrqioogWcOnIHMGOQV3ID4NJA48Yxq3+H7IjRRsuF/CSEz2a3046doWmp eTueIqyQOJQNY+bLKVsAh5Ry3UtUgUIa66fxCyrszIvPO9OZ4GaLKR7Y0sn+8jZddEwz cVdVTieiSoIwkQcDlN9XMxXhdo8Y3Vy4cFJU56oZYgxaNTetXFbcMBJBN0UJvGD72PME ausQ== 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=b1lB0wMAGOVCnUxul7+oi3EAt/Nyma3wAqB8bS/o+U8=; b=RsjRTAk/D9cqYvtiwm1neIfOzRyt4t0UJWHkHVgMX7LJqPq1sAaGLf1hzg4mM8PkvR yjMJ8i8ZeyQibETRgl2Wve734XJpC8Dq+Vks47qPjhSgfFomyLcTu2TvAdZZvrDOiW8/ 9YMK8mY2rRBnxZmD57aXtoVZqapX9RXUH5vnePg+Y8GXZD48Jz6ck6u655eMGPutsKR7 v/9SVPd7ucfE1TVh9eRiUB+6u+1Nro/AkykiGsopLxY2rsWKsOUP0ZAiRIQpMDhTXg1q YMzuJC2Zpd9xYyjwGbgZhCTcmDOIKmVu09Sh9NlxtQ0Co8/GNDwSR88JK29p5hczve3U Ldwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TzX9LG70; 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 y9si23398513otq.315.2019.12.29.09.30.43; Sun, 29 Dec 2019 09:30:43 -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=TzX9LG70; 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 S1728716AbfL2Ram (ORCPT + 14 others); Sun, 29 Dec 2019 12:30:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:57022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728740AbfL2Ral (ORCPT ); Sun, 29 Dec 2019 12:30:41 -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 EC7DC208E4; Sun, 29 Dec 2019 17:30:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577640640; bh=F+RVtGEVmdod50DfTH1VyNi8CRxmTqjjFgd97kF6+zU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TzX9LG70BOjc+bcLzvQFQ+LU0OfSxHA/ahCXqiytZeYDR/H5o1iRjLmlzhxwHaLOf TD0RsPylpXwXuoqkxom5jQoxRgiu7fEctyHPlOks1tD+aVxl3YtrwC+2MAJTVSQMsz ga66bgOpuLKxkYXApWqR6rXV3peLt/ZeNsd1aGLw= 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.19 077/219] perf test: Report failure for mmap events Date: Sun, 29 Dec 2019 18:17:59 +0100 Message-Id: <20191229162517.555116819@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229162508.458551679@linuxfoundation.org> References: <20191229162508.458551679@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 e92fa6029ac7..788b0805d2f1 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c @@ -105,6 +105,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused if (perf_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; }