Dear Subrata,

I  have removed the warning and error and attached the updated patch with
this mail.

I request you to apply the patch and let me know if any issues.

Request: Could you share the patch (checkpatch.pl ) which you have
developed, so that I can cross check it at my end for future patches before
sending to the ltp-list .

Regards,
Rohit

On Fri, May 15, 2009 at 12:28 AM, Subrata Modak
<[email protected]>wrote:

> Thanks.
>
> I have started to do some holy job, might be in annoyance to everybody,
> to check all patches with checkpatch.pl before they are merged with
> LTP.
>
> So, i would inform you what needs to be changed in the patch before they
> can be merged. This exercise will help us in preventing any code mess as
> we keep growing, and help maintaining LTP better. Hope, you will agree
> too.
>
> Your patch contains the following errors/warning. Please rectify and
> resend :-)
>
> ========================================================================
> WARNING: line over 80 characters
> #40: FILE: testcases/commands/unzip/unzip_tests.sh:152:
> +               diff -iwB "$PWD/tst_unzip.out" "$PWD/tst_unzip.out.exp"
> > "$PWD/tst_unzip.out.err" || RC=$?
>
> ERROR: Missing Signed-off-by: line(s)
>
> total: 1 errors, 1 warnings, 49 lines checked
> ========================================================================
>
> Regards--
> Subrata
>
> On Thu, 2009-05-14 at 09:32 +0530, rohit verma wrote:
> >
> >
> > ---------- Forwarded message ----------
> > From: CAI Qian <[email protected]>
> > Date: Wed, May 13, 2009 at 8:05 PM
> > Subject: Re: Patch for [LTP] :Unzip01 Test Not Working Correctly
> > To: [email protected]
> >
> >
> > From: rohit verma <[email protected]>
> > Subject: Re: Patch for [LTP] :Unzip01 Test Not Working Correctly
> >
> > Date: Tue, 12 May 2009 17:10:36 +0530
> >
> > > Hi Qian,
> > >
> > > Yes you are correct. We cannot predict the output order of unzip. So
> > I
> > > have sorted the
> > > actual and expected output and attached the updated patch with this
> > mail.
> > >
> > > I request you to apply this patch and let me know if any issues.
> > >
> > > Regards,
> > > Rohit
> > >
> >
> >
> > Works fine. Please submit to the mailing list.
> >
> > Acked-by: CAI Qian <[email protected]>
> >
> > Thanks,
> > CAI Qian
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> > production scanning environment may not be a perfect world - but thanks
> to
> > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> > Series Scanner you'll get full speed at 300 dpi even with all image
> > processing features enabled. http://p.sf.net/sfu/kodak-com
> > _______________________________________________ Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
>
  If  push command is successful on directory , it cd to LTPTMP.
  As current path is inside LTPTMP directory, it is not possible to create file 
in LTPTMP/
  directory and test would fail.So test case changed from LTPTMP to PWD.

  As output order of unzip is not predicted, order should be sorted.

 Regards,
 rohit verma

 Signed-off-by: rohit verma<[email protected]> 

diff -ruxB ltp-full-20090430_original/testcases/commands/unzip/unzip_tests.sh 
ltp-full-20090430/testcases/commands/unzip/unzip_tests.sh
--- ltp-full-20090430_original/testcases/commands/unzip/unzip_tests.sh  
2009-02-26 18:40:54.000000000 +0530
+++ ltp-full-20090430/testcases/commands/unzip/unzip_tests.sh   2009-07-18 
06:03:56.000000000 +0530
@@ -44,7 +44,7 @@
 chk_ifexists()
 {
        RC=0
-       which $2 > "$LTPTMP/tst_unzip.err" || RC=$?
+       which $2 > "$PWD/tst_unzip.err" || RC=$?
        if [ $? -ne 0 ]
        then
                tst_brkm TBROK NULL "$1: command $2 not found."
@@ -98,8 +98,8 @@
        chk_ifexists INIT awk       || return $RC
 
        # create expected output files. tst_unzip.exp
-       cat > $LTPTMP/tst_unzip.out.exp <<-EOF
-       Archive:  $TMP/tst_unzip_file.zip
+       cat > $PWD/tst_unzip.out.exp <<-EOF
+       Archive:  $1
     creating: tst_unzip.dir/
     creating: tst_unzip.dir/d.0/
     extracting: tst_unzip.dir/d.0/f.0
@@ -140,17 +140,22 @@
 
        tst_resm TINFO "Test #1: unzip command un-compresses a .zip file."
 
-       unzip "${zipfile}" > "$LTPTMP/tst_unzip.out" || RC=$?
+       unzip "${zipfile}" > "$PWD/tst_unzip.out" || RC=$?
        if [ $RC -ne 0 ]
        then
-               tst_res TFAIL "$LTPTMP/tst_unzip.out" \
+               tst_res TFAIL "$PWD/tst_unzip.out" \
                        "Test #1: unzip command failed. Return value = $RC. 
Details:"
                return $RC
        else
-               diff -iwB "$LTPTMP/tst_unzip.out" "$LTPTMP/tst_unzip.out.exp" > 
"$LTPTMP/tst_unzip.out.err" || RC=$?
+               sort -o "$PWD/tst_unzip.out" "$PWD/tst_unzip.out"
+               sort -o "$PWD/tst_unzip.out.exp" "$PWD/tst_unzip.out.exp"
+
+               diff -iwB "$PWD/tst_unzip.out" "$PWD/tst_unzip.out.exp" >\
+                         "$PWD/tst_unzip.out.err" || RC=$?
+               
                if [ $RC -ne 0 ]
                then
-                       tst_res TFAIL "$LTPTMP/tst_unzip.out.err" \
+                       tst_res TFAIL "$PWD/tst_unzip.out.err" \
                                "Test #1: unzip output differs from expected 
output. Details"
                else
                        tst_resm TINFO "Test #1: check if 
\"$PWD/tst_unzip.dir\" exits."
@@ -180,7 +185,7 @@
 
 RC=0
 stat "$1" || exit $?
-init || exit $?
+init "$1" || exit $?
 
 test01 "$1" || RC=$?
 
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to