[Fuego] [PATCH 07/18] LTP: reduce the time required for two more tests

Tim.Bird at sony.com Tim.Bird at sony.com
Wed Jan 31 19:40:41 UTC 2018



> -----Original Message-----
> From: Daniel Sangorrin [mailto:daniel.sangorrin at toshiba.co.jp]
> > -----Original Message-----
> > From: Bird, Timothy [mailto:Tim.Bird at sony.com]
> > > -----Original Message-----
> > > From: Daniel Sangorrin
> > >
> > > Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
> > > ---
> > >  engine/tests/Functional.LTP/fuego_test.sh | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/engine/tests/Functional.LTP/fuego_test.sh
> > > b/engine/tests/Functional.LTP/fuego_test.sh
> > > index 8278e98..ae85bac 100755
> > > --- a/engine/tests/Functional.LTP/fuego_test.sh
> > > +++ b/engine/tests/Functional.LTP/fuego_test.sh
> > > @@ -190,6 +190,8 @@ function test_run {
> > >
> > >          # we patch them here because of the different phases
> > >          cmd "sed -i 's/^fork13 fork13 -i 1000000/fork13 fork13 -i 100000/'
> > > $LTP_DESTDIR/runtest/syscalls"
> > > +        cmd "sed -i 's/^dio30 diotest6 -b 65536 -n 100 -i 100 -o 1024000/dio30
> > > diotest6 -b 65536 -n 5 -i 100 -o 1024000/' $LTP_DESTDIR/runtest/dio"
> > > +        cmd "sed -i 's/^msgctl11 msgctl11/msgctl11 msgctl11 -n 5/'
> > > $LTP_DESTDIR/runtest/syscalls"
> >
> > Can we make this dependent on some spec ARG, like
> > FUNCTIONAL_LTP_SHORT_RUN or something?
> > (other name suggestions are welcome.)
> >
> > I think in general, quite a few tests would benefit from
> > having a spec that allowed for a shorter version of the test
> > to run.
> 
> Sure, good idea.

OK.  In the mean time, I've applied this patch.

One issue with this is what happens if the sed line fails to find the match.
Does this end up causing the test to error out?  Having full lines like this is
a bit fragile.  If the arguments change upstream, this will break.

I haven't tested it, but we might want something like the following:
cmd "sed -i 's/^dio30 diotest6 \(.*\) -n 100 \(.*\)/dio30 diotest6 \1 -n 5 \2/' $LTP_DESTDIR/runtest/dio"

This preserves the other arguments, and only checks to change '-n 100' to '-n 5'.

 -- Tim



More information about the Fuego mailing list