Skip to contentSkip to conversation

xfstests 273: fix a typo

PATCH In review Wang Sheng-Hui 3 participants 7 messages Feb 27, 2013 – Mar 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests 273: fix a typo

Make the porter log cp failure into $seq.full by appending, not overwriting, which can help debug.

---
 273 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
273 +1 -1
index 67f3d6b..639e280 100755
@@ -92,7 +92,7 @@ _porter()
 		exit
 	fi
 
-	cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>&1
+	cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >>$seq.full 2>&1
 	if [ $? -ne 0 ]
 	then
 		echo "_porter $_suffix not complete"
Signature · 6 lines
1.7.10.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#2 lore raw
In reply to Wang Sheng-Hui
Quoted 13 lines · Wang Sheng-Hui

Make the porter log cp failure into $seq.full by appending, not overwriting, which can help debug.

---
 273 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
273 +0 -0
index 67f3d6b..639e280 100755

273 _porter() · line 95

Quoted 5 lines
273 +1 -1
@@ -92,7 +92,7 @@ _porter()
 		exit
 	fi
 
-	cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>&1
+	cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >>$seq.full 2>&1

This gives me

273 154s ... [20:05:00] [20:05:01] - output mismatch (see 273.out.bad)

    --- 273.out 2011-11-11 15:13:46.000000000 +0100
    +++ 273.out.bad     2013-03-06 20:05:01.000000000 +0100
    @@ -1,4 +1,4 @@
     QA output created by 273
    -------------------------------
    -start the workload
    -------------------------------
    +./273: line 95: syntax error near unexpected token `&'
    +./273: line 95: `  cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>>&1'
    +umount: /dev/sda9: not mounted
     ...
     (Run 'diff -u 273.out 273.out.bad' to see the entire diff)

---

The script calls /bin/bash, my version says
GNU bash, version 4.1.10(1)-release

david

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw
Quoted 23 lines · David Sterba
Quoted 13 lines · Wang Sheng-Hui

Make the porter log cp failure into $seq.full by appending, not overwriting, which can help debug.

---
 273 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
273 +0 -0
index 67f3d6b..639e280 100755

273 _porter() · line 95

Quoted 5 lines
273 +1 -1
@@ -92,7 +92,7 @@ _porter()
 		exit
 	fi
 
-	cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>&1
+	cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >>$seq.full 2>&1

This gives me

273 154s ... [20:05:00] [20:05:01] - output mismatch (see 273.out.bad)

Quoted 10 lines
    --- 273.out 2011-11-11 15:13:46.000000000 +0100
    +++ 273.out.bad     2013-03-06 20:05:01.000000000 +0100
    @@ -1,4 +1,4 @@
     QA output created by 273
    -------------------------------
    -start the workload
    -------------------------------
    +./273: line 95: syntax error near unexpected token `&'
    +./273: line 95: `  cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>>&1'
    +umount: /dev/sda9: not mounted

that seems rather strange. The patch does this:

	....sub_$_suffix >>$seq.full 2>&1

and the error output you see is

	....sub_$_suffix >$seq.full 2>>&1

So it doesn't look lie you are running with the change that is actually in the patch...

Quoted 6 lines

...
(Run 'diff -u 273.out 273.out.bad' to see the entire diff)
---

The script calls /bin/bash, my version says
GNU bash, version 4.1.10(1)-release

Wroks fine here, with:

GNU bash, version 4.2.37(1)-release

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#4 lore raw
Quoted 4 lines · Dave Chinner
Quoted 3 lines · David Sterba

Review

Quoted 2 lines · Wang Sheng-Hui
(quoted diff) +1 -1
-	cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>&1
+	cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >>$seq.full 2>&1

This is quote from the mail, but the merged patch does something else.

Quoted 7 lines
Quoted 3 lines

+./273: line 95: syntax error near unexpected token `&'
+./273: line 95: ` cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>>&1' +umount: /dev/sda9: not mounted

that seems rather strange. The patch does this:

	....sub_$_suffix >>$seq.full 2>&1

http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git;a=commitdiff;h=0c5e67e46e476b70290033efc7feb784f7ecbab1;hp=08557e219c12e573be459407033495899f46967a

273 +1 -1
@@ -92,7 +92,7 @@ _porter()
                exit
        fi
 
-       cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>&1
+       cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>>&1
        if [ $? -ne 0 ]
        then
                echo "_porter $_suffix not complete"

---

Quoted 6 lines

and the error output you see is

	....sub_$_suffix >$seq.full 2>>&1

So it doesn't look lie you are running with the change that is actually in the patch...

There's a difference between the patch in mail and what has been merged, that can happen, but I wonder why it works on your side.

Minimal reproducer that I used on machines with never bash:
---
touch origin
cp -r origin target >seq.full 2>>&1
---
bash --version: GNU bash, version 4.2.24(1)-release and fails the same way.

Quoted 1 line

GNU bash, version 4.2.37(1)-release

I've checked bash sources (no git, just tar + context diff patches), there's no apparent fix between 24-37 for that.

(Also tried to build a git tree, but filterdiff did not produce 1:1 unified format of the separate patches and there are lots of conflicts).

If possible, I'd like avoid forcing a minimal version of bash, as the enterprise distros do not always ship the latest ones, and this break the tests unnecessarily.

david

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#5 lore raw
Quoted 2 lines · David Sterba

(Also tried to build a git tree, but filterdiff did not produce 1:1 unified format of the separate patches and there are lots of conflicts).

I'm too git-centric and wanted to use 'git apply', but the 'patch' utility is able to apply context diffs just fine, so now tested with "GNU bash, version 4.2.42(2)-release"

$ bash-4.2/bash 273
273: line 4: syntax error near unexpected token `&'
273: line 4: `cp -r origin target >seq.full 2>>&1'

http://www.gnu.org/software/bash/manual/html_node/Redirections.html
does not list the syntactic construct as valid.

david

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#6 lore raw
In reply to David Sterba
Quoted 12 lines · David Sterba
Quoted 4 lines · Dave Chinner
Quoted 3 lines · David Sterba

Review

Quoted 2 lines · Wang Sheng-Hui
(quoted diff) +1 -1
-	cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>&1
+	cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >>$seq.full 2>&1

This is quote from the mail, but the merged patch does something else.

Quoted 3 lines
Quoted 3 lines

+./273: line 95: syntax error near unexpected token `&'
+./273: line 95: ` cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >$seq.full 2>>&1' +umount: /dev/sda9: not mounted

Quoted 5 lines
Quoted 3 lines

that seems rather strange. The patch does this:

	....sub_$_suffix >>$seq.full 2>&1

http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git;a=commitdiff;h=0c5e67e46e476b70290033efc7feb784f7ecbab1;hp=08557e219c12e573be459407033495899f46967a

Oh....

Quoted 11 lines

---

Quoted 6 lines

and the error output you see is

	....sub_$_suffix >$seq.full 2>>&1

So it doesn't look lie you are running with the change that is actually in the patch...

There's a difference between the patch in mail and what has been merged, that can happen, but I wonder why it works on your side.

.... because I haven't updated to the latest xfstests master branch yet - I'm running with the patch from the list applied. I didn't realise you were running from the main repo, and that the commit was busted...

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs