[LTP] [PATCH 3/4] syscalls/sync03: Remove useless judgement
Yang Xu
xuyang2018.jy@cn.fujitsu.com
Mon Oct 26 06:48:35 CET 2020
The TEST_VOID was defined as below in include/tst_test.h
define TEST_VOID(SCALL) \
do { \
errno = 0; \
SCALL; \
TST_ERR = errno; \
} while (0)
It doesn't assign the value fot TST_RET like TEST macro. So
remove the useless judgement and use sync instead because
sync() is always successful.
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
1.I plan to remove TEST_VOID macro because only sync cases use it.
Also, I don't see any syscall doesn't have return value and still has
error describe(If having, please let me know).
testcases/kernel/syscalls/sync/sync03.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/testcases/kernel/syscalls/sync/sync03.c b/testcases/kernel/syscalls/sync/sync03.c
index c5c02f877..dc093d863 100644
--- a/testcases/kernel/syscalls/sync/sync03.c
+++ b/testcases/kernel/syscalls/sync/sync03.c
@@ -37,10 +37,7 @@ static void verify_sync(void)
tst_fill_fd(fd, 0, TST_MB, FILE_SIZE_MB);
- TEST_VOID(sync());
-
- if (TST_RET)
- tst_brk(TFAIL | TTERRNO, "sync() failed");
+ sync();
written = tst_dev_bytes_written(tst_device->dev);
--
2.23.0
More information about the ltp
mailing list