public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/2] Updates to pthread_{barrier,cond}_destroy()
@ 2017-10-09 10:18 Richard Palethorpe
  2017-10-09 10:18 ` [LTP] [PATCH 1/2] POSIX: Allow pthread_barrier_destroy() to block Richard Palethorpe
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Richard Palethorpe @ 2017-10-09 10:18 UTC (permalink / raw)
  To: ltp

Hello,

Both these tests are a little suspect as they are testing undefined
behavior. They also use calls to sleep() for sychronisation and assume setting
or getting an integer with the '=' operator is atomic.

Even though they are testing undefined behavior, I think they are still useful
just to check how a particular implementation deals with these scenarios. I
have tried to relax the test as much as possible to avoid spurious
failures. Also, even though it is probably allowed by the spec, I would
consider a segfault to be a failure.

These tests do naturally include race conditions and waste time in calls to
sleep, we could mitigate them by using another synchronisation mechanism (e.g
TST_CHECKPOINT or fzsync), but not remove them completely. I'm not sure whether
introducing LTP library functions into the POSIX tests is a good idea or not.

Richard Palethorpe (2):
  POSIX: Allow pthread_barrier_destroy() to block
  POSIX: Allow pthread_cond_destroy to block

 .../interfaces/pthread_barrier_destroy/2-1.c       | 101 +++++++++++++--------
 .../pthread_cond_destroy/speculative/4-1.c         |  81 +++++++++--------
 2 files changed, 105 insertions(+), 77 deletions(-)

-- 
2.14.2


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

end of thread, other threads:[~2017-10-13 12:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 10:18 [LTP] [PATCH 0/2] Updates to pthread_{barrier,cond}_destroy() Richard Palethorpe
2017-10-09 10:18 ` [LTP] [PATCH 1/2] POSIX: Allow pthread_barrier_destroy() to block Richard Palethorpe
2017-10-12 13:34   ` Cyril Hrubis
2017-10-13  8:58     ` Richard Palethorpe
2017-10-13  9:37       ` Cyril Hrubis
2017-10-13 12:57         ` Richard Palethorpe
2017-10-09 10:18 ` [LTP] [PATCH 2/2] POSIX: Allow pthread_cond_destroy " Richard Palethorpe
2017-10-12 14:01   ` Cyril Hrubis
2017-10-13  9:06     ` Richard Palethorpe
2017-10-13  9:20       ` Cyril Hrubis
2017-10-12 13:14 ` [LTP] [PATCH 0/2] Updates to pthread_{barrier,cond}_destroy() Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox