[LTP] [PATCH 07/10] syscalls/cacheflush: Make use of TEST_MACROS
Cyril Hrubis
chrubis@suse.cz
Fri Nov 13 14:14:25 CET 2020
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/kernel/syscalls/cacheflush/cacheflush01.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/testcases/kernel/syscalls/cacheflush/cacheflush01.c b/testcases/kernel/syscalls/cacheflush/cacheflush01.c
index 6ad8b953a..d53fcdcd0 100644
--- a/testcases/kernel/syscalls/cacheflush/cacheflush01.c
+++ b/testcases/kernel/syscalls/cacheflush/cacheflush01.c
@@ -45,12 +45,8 @@ static void test_cacheflush(unsigned int i)
{
struct test_case_t *tc = &test_cases[i];
- TEST(tst_syscall(__NR_cacheflush, addr, getpagesize(), tc->cache));
- if (TST_RET == 0) {
- tst_res(TPASS, "%s passed", tc->desc);
- } else {
- tst_res(TFAIL | TTERRNO, "%s failed", tc->desc);
- }
+ TEST_PASS(tst_syscall(__NR_cacheflush, addr, getpagesize(), tc->cache),
+ "%s", tc->desc);
}
static struct tst_test test = {
--
2.26.2
More information about the ltp
mailing list