[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-list
Subject:    Re: [LTP] [POSIX][PATCH]Instead sem_wait by fcntl for sigaction
From:       Garrett Cooper <yanegomi () gmail ! com>
Date:       2011-01-21 9:57:45
Message-ID: AANLkTinvB5jzHd=KtFxUddxj-myqu=-NbOpOAJ0ikKoC () mail ! gmail ! com
[Download RAW message or body]

On Wed, Jan 19, 2011 at 11:12 PM, Bian Naimeng <biannm@cn.fujitsu.com> wrote:
> 
> Garrett Cooper wrote:
> > On Sun, Nov 21, 2010 at 5:29 PM, Bian Naimeng <biannm@cn.fujitsu.com> wrote:
> > > Garrett Cooper wrote:
> > > > On Fri, Nov 19, 2010 at 4:21 AM, Cyril Hrubis <chrubis@suse.cz> wrote:
> > > > > Hi!
> > > > > > Some days before, mitani-san reported some sigaction test failed at \
> > > > > > linux, http://sourceforge.net/mailarchive/message.php?msg_id=000001cb798d%241aaa0210%244ffe0630%24%40co.jp
> > > > > >  
> > > > > > As Garrett said, add Linux-isms is not advisably. So i want try to fix it \
> > > > > > by another method. 
> > > > > > I have seen the assertions.xml, these tests want to test sigaction with \
> > > > > > SA_RESTART not sem_wait(it looks like there's a bug at older linux \
> > > > > > kernel), so i suggest to instead sem_wait by fcntl.
> > > > > > 
> > > > > > What about this one?  If you agree with me, i will post other patchs.
> > > > > As far as I understand this, you are trying to avoid a fact, that older
> > > > > kernels are not comforming to the POSIX specification. This is a case
> > > > > where the test is failing for a good reason, all we could do here is
> > > > > print message like:
> > > > > 
> > > > > "this test is known to fail on linux kernel < 2.6.22"
> > > > > 
> > > > > Before the test reports failure.
> > > > Well... I would actually record these items in a file somewhere. Once
> > > > upon a time the ltp-results@ list was a good source for this data, but
> > > > I don't know how useful this data is anymore or how much/well this
> > > > data is reported and subsequently mined (I'm not on the list for
> > > > instance)...
> > > > 
> > > > > On the other end I do not object to adding test for file locks with
> > > > > SA_RESTART. But you should not remove the sem_lock() test (as it's not
> > > > > broken).
> > > > Agreed.
> > > > 
> > > Well...
> > > Then, do you have a plan to do it?
> > 
> > You can too? Adding tests is fine as well, but I'm extremely picky
> > when it comes to large wholesale changes being made to the codebase
> > where it isn't really apparent with what's being fixed.
> 
> hi Garrett,
> 
> Many sigaction tests fail caused by sem_wait on linux(2.6.22 before),
> then tester need waste time to check it.

    But what are the actual errors, what platform is it, etc? There
isn't enough actionable data for us (LTP) to do anything, and if it
doesn't happen with a vanilla kernel, then *shrugs* there isn't much
that can be done.

> I want replace sem_wait by fcntl to solve this problem, and add a sem_wait case.
> What's purpose of the new test is make sure sem_wait can automatic restart when a
> signal with SA_RESTART flag is delivered.

    fcntl isn't semantically the same as sem_* though, and there are
subtleties like reentrancy, controlling access to multiple consumers,
etc that you can't necessarily get with fcntl.
    I'm all for writing testcases that make sense with the minimum
amount of overhead and the maximum amount of coverage, but `fixing'
testcases to deal with specific, broken operating systems just isn't
maintainable.
    Dumb question as well: what do you guys do for the sem_* testcases?
Thanks,
-Garrett

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic