I have found abnormal behavior of sem_post/8-1.c test case under posix.
This test case passes in some times and failed in many times :-(

After my investigation found synchronization is missing between the
child processes.
Made a patch to fix this issue.

Patch includes
1.      Reverting back changes made by mreed on Sep 25 2006. Making sure
child has been waiting for the lock (below Refs).
2.      using sleep in while loop is not a good idea, so sleep is removed
from while loop
3.      For the synchronization I have added sleep before releasing the lock.

After applying this patch I have tested this test case 1000 times continuously.
All the times test case reported as Test Pass :-)

Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
1 file changed