Received: by 2002:a05:7412:3210:b0:e2:908c:2ebd with SMTP id eu16csp751934rdb; Fri, 1 Sep 2023 03:15:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEL0TMJg8JQMlSJ857QQwNNYwJodeFjxSR3FNqcGBLwvVnxzxojICej71XRKcVL1kzhO8zE X-Received: by 2002:a05:6e02:12c5:b0:34c:cb72:32e3 with SMTP id i5-20020a056e0212c500b0034ccb7232e3mr2534657ilm.17.1693563307157; Fri, 01 Sep 2023 03:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693563307; cv=none; d=google.com; s=arc-20160816; b=W9FxA6oeB8SDCSlU5tOkkppE+EBaGiCPdzcjxpNemKj0MOAJIOro75EhJPpwbC/lWV pGRiJg25tAoWPIrhAyZQIjN/rk2KIiqjv7QfMAzqNeiw+RySHSfDBnUFE5S46EVKRiq7 zCvgHa5ln2OHuIVP6yOg6BsaST+R3ABspJHXZTs+tcb+ZNF4X/mMnXvDtHNHEGsOn9QX OcY27Y9ZScwXp0ARqW9BWzdNSFE97nm/w+T0l1n5PxVuz1nuVpeThYi1rf5FtDeMXq1A ZdHM2Z89ksewKS/t+MPNepHaow/7/lw5N/3qzkYfjDrsPHWV0fNd8IKwWIhhSYWJdg8J CsAA== 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=g1sv4Orh7vylkPDjXwlhRCCQZIm1/kfj2xcA5YswAPA=; fh=ppb+eO+r79DU8jFTvWNxwUxNsR1l8dRtLQAqIN5CJAg=; b=U10Oy6guh4wfgtSCdGiBYVLyR3ioXpoELWoz1/83rBNlOgJ7HhordQmDkwlXWAv5Lb Skvxo0CqtiODwkYwtVEynKeWTzggagK9ZOKuIaQjEnYWKb3plRbKI8myRFRNJqUrt73d SI/eyXOgoUAu0jO6ZiGrOpdPXS0LhAdN5rYn4DS84B7aogF4ztevJUPu99OB7StS5yjN h3038oEB2T5rp3pLibH1ckn0fYc/tSrp0TQGPwpf935S2jtaOTpUDKbjeATUJenQwN1/ gsuv3ddDEpp7On/kMKcFgcfAuY9l5ooc92vZ5bo7m3crYyvZeb8h8bgHXgXvj1ejqCxZ wpRQ== 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 g68-20020a636b47000000b0056b83e0ae92si2639474pgc.465.2023.09.01.03.14.49; Fri, 01 Sep 2023 03:15:07 -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 S243793AbjHaPRL (ORCPT + 30 others); Thu, 31 Aug 2023 11:17:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243723AbjHaPRK (ORCPT ); Thu, 31 Aug 2023 11:17:10 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E85C6E50; Thu, 31 Aug 2023 08:17:07 -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 F3AA0C15; Thu, 31 Aug 2023 08:17:46 -0700 (PDT) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5470D3F64C; Thu, 31 Aug 2023 08:17:04 -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 , Kan Liang , Jing Zhang , Haixin Yu , Kajol Jain , Ravi Bangoria , Yang Jihong , Eduard Zingerman , Miguel Ojeda , Liam Howlett , Chen Zhongjin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/7] perf test: Check result of has_event(cycles) test Date: Thu, 31 Aug 2023 16:16:12 +0100 Message-Id: <20230831151632.124985-2-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230831151632.124985-1-james.clark@arm.com> References: <20230831151632.124985-1-james.clark@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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. 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