All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/2 v2] syscalls/fork: Rewrite fork{07, 08} to a proper synchronization
@ 2021-07-05  7:59 Xie Ziyao
  2021-07-05  7:59 ` [LTP] [PATCH 1/2 v2] fork07: Rewrite the test " Xie Ziyao
  2021-07-05  7:59 ` [LTP] [PATCH 2/2 v2] fork08: " Xie Ziyao
  0 siblings, 2 replies; 5+ messages in thread
From: Xie Ziyao @ 2021-07-05  7:59 UTC (permalink / raw)
  To: ltp

v1->v2:
1. Write a new test for fork07, which checks that all children inherit parent's file descriptor.
* Parent writes N bytes (for example 'a') to a file in setup()
* Parent opens a file descriptor for reading pointing to that file
* Parent forks N children
  - each child reads a byte from the file checks that the byte is 'a' then exits
* Parent waits the all the children
* Parent checks that the end of file is reached
2. Same changes are applied to fork08, and use file descriptors instead of the FILE.

Xie Ziyao (2):
  fork07: Rewrite the test to a proper synchronization
  fork08: Rewrite the test to a proper synchronization

 testcases/kernel/syscalls/fork/fork07.c | 236 +++++-------------------
 testcases/kernel/syscalls/fork/fork08.c | 200 +++++---------------
 2 files changed, 94 insertions(+), 342 deletions(-)

--
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-07 14:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05  7:59 [LTP] [PATCH 0/2 v2] syscalls/fork: Rewrite fork{07, 08} to a proper synchronization Xie Ziyao
2021-07-05  7:59 ` [LTP] [PATCH 1/2 v2] fork07: Rewrite the test " Xie Ziyao
2021-07-07 14:50   ` Cyril Hrubis
2021-07-05  7:59 ` [LTP] [PATCH 2/2 v2] fork08: " Xie Ziyao
2021-07-07 14:53   ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.