Hi,

--- Elder Costa <[EMAIL PROTECTED]> wrote:

> CAI Qian wrote:
> > Hi,
> > 
> > This patch fixes a comparison failure spotted by Elder Costa
> because
> > the script was generating empty files.
> > 
> > Signed-off-by: CAI Qian <[EMAIL PROTECTED]>
> > 
> > --- cron_tests.sh.orig      2008-10-29 12:42:46.510747851 +0800
> > +++ cron_tests.sh   2008-10-29 12:43:50.124748312 +0800
> > @@ -178,7 +178,7 @@
> >     TS_MIN2=$(awk '{print $8}' $LTPTMP/tst1_cron.out |
> >         awk -F: '{printf("%d", $2);}')
> >  
> > -   if [ $TS_MIN2 -ne $TS_MIN1 ]
> > +   if [ "$TS_MIN2" != "$TS_MIN1" ]
> >     then
> >             # if the value of the minute field did not advance by 1
> >             # flag as failure.
> 
> Hello Cai.
> 
> This does not solve the problem: the test still fails if the file is 
> empty. I think this issue would require the some rework on the script
> 
> for it to better handle exceptions such as empty files. As the
> original 
> problem was caused by bash specific statements which failed to create
> 
> the script ran by cron (and AFAICT other files as well) I think the 
> issue is solved. May I propose to revert this line to the original
> one 
> just to keep things simple?
> 

Sure. Alternatively, do you think if this is sufficient?

-       if [ $TS_MIN2 -ne $TS_MIN1 ]
+       if [ "$TS_MIN2" ] && [ "$TS_MIN2" != "$TS_MIN1" ]

> Elder.
> 
> 
> 



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to