On Nov 16 16:16, Cyril Hrubis wrote:
> I've been looking at sources for usctest.h again today (lib/parse_opts.c) and 
> I
> still have the feeling that this is badly written/broken code and should be
> fixed but as there are thousands of tests that uses usctest interface we 
> should
> be careful when touching these sources. So IMHO the best approach is to change
> one thing at the time and see if this was a good move.
> 
> So let's start with TEST_PAUSE macro. Accordingly to comment in the header,
> this expands to the code that waits for SIGUSR1 signal (and this is not
> generaly true).  This macro is expanded to the int usc_global_setup_hook()
> function. The function forks the program accordingly to STD_COPIES and
> accordingly STD_PAUSE it sleeps for a SIGUSR1 or not (all forked instances); 
> it
> also changes program segment size with sbrk().
> 
> Looking into the test sources, this is called when the test starts in order to
> implement test parameters "-c n" (run n copies concurently) and "-p" (pause
> test) and system variable USC_TP_SBRK. Do we need these parameters or any of
> them? If you convice me that these parameters are usefull I would gladly clean
> up and document code that implements TEST_PAUSE, otherwise I would vote for
> removing them (or at least the useless ones).

This is one of the many features that were included in the original
libraries which no one in the community really explored.  The purpose of
TEST_PAUSE is to allow multiple tests to complete their setup steps
before being released at the same time.  This allows tests to hammer
syscalls at relatively the same time and test race conditions.

Nate

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to