----- Original Message -----
> From: "Cyril Hrubis" <chru...@suse.cz>
> To: "Jan Stancek" <jstan...@redhat.com>
> Cc: ltp-list@lists.sourceforge.net, li...@redhat.com
> Sent: Tuesday, 20 January, 2015 3:44:03 PM
> Subject: Re: [PATCH] runltp: export initialized LTP_DEV
> 
> Hi!
> > This patch restores behavior from ltp-20140828, where LTP_DEV is exported
> > and tst_acquire_device() will use that instead of trying to acquire/release
> > loopdev on its own.
> 
> Sorry for my confusion. This patch is correct as it moves the export to
> the right places. I didn't read till it carefully and thought this
> simply reverts the change, sorry.
> 
> The change is acked, but I think that it merely avoids the EBUSY from
> the ioctl() and that there is a real bug somewhere, likely some race
> condition in kernel.

I agree, that it looks like kernel bug and patch might only work around that.
I'll keep exploring the bug path in the meantime as well.
Thanks for ack, here's updated commit log:

---
commit 5c7c3fb219957484db92111d423e4e2553fb580b removed initialization
of empty LTP_DEV from setup(), but it also caused that LTP_DEV
is no longer exported when it's initialized in set_block_device().

This causes every test to attempt to get loop device on its own,
which is not necessary and may presumably sporadically cause issues
on older buggy kernels during cleanup of loop device.

This patch makes LTP_DEV exported (when it's not empty) and
tst_acquire_device() will use that instead of trying to acquire/release
loop device on its own for each test.
---

Regards,
Jan

> 
> > Signed-off-by: Jan Stancek <jstan...@redhat.com>
> > ---
> >  runltp |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/runltp b/runltp
> > index e803898..8116306 100755
> > --- a/runltp
> > +++ b/runltp
> > @@ -1011,10 +1011,10 @@ set_block_device()
> >              echo "Tests which require block device are disabled."
> >              echo "You can specify it with option -b"
> >     else
> > -            LTP_DEV=$DEVICE
> > +            export LTP_DEV=$DEVICE
> >          fi
> >      else
> > -        LTP_DEV=$DEVICE
> > +        export LTP_DEV=$DEVICE
> >      fi
> >  }
> >  
> > --
> > 1.7.1
> > 
> 
> --
> Cyril Hrubis
> chru...@suse.cz
> 

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to