preadv203: guarantee the subloop exit timely
PATCH 1/1 preadv203: guarantee the subloop exit timely
We observed that timeout is still occasionally happening even with introducing the tst_remaining_runtime. The likely reason is that writer_thread needs more time in subloop.
Here exit it instantly when stop set to 1.
Signed-off-by Li Wang <[email protected]>
--- testcases/kernel/syscalls/preadv2/preadv203.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/preadv2/preadv203.c +1 -1
@@ -159,7 +159,7 @@ static void *writer_thread(void *unused)while (!stop) {int fd = fds[random () %FILES ]; -for (j =0 ; j <CHUNKS ; j++) { +for (j =0 ; j <CHUNKS && !stop; j++) {memset (buf,'0' + j,sizeof (buf));off_t off =CHUNK_SZ * j;
Signature · 5 lines
2.40.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi All,
As these two are simply to reduce the timed-out issue, I dare to merge them directly.
1790832 New readahead02: set dynamic run time
1792108 New preadv203: guarantee the subloop exit timely
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp