Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1156127rdb; Mon, 4 Sep 2023 05:03:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtDgdJiFdKaVrWBHs57AMyB677HLmPARjhxDRR6VfE+V+KHCDGnSqSPmUlYHlZCfmFFU4u X-Received: by 2002:a05:6512:3249:b0:4fd:d64f:c0a6 with SMTP id c9-20020a056512324900b004fdd64fc0a6mr5653796lfr.48.1693829013039; Mon, 04 Sep 2023 05:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693829013; cv=none; d=google.com; s=arc-20160816; b=Ma3c/l0XruU2YNjMkgUAwgKcGPhK1JuHINCnUJeA5KC/471ON+0N1NHisv60BswSOG K5JIgAvyK9vyTQVKFtBaZ2vJ6YZuY/egT98cvpMd69N9lrL+l4DF+9aS2gitvp2vu+Er dywJiT14TPClb2Pq0oIiJFqchNvi4mNXDZDkvSsgL71qT8V0YFgQA6yR3bS1HAPoSwl1 slPphq/HGtNswS0z+KH58w/2U920BQcj7o3NYZr2FUZJ02ASVDLHobEVApdaHyjOgoNX SB7lJ0Aw6OBGp5lYOeJ+Gs4r14+i7frQ79AOpGJfs+X01tasmWfi5NyXaAwGUf8g0zTU XcDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=J/faCSx+h61f+jdni+0F0n2TOVK2qFFiD6B5/jEnfEo=; fh=Qx/P2mQxKR0w/vDUwCmsR5hyuajUzTG+4d+yTMXyA+g=; b=r+7VKZonhyj5lxQuzP5XpliS6sLIUoOFgrKuRU5e+Kidn9Osj0R5EEGL2S45j9wp50 t6XvVeQt8DfgyQEKi+aC8gMfWp1JvKUtI7IIE14vOOXCNSTWHzWvUvDIKQ3SE9A359Ru EtZDy1tKKpDJND04tpmWltfa4xqzuG1pRvJLv+qrXlgxn6y7yS0+8d75EpNUJ4jYJz42 1OFdY/MG1bZLHfmQd2Ns76pqU7GHQihylQLKLa2SwkhHqo37PHiCMu8DShWEY6S65m7x 9P2YBB2BVWg7ePalBnq8w0uAnpuQqbkYg1MKiyxhIJgamRHUIKoMqY1ioF96mYM2CoNC WO2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b17-20020aa7df91000000b0052a3ae9c672si6321553edy.477.2023.09.04.05.03.06; Mon, 04 Sep 2023 05:03:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351043AbjIDJwY (ORCPT + 99 others); Mon, 4 Sep 2023 05:52:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231742AbjIDJwX (ORCPT ); Mon, 4 Sep 2023 05:52:23 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 16B59CC4; Mon, 4 Sep 2023 02:52:13 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C0C371042; Mon, 4 Sep 2023 02:52:50 -0700 (PDT) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5EEED3F793; Mon, 4 Sep 2023 02:52:09 -0700 (PDT) From: James Clark To: linux-perf-users@vger.kernel.org, irogers@google.com Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kajol Jain , Jing Zhang , Haixin Yu , Madhavan Srinivasan , Ravi Bangoria , Kan Liang , Yang Jihong , Eduard Zingerman , Miguel Ojeda , Liam Howlett , Chen Zhongjin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/7] perf test: Check result of has_event(cycles) test Date: Mon, 4 Sep 2023 10:50:43 +0100 Message-Id: <20230904095104.1162928-2-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230904095104.1162928-1-james.clark@arm.com> References: <20230904095104.1162928-1-james.clark@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the function always returns 0, so even when the has_event() test fails, the test still passes. Fix it by returning ret instead. Reviewed-by: Ian Rogers Signed-off-by: James Clark --- tools/perf/tests/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c index 81229fa4f1e9..39be7f3b3a53 100644 --- a/tools/perf/tests/expr.c +++ b/tools/perf/tests/expr.c @@ -263,7 +263,7 @@ static int test__expr(struct test_suite *t __maybe_unused, int subtest __maybe_u expr__ctx_free(ctx); - return 0; + return ret; } DEFINE_SUITE("Simple expression parser", expr); -- 2.34.1