]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests: ignore stderr for expect
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 13 Jan 2017 10:23:18 +0000 (11:23 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 13 Jan 2017 10:23:18 +0000 (11:23 +0100)
expect redirects both stdout and stderr to its input.  This causes
serious problems when libzebra prints log messages to stderr, which are
then asynchronously inserted in the middle of lines of stdout test
output.  Ultimately this makes testbgpmpattr fail on FreeBSD.

(The stdio buffering seems to be slightly different on FreeBSD,
triggering the bug.)

Just ignore stderr for expect.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
tests/bgpd.tests/aspathtest.exp
tests/bgpd.tests/ecommtest.exp
tests/bgpd.tests/testbgpcap.exp
tests/bgpd.tests/testbgpmpath.exp
tests/bgpd.tests/testbgpmpattr.exp
tests/libzebra.tests/tabletest.exp
tests/libzebra.tests/test-timer-correctness.exp
tests/libzebra.tests/testnexthopiter.exp
tests/libzebra.tests/teststream.exp

index dfecec78012f0c0b606bd54461953fef7b351390..f5f262f80a013f3eaf179a659b21de6e5b0d25e2 100644 (file)
@@ -3,7 +3,7 @@ set testprefix "aspathtest "
 set aborted 0
 set color 1
 
-spawn "./aspathtest"
+spawn sh -c "exec ./aspathtest 2>/dev/null"
 
 # proc onetest { test_name note start } {
 # proc headerline { line } {
index 074952fab8934f18c61bb709430e9b5ca9cfab8f..cbeb03af520658ba6ed229c8f3b39ca5f25ebc72 100644 (file)
@@ -3,7 +3,7 @@ set testprefix "ecommtest "
 set aborted 0
 set color 0
 
-spawn "./ecommtest"
+spawn sh -c "exec ./ecommtest 2>/dev/null"
 
 # proc simpletest { start } {
 
index 2572623f0673b7918631075a20076258f9682281..aba6906bc06ace1e0c188fa39e80b2310db51eef 100644 (file)
@@ -3,7 +3,7 @@ set testprefix "testbgpcap "
 set aborted 0
 set color 1
 
-spawn "./testbgpcap"
+spawn sh -c "exec ./testbgpcap 2>/dev/null"
 
 # proc simpletest { start } {
 
index 96a51e390c3cff771c0a34c86bcf65294125aabb..6820f636a400652ac5186f3a838e6ca274d0aa2e 100644 (file)
@@ -3,7 +3,7 @@ set testprefix "testbgpmpath "
 set aborted 0
 set color 1
 
-spawn "./testbgpmpath"
+spawn sh -c "exec ./testbgpmpath 2>/dev/null"
 
 # proc simpletest { start } {
 
index e6d7305a688d41037738bff90504f7b1c312702d..1abce3fc9afc7669ad0d241ff148bca5da99c48b 100644 (file)
@@ -3,7 +3,7 @@ set testprefix "testbgpmpattr "
 set aborted 0
 set color 1
 
-spawn "./testbgpmpattr"
+spawn sh -c "exec ./testbgpmpattr 2>/dev/null"
 
 # proc simpletest { start } {
 
index 5838d4fc7c0e47cd3ee3403868baa9e05faf3438..7496994b7fb9b5d65544aa7bd661ca3799f23aea 100644 (file)
@@ -2,7 +2,7 @@ set timeout 10
 set testprefix "tabletest "
 set aborted 0
 
-spawn "./tabletest"
+spawn sh -c "exec ./tabletest 2>/dev/null"
 
 for {set i 0} {$i <  6} {incr i 1} { onesimple "cmp $i" "Verifying cmp"; }
 for {set i 0} {$i < 11} {incr i 1} { onesimple "succ $i" "Verifying successor"; }
index 83531c7df81c8d557f1e410d27e95293127c2f8c..570150cd516b2e57f0020129e389d1f5b3a0b4b1 100644 (file)
@@ -2,6 +2,6 @@ set timeout 10
 set testprefix "test-timer-correctness"
 set aborted 0
 
-spawn "./test-timer-correctness"
+spawn sh -c "exec ./test-timer-correctness 2>/dev/null"
 
 onesimple "" "Expected output and actual output match."
index be35a0a2b8637d8bb8c46f688ac08408fe0e719d..777b7539950dd90dfa6841e432546f7e45cc4371 100644 (file)
@@ -2,7 +2,7 @@ set timeout 10
 set testprefix "testnexthopiter "
 set aborted 0
 
-spawn "./testnexthopiter"
+spawn sh -c "exec ./testnexthopiter 2>/dev/null"
 
 onesimple "simple" "Simple test passed."
 onesimple "prng" "PRNG test passed."
index ca602e305b25ef23fee74238966d0558798c69a3..c977bb441760cf37e3381247cfff69f9d5f78c91 100644 (file)
@@ -1,5 +1,5 @@
 set timeout 10
-spawn "./teststream"
+spawn sh -c "exec ./teststream 2>/dev/null"
 
 expect {
        "endp: 15, readable: 15, writeable: 1009" { }