[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220405163728.56471-1-ytcoode@gmail.com>
Date: Wed, 6 Apr 2022 00:37:28 +0800
From: Yuntao Wang <ytcoode@...il.com>
To: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>
Cc: Martin KaFai Lau <kafai@...com>, Song Liu <songliubraving@...com>,
Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Shuah Khan <shuah@...nel.org>,
netdev@...r.kernel.org, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Yuntao Wang <ytcoode@...il.com>
Subject: [PATCH bpf-next] selftests/bpf: Remove redundant checks in get_stack_print_output()
The checks preceding CHECK macro are redundant, remove them.
Signed-off-by: Yuntao Wang <ytcoode@...il.com>
---
tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c b/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c
index 16048978a1ef..5f2ab720dabd 100644
--- a/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c
+++ b/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c
@@ -76,10 +76,8 @@ static void get_stack_print_output(void *ctx, int cpu, void *data, __u32 size)
good_user_stack = true;
}
- if (!good_kern_stack)
- CHECK(!good_kern_stack, "kern_stack", "corrupted kernel stack\n");
- if (!good_user_stack)
- CHECK(!good_user_stack, "user_stack", "corrupted user stack\n");
+ CHECK(!good_kern_stack, "kern_stack", "corrupted kernel stack\n");
+ CHECK(!good_user_stack, "user_stack", "corrupted user stack\n");
}
void test_get_stack_raw_tp(void)
--
2.35.1
Powered by blists - more mailing lists