Renaud Lottiaux wrote:
Hi !
This patch fixes a concurrency issue in semctl01. This test was
using usleep to synchronize tasks. On a heavily loaded system,
this synchronization is not enough to ensure execution correctness.
This patch is a bit more intrusive than my previous ones.
Patch content :
* Define 2 new functions in kernel/syscalls/lib/libtestsuite.c, used
to synchronize a father and a son using pipes.
- create_sync_pipes: create a pair of pipes used for the
synchronization.
- wait_son_startup: function used in the father to wait for
its son to start ts execution.
- notify_startup: function used in the son to notify it has
started its execution.
* Add a kernel/syscalls/lib/libtestsuite.h file to cleanly export
newly defines functions.
* Fix the semctl01test. The idea used to synchronize :
- For each task created, the father waits for the son to start
its execution using the newly define functions.
- After the last son has been created, the father do a sleep(1)
to give time to the sons to execute the semop function.
The final sleep does not guaranty the sons will have time to do the
semop. On a REALLY heavily loaded system, this will still fail...
The only solution I see to be sure the son is really blocked on the
semop before the father continue its execution it to use the wchan
info from /proc/<pid>/wchan file...
Any other idea ?
Or, do we simply consider the will not run this test on a very
loaded machine ?
Regards.
Merged.
R.
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list