Re: [LTP] [PATCH v5 2/2] open_posix_testsuite/../mq_timedsend/12-1: fix race

chrubis
2013-08-15T12:53:39Z

Hi!
> Test can send SIGUSR1 signal after thread has already completed
> and report failure from main() and success from a_thread_func():
>
> conformance/interfaces/mq_timedsend/12-1: execution: UNRESOLVED: Output:
> Error: in pthread_kill
> : Success
> thread: mq_timedsend interrupted by signal and correctly set errno to EINTR
>
> Synchronize exit of a_thread_func(), so that thread can exit only
> after loop sending SIGUSR1 completed.
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
> Changes in v5:
> - return value from pthread_exit is not used, always return NULL

Looks good to me. Acked.

--
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.