public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [RFC] utstest.h
@ 2009-11-16 15:16 Cyril Hrubis
  2009-11-20 12:53 ` Cyril Hrubis
       [not found] ` <20091203152731.GA10251@refried.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Cyril Hrubis @ 2009-11-16 15:16 UTC (permalink / raw)
  To: ltp-list

Hi!
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).

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [RFC] utstest.h
  2009-11-16 15:16 [LTP] [RFC] utstest.h Cyril Hrubis
@ 2009-11-20 12:53 ` Cyril Hrubis
  2009-11-26 14:13   ` Cyril Hrubis
       [not found] ` <20091203152731.GA10251@refried.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Cyril Hrubis @ 2009-11-20 12:53 UTC (permalink / raw)
  To: ltp-list

Hi!
> 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).
> 

Okay, let me put it like this. Are parameters introduced by TEST_PAUSE really
used for anything? Would anybody cry if there where removed? Would be patch
removing them accepted and merged into CVS?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [RFC] utstest.h
  2009-11-20 12:53 ` Cyril Hrubis
@ 2009-11-26 14:13   ` Cyril Hrubis
       [not found]     ` <364299f40911260622s4e5ae3c5j555b922a7b85f4b0@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Cyril Hrubis @ 2009-11-26 14:13 UTC (permalink / raw)
  To: ltp-list

Hi!
> > 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).
> > 
> 
> Okay, let me put it like this. Are parameters introduced by TEST_PAUSE really
> used for anything? Would anybody cry if there where removed? Would be patch
> removing them accepted and merged into CVS?
> 

Anybody out there? I would really like to clean up and simplify the test interface.

-- 
metan

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [RFC] utstest.h
       [not found]     ` <364299f40911260622s4e5ae3c5j555b922a7b85f4b0@mail.gmail.com>
@ 2009-11-30 13:50       ` Cyril Hrubis
       [not found]         ` <1259853101.5085.36.camel@subratamodak.linux.ibm.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Cyril Hrubis @ 2009-11-30 13:50 UTC (permalink / raw)
  To: Garrett Cooper; +Cc: ltp-list

Hi!
> >> > 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).
> >> >
> >>
> >> Okay, let me put it like this. Are parameters introduced by TEST_PAUSE really
> >> used for anything? Would anybody cry if there where removed? Would be patch
> >> removing them accepted and merged into CVS?
> >>
> >
> > Anybody out there? I would really like to clean up and simplify the test interface.
> 
>     I personally don't see why it should still exist when pan delivers
> this level of functionality, but pan isn't compiled on UCLINUX
> still... besides, I don't make the designed decisions.

Okay, do we have somebody who is in a charge of desing decisions? Or at least
any mechanism to do that.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [RFC] utstest.h
       [not found] ` <20091203152731.GA10251@refried.org>
@ 2009-12-04 14:54   ` Cyril Hrubis
  0 siblings, 0 replies; 6+ messages in thread
From: Cyril Hrubis @ 2009-12-04 14:54 UTC (permalink / raw)
  To: Nate Straz; +Cc: ltp-list

Hi!
> 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.

Yes, but the question here is if this must be done this way. And if anybody
uses this.

And also this interface is not used in all tests. Quick greping shows that it's
used moslty in testcases/kernel/ (there are 12 test outside this directory) and
in about 56% of tests there.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [RFC] utstest.h
       [not found]           ` <alpine.DEB.2.00.0912031014590.4647@sleepy>
@ 2009-12-04 14:58             ` Cyril Hrubis
  0 siblings, 0 replies; 6+ messages in thread
From: Cyril Hrubis @ 2009-12-04 14:58 UTC (permalink / raw)
  To: manoj.iyer
  Cc: ltp-list, Mike Frysinger, Michael Reed, Nate Straz, paul.larson

Hi!
> Its been a while since I looke at that code, but as a general
> comment, any clean up effort is good, but please make sure you test
> it and release a beta version for people to try so that you dont
> break existing users. I am more interested in seeing a modified
> version and trying that out, rather than reading a proposal.

Well, before I start cleaning up the code I need to know which parts of the
interface are really usefull and should be keept in ltp.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-04 14:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-16 15:16 [LTP] [RFC] utstest.h Cyril Hrubis
2009-11-20 12:53 ` Cyril Hrubis
2009-11-26 14:13   ` Cyril Hrubis
     [not found]     ` <364299f40911260622s4e5ae3c5j555b922a7b85f4b0@mail.gmail.com>
2009-11-30 13:50       ` Cyril Hrubis
     [not found]         ` <1259853101.5085.36.camel@subratamodak.linux.ibm.com>
     [not found]           ` <alpine.DEB.2.00.0912031014590.4647@sleepy>
2009-12-04 14:58             ` Cyril Hrubis
     [not found] ` <20091203152731.GA10251@refried.org>
2009-12-04 14:54   ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox