[LTP] [PATCH 0/2] Updates to pthread_{barrier,cond}_destroy()
Richard Palethorpe
rpalethorpe@suse.com
Mon Oct 9 12:18:22 CEST 2017
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
More information about the ltp
mailing list