On Thu, 2009-03-19 at 10:26 -0500, Will Schmidt wrote:
> On Thu, 2009-03-19 at 17:31 +0530, gowrishankar wrote:
> > Subrata Modak wrote:
> > > Hi,
> > > 
> > > On Thu, 2009-03-19 at 12:58 +0530, gowrishankar wrote:
> > >> Subrata Modak wrote:
> > >>> Please resend. It does not apply at all:
> > >> I am able to apply, not sure what is wrong on other end.
> > >> I am attaching fresh patch below.
> > >>
> > >> gowri@/ltp-full-20081231$ patch -p1 --dry-run < 
> > >> patches/parse-testpi2.patch
> > > 
> > > Check the version against you are applying !!
> > > 
> > > patching file testcases/realtime/func/pi-tests/parse-testpi2.py
> > > Hunk #1 FAILED at 54.
> > > 
> > > LTP had gone a round of fixes last month for all test cases regarding
> > > their indentation/coding styles. Rebase against the latest code and
> > > please resend.
> > > 
> > I have generated below patch over feb'2009. Please fix manually if it still
> > fails to apply. May be the problem is with my email client.
> > 
> > Signed-off-by: Gowrishankar M <[email protected]>
> > Tested-by: Gowrishankar M <[email protected]>
> > Acked-by: Vernon Mauery <[email protected]>
> 
> Hi Gowri, 
> It looks like an extra space is embedded at the beginning of each line
> in the patch.
> 

True.

> Subrata, try this respin.  This applies clean to a fresh cvs checkout
> this morning.
> 
> 

Thanks. Merged.

Regards--
Subrata

> diff -Naur ltp.orig/testcases/realtime/func/pi-tests/parse-testpi2.py 
> ltp/testcases/realtime/func/pi-tests/parse-testpi2.py
> --- ltp.orig/testcases/realtime/func/pi-tests/parse-testpi2.py        
> 2009-03-19 10:09:28.000000000 -0500
> +++ ltp/testcases/realtime/func/pi-tests/parse-testpi2.py     2009-03-19 
> 10:10:07.000000000 -0500
> @@ -54,6 +54,8 @@
>                        prev_line=line
>               if count>=2:
>                       return True
> +             else:
> +                     return False
> 
>  def main():
>       if len(sys.argv) < 2:
> 
> 
> 
> 
> 
> > ---
> > Index: ltp-full-20090228/testcases/realtime/func/pi-tests/parse-testpi2.py
> > ===================================================================
> > --- 
> > ltp-full-20090228.orig/testcases/realtime/func/pi-tests/parse-testpi2.py    
> >     2009-03-19 17:21:21.000000000 +0530
> > +++ ltp-full-20090228/testcases/realtime/func/pi-tests/parse-testpi2.py     
> > 2009-03-19 17:22:21.000000000 +0530
> > @@ -54,6 +54,8 @@
> >                      prev_line=line
> >             if count>=2:
> >                     return True
> > +           else:
> > +                   return False
> > 
> >   def main():
> >     if len(sys.argv) < 2:
> > 
> > > Regards--
> > > Subrata
> > > 
> > >> patching file testcases/realtime/func/pi-tests/parse-testpi2.py
> > >>
> > >> ---
> > >> Index: 
> > >> ltp-full-20090131/testcases/realtime/func/pi-tests/parse-testpi2.py
> > >> ===================================================================
> > >> --- 
> > >> ltp-full-20090131.orig/testcases/realtime/func/pi-tests/parse-testpi2.py 
> > >>     2009-03-19 12:50:43.000000000 +0530
> > >> +++ ltp-full-20090131/testcases/realtime/func/pi-tests/parse-testpi2.py  
> > >> 2009-03-19 12:51:19.000000000 +0530
> > >> @@ -54,6 +54,8 @@
> > >>                           prev_line=line
> > >>                  if count>=2:
> > >>                          return True
> > >> +                else:
> > >> +                        return False
> > >>
> > >>   def main():
> > >>          if len(sys.argv) < 2:
> > >>
> > >> ---
> > >> Thanks,
> > >> Gowri
> > >>
> > >>> patching file testcases/realtime/func/pi-tests/parse-testpi2.py
> > >>> Hunk #1 FAILED at 54.
> > >>> 1 out of 1 hunk FAILED -- saving rejects to file
> > >>> testcases/realtime/func/pi-tests/parse-testpi2.py.rej
> > >>>
> > >>> Regards--
> > >>> Subrata
> > >>>
> > >>> On Wed, 2009-03-18 at 11:33 +0530, gowrishankar wrote:
> > >>>> Hi Subrata,
> > >>>> Please accept the patch below.
> > >>>>
> > >>>> Thanks,
> > >>>> Gowri
> > >>>> ---
> > >>>>
> > >>>> realtime: fix testpi2 parser from invalid index type error
> > >>>>
> > >>>> The patch below fixes invalid array index returned by eval() function
> > >>>> in testpi2 parser.
> > >>>>
> > >>>> While a typical testpi2 logfile, where text fragment "pthread pol 2 
> > >>>> pri 10"
> > >>>> follows 'Noise Thread' line more than once, is given to testpi2 
> > >>>> parser, it
> > >>>> exits with error below:
> > >>>>
> > >>>>     TypeError: list indices must be integers
> > >>>>
> > >>>> The root cause for the error is TestPi2.eval() function that returns
> > >>>> TRUE if the text fragment follows 'Noise Thread' more than once in log
> > >>>> file, None object otherwise.
> > >>>>
> > >>>> As an array index can not be evaluated from 'None' object this patch
> > >>>> adds 'else' clause in eval() to return False, instead of None.
> > >>>>
> > >>>> Testing information:
> > >>>>
> > >>>> This patch has been tested by me in following ways:
> > >>>>
> > >>>> Consider truncated log file as below, so as to get count of 1 to
> > >>>> reproduce error scenario.
> > >>>>
> > >>>>     cat /tmp/rt-ipe-2.6.24-rt1-dvh01-2008-31-01-testpi-2.log
> > >>>>     Noise Thread 18583(40) loop 7000 pthread pol 2 pri 40
> > >>>>     Noise Thread 18583(40) loop 7100 pthread pol 2 pri 40
> > >>>>     Thread 18579(10) loop 0 pthread pol 2 pri 10
> > >>>>     Thread 18579(10) loop 100 pthread pol 2 pri 10
> > >>>>     Noise Thread 18583(40) loop 7200 pthread pol 2 pri 40
> > >>>>     Noise Thread 18583(40) loop 7300 pthread pol 2 pri 40
> > >>>>
> > >>>>     python parse-testpi2.py 
> > >>>> /tmp/rt-ipe-2.6.24-rt1-dvh01-2008-31-01-testpi-2.log
> > >>>>     Result: FAIL
> > >>>>
> > >>>> Change log:
> > >>>>    Version 1:
> > >>>>      - detached from old patch "ltp: fix unicode warning and array
> > >>>>        index problems in pi-tests parsers" of version 2
> > >>>>
> > >>>> Signed-off-by: Gowrishankar M <[email protected]>
> > >>>> Tested-by: Gowrishankar M <[email protected]>
> > >>>> Acked-by: Vernon Mauery <[email protected]>
> > >>>>
> > >>>> ---
> > >>>>
> > >>>> Index: 
> > >>>> ltp-full-20081231/testcases/realtime/func/pi-tests/parse-testpi2.py
> > >>>> ===================================================================
> > >>>> --- 
> > >>>> ltp-full-20081231.orig/testcases/realtime/func/pi-tests/parse-testpi2.py
> > >>>>    2009-02-02 12:35:03.000000000 +0530
> > >>>> +++ 
> > >>>> ltp-full-20081231/testcases/realtime/func/pi-tests/parse-testpi2.py    
> > >>>>     2009-02-02 12:46:59.000000000 +0530
> > >>>> @@ -54,6 +54,8 @@
> > >>>>                         prev_line=line
> > >>>>                if count>=2:
> > >>>>                        return True
> > >>>> +              else:
> > >>>> +                      return False
> > >>>>
> > >>>>   def main():
> > >>>>        if len(sys.argv) < 2:
> > >>>
> > > 
> > > 
> > 
> 


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to