Improve the test framework for MM syscalls

This commit is contained in:
Ruihan Li
2025-06-21 23:43:46 +08:00
committed by Jianfeng Jiang
parent 93015a6090
commit ee542e043e
4 changed files with 34 additions and 56 deletions

View File

@ -47,7 +47,7 @@
#define __CHECK(func, cond) \
errno = 0; \
long _ret = (func); \
__auto_type _ret = (func); \
if (!(cond)) { \
fprintf(stderr, \
"fatal error: %s: `" #cond "` is false after `" #func \
@ -100,7 +100,7 @@ static int __total_failures;
#define __TEST(func, err, cond) \
errno = 0; \
long _ret = (func); \
__auto_type _ret = (func); \
if (errno != (err)) { \
__tests_failed++; \
fprintf(stderr, \