network/xinetd: source test_net.sh for tst_retry
PATCH 1/2 network/xinetd: source test_net.sh for tst_retry
Fix error: xinetd_tests.sh: line 323: tst_retry: command not found. tst_retry was defined in test.sh. Since this is a network test, source test_net.sh directly.
--- testcases/network/xinetd/xinetd_tests.sh | 1 + 1 file changed, 1 insertion(+)
testcases/network/xinetd/xinetd_tests.sh +1 -0
@@ -63,6 +63,7 @@ init() export TST_TOTAL=2 export TCID="xinetd" export TST_COUNT=0 + . test_net.sh . daemonlib.sh if [ -f "/usr/lib/systemd/system/telnet.socket" ]; then
Signature · 1 line
2.5.5
PATCH 2/2 network/xinetd: tst_xinetd.exp.2 want get both standard and error output
tst_xinetd.exp.2 want get both standard and error output, like Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Connection closed by foreign host.
We will get nothing if use like 2>log 2>&1, fix this by use &>log.
Also fix a tst_retry typo.
--- testcases/network/xinetd/xinetd_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/network/xinetd/xinetd_tests.sh +2 -2
@@ -388,7 +388,7 @@ test01() # not terminated by the test gracefully. if [ $IPV6_ENABLED -eq 1 ] then - tst_retry "echo '' | $TELNET_COMM ::1 2>$LTPTMP/tst_xinetd.out.ipv6 2>&1" + tst_retry "echo '' | $TELNET_COMM ::1 &> $LTPTMP/tst_xinetd.out.ipv6" diff -iwB $LTPTMP/tst_xinetd.out.ipv6 $LTPTMP/tst_xinetd.exp.2.ipv6 \ > $LTPTMP/tst_xinetd.err.ipv6 2>&1 RC=$?
@@ -403,7 +403,7 @@ test01() fi fi - test_retry "echo '' | $TELNET_COMM 127.0.0.1 2>$LTPTMP/tst_xinetd.out 2>&1" + tst_retry "echo '' | $TELNET_COMM 127.0.0.1 &> $LTPTMP/tst_xinetd.out" diff -iwB $LTPTMP/tst_xinetd.out $LTPTMP/tst_xinetd.exp.2 \ > $LTPTMP/tst_xinetd.err 2>&1
Signature · 1 line
2.5.5
PATCH 1/2 network/xinetd: source test_net.sh for tst_retry
In reply to Hangbin LiuHi Alexey,
Would you like to help review this patch set?
Thanks
Hangbin
Quoted 27 lines · Hangbin Liu
Fix error:
xinetd_tests.sh: line 323:tst_retry: command not found.tst_retrywas defined intest.sh. Since this is a network test, sourcetest_net.shdirectly.Signed-off-by Hangbin Liu <[email protected]>--- testcases/network/xinetd/xinetd_tests.sh | 1 + 1 file changed, 1 insertion(+)testcases/network/xinetd/xinetd_tests.sh +1
-0@@ -63,6 +63,7 @@ init() export TST_TOTAL=2 export TCID="xinetd" export TST_COUNT=0 + . test_net.sh . daemonlib.sh if [ -f "/usr/lib/systemd/system/telnet.socket" ]; thenSignature · 5 lines
2.5.5 -- Mailing list info: https://lists.linux.it/listinfo/ltp