Skip to content

Commit 5820dda

Browse files
xuyang0410metan-ucw
authored andcommitted
syscalls/sync03: Remove useless judgement
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 <[email protected]> Reviewed-by: Cyril Hrubis <[email protected]>
1 parent 557d69f commit 5820dda

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

testcases/kernel/syscalls/sync/sync03.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ static void verify_sync(void)
3737

3838
tst_fill_fd(fd, 0, TST_MB, FILE_SIZE_MB);
3939

40-
TEST_VOID(sync());
41-
42-
if (TST_RET)
43-
tst_brk(TFAIL | TTERRNO, "sync() failed");
40+
sync();
4441

4542
written = tst_dev_bytes_written(tst_device->dev);
4643

0 commit comments

Comments
 (0)