lkml.org 
[lkml]   [2023]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/7] perf test: Check result of has_event(cycles) test
Date
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 --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
\
 
 \ /
  Last update: 2023-08-31 17:17    [W:0.225 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site