diff mbox series

[1/7] perf test: Check result of has_event(cycles) test

Message ID 20230831151632.124985-2-james.clark@arm.com (mailing list archive)
State New, archived
Headers show
Series perf: strcmp_cpuid_str() expression fixups | expand

Commit Message

James Clark Aug. 31, 2023, 3:16 p.m. UTC
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 <james.clark@arm.com>
---
 tools/perf/tests/expr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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);