From patchwork Mon Oct 21 13:37:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 177080 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3434295ill; Mon, 21 Oct 2019 06:38:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkVstxC3GlbkHF3ok+f+o4HepI4VqdbjptI1o05nk9Z9u2EOqwC3Ya5bBSK258QGJVIWd5 X-Received: by 2002:a17:906:90d8:: with SMTP id v24mr22541541ejw.60.1571665137997; Mon, 21 Oct 2019 06:38:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665137; cv=none; d=google.com; s=arc-20160816; b=D0ORkDxrwcqdaX/4D7AcE7cnoe34BkmLGyT4gWmBVY5isIwHfOr6r/J35UflMf9u1X RwuEgXBwQRN9GlxTeQ+ROIawxT7rprXg/xrtx/bdyixYhIir4yUpwgh1DWE0KIcLqIhz Ept7qtcmDfXyuzfVWvr2Xmc3Cef9O03zcaek2Z+DINgdejSbNy37r146DOvsQqCFOeGd Xmc6OrTHq682ljV70zT4EVdDRAt6H0vy0J8lna450+Ly1ZglsdMqU/IQj8216ZHg4YpP gfM+ZY1AS77wH3UzTqHGGZ0Oxqxz0PYiOcjzEyFBWq7WKDXnpRswsqHkxq08PmDPQ/Je ECNw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QYFE67C9qiheb6thVNwTdQvpdfH8l60afL6BFbwK3BY=; b=Z8ZWuF9osUIfbMfSnbGVTXJeBoSi4ge9/e8Vdu1VE3jJu+yES86f9pvFZHzO98osly o7QasXTOa5OlV1fHjdl/ChZ2d79TTa6mqOe3ldkwVrOoKAmsn5RauuOqsBarAq9HD43f XNFLuaqfrrhsqIvVZxDydEYLIkcAmFHwnhtPStr2HnR/hb0UpCNJeSFDtbF1+4wPe/En oKVdswiyJqydFmHsYgQnvujry3Jttl7mP+/D07Pi8FxWOT0bllVyx/FIyvBnf2tbxmNw s2GjFcuYPkcLsPgQxC8/00b6j+H2JaEIx5G4CWt78QcQ95qWwZzotk44RmxGh6klMCIy Wc1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S7dKCUkY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23si3047110ejf.390.2019.10.21.06.38.57; Mon, 21 Oct 2019 06:38:57 -0700 (PDT) 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=S7dKCUkY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729107AbfJUNi4 (ORCPT + 26 others); Mon, 21 Oct 2019 09:38:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:40370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728872AbfJUNiz (ORCPT ); Mon, 21 Oct 2019 09:38:55 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (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 3814F21906; Mon, 21 Oct 2019 13:38:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571665134; bh=xm5LPEbt5KjBMbDJZbY6I0KLMlnaVCcymuiJLkWPo0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S7dKCUkYl9VDCduHjv1YlOiNJXu3EggJFudSBCw1iUssbiy2JBjRN8hKkVAE76zDB fa7g7iw16OQadbf8imJTX/2qIa423AmOlT/woVhDdaEek8VGw+FyvdwBIjZfao2OL/ CTBFy77ijeY7cOAA9ir+2o9hKouZ1YhUMoFwJLa8= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan , Alexander Shishkin , Jiri Olsa , Mark Rutland , Arnaldo Carvalho de Melo Subject: [PATCH 04/57] perf test: Report failure for mmap events Date: Mon, 21 Oct 2019 10:37:41 -0300 Message-Id: <20191021133834.25998-5-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021133834.25998-1-acme@kernel.org> References: <20191021133834.25998-1-acme@kernel.org> 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 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 --- tools/perf/tests/task-exit.c | 1 + 1 file changed, 1 insertion(+) -- 2.21.0 diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index 4965f8b9055b..19fa7cb429fd 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c @@ -111,6 +111,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; }