[LTP] [PATCH v4 2/3] API: Remove TEST macro usage from library
From: Li Wang <hidden>
Date: 2021-06-16 06:37:11
From: Li Wang <hidden>
Date: 2021-06-16 06:37:11
Hi Richard, On Tue, Jun 15, 2021 at 3:41 PM Richard Palethorpe via ltp [off-list ref] wrote:
The test author is guaranteed that the LTP library will not change the TST_RET and TST_ERR global variables. That way the test author can use the TEST macro then call other library functions before using TST_RET, TST_ERR or TTERRNO.
I guess the inline function in the header files also should be considered, right? lapi/clone.h: TEST(syscall(__NR_clone3, NULL, 0)); lapi/fsmount.h: TEST(syscall(__NR_fsopen, NULL, 0)); lapi/init_module.h: TEST(syscall(__NR_finit_module, 0, "", 0)); lapi/io_uring.h: TEST(syscall(__NR_io_uring_setup, NULL, 0)); lapi/name_to_handle_at.h: TEST(name_to_handle_at(dfd, pathname, &fh, &mount_id, 0)); lapi/openat2.h: TEST(syscall(__NR_openat2, -1, NULL, NULL, 0)); -- Regards, Li Wang