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 <[email protected]>
Signed-off-by: James Clark <[email protected]>
---
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