kseltest: bpf: test_lwt_ip_encap.sh: Why -l used in test_gso
Hi All,
I am trying to understand test_gso test for IPv4 and IPv6 with following piece of code
# listen on IPv*_DST, capture TCP into $TMPFILE
if [ "${PROTO}" == "IPv4" ] ; then
IP_DST=${IPv4_DST}
ip netns exec ${NS3} bash -c \
"nc -4 -l -s ${IPv4_DST} -p 9000 > ${TMPFILE} &"
elif [ "${PROTO}" == "IPv6" ] ; then
IP_DST=${IPv6_DST}
ip netns exec ${NS3} bash -c \
"nc -6 -l -s ${IPv6_DST} -p 9000 > ${TMPFILE} &"
RET=$?
else
echo " test_gso: unknown PROTO: ${PROTO}"
fiI have couple of queries around it
a) why -l is being used for reading listen on IPv*_DST with -s option.
I was looking at https://www.computerhope.com/unix/nc.htm, following has been mentioned:
-l : Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host. It is an error to use this option in conjunction with the -p, -s, or -z options. Additionally, any timeouts specified with the -w option are ignored.
b) Even if there is requirement of -l option to use. can we provide timeout option also. how? as -w dont work with -l.
I am facing an issue with Linux-5.3 Kselftest where even if test_lwt_ip_encap.sh "exit", bpf/runner.sh is not running next test case. It just wait until CRTL + c is pressed.
If I comment above code things work fine.
Please sugggest
--prabhakar (pk)
Hi, Kushwaha.
Quoted 28 lines · Prabhakar Kushwaha
Hi All,
I am trying to understand
test_gsotest for IPv4 and IPv6 with following piece of code# listen on IPv*_DST, capture TCP into $TMPFILE if [ "${PROTO}" == "IPv4" ] ; then IP_DST=${IPv4_DST} ip netns exec ${NS3} bash -c \ "nc -4 -l -s ${IPv4_DST} -p 9000 > ${TMPFILE} &" elif [ "${PROTO}" == "IPv6" ] ; then IP_DST=${IPv6_DST} ip netns exec ${NS3} bash -c \ "nc -6 -l -s ${IPv6_DST} -p 9000 > ${TMPFILE} &" RET=$? else echo " test_gso: unknown PROTO: ${PROTO}" fiI have couple of queries around it
a) why -l is being used for reading listen on IPv*_DST with -s option.
I was looking at https://www.computerhope.com/unix/nc.htm, following has been mentioned:
-l : Used to specify that nc should listen for an incoming connection rather than initiate a connection to a
remote host. It is an error to use this option in conjunction with the
-p, -s, or -z options.
Additionally, any timeouts specified with the -w option are ignored.
Quoted 5 lines
b) Even if there is requirement of -l option to use. can we provide timeout option also. how? as -w dont work with -l.
I am facing an issue with Linux-5.3 Kselftest where even if
test_lwt_ip_encap.sh"exit",bpf/runner.shis not running next test case. It just wait until CRTL + c is pressed.
I meet same issue. "make run_tests -C bpf" bpf/runner.sh hang on test_lwt_ip_encap.sh. And when i skip it,
test_tc_tunnel.sh also has this problem.
Quoted 8 lines
If I comment above code things work fine.
Please sugggest
--prabhakar (pk)
Signature · 2 lines
Best regards. Liu Yiding
Quoted 35 lines · Liu Yiding
Hi, Kushwaha.
Quoted 31 lines · Prabhakar Kushwaha
Hi All,
I am trying to understand
test_gsotest for IPv4 and IPv6 with following piece of code# listen on IPv*_DST, capture TCP into $TMPFILE if [ "${PROTO}" == "IPv4" ] ; then IP_DST=${IPv4_DST} ip netns exec ${NS3} bash -c \ "nc -4 -l -s ${IPv4_DST} -p 9000 > ${TMPFILE} &" elif [ "${PROTO}" == "IPv6" ] ; then IP_DST=${IPv6_DST} ip netns exec ${NS3} bash -c \ "nc -6 -l -s ${IPv6_DST} -p 9000 > ${TMPFILE} &" RET=$? else echo " test_gso: unknown PROTO: ${PROTO}" fiI have couple of queries around it
a) why -l is being used for reading listen on IPv*_DST with -s option.
I was looking at https://www.computerhope.com/unix/nc.htm, following has been mentioned:
-l : Used to specify that nc should listen for an incoming connection rather than initiate a connection to a
remote host. It is an error to use this option in conjunction with the
-p, -s, or -z options.
Additionally, any timeouts specified with the -w option are ignored.b) Even if there is requirement of -l option to use. can we provide timeout option also. how? as -w dont work with -l.
Quoted 9 lines
Quoted 2 lines
I am facing an issue with Linux-5.3 Kselftest where even if
test_lwt_ip_encap.sh"exit",bpf/runner.shis not running next test case. It just wait until CRTL + c is pressed.I meet same issue. "make
run_tests-C bpf"bpf/runner.shhang ontest_lwt_ip_encap.sh. And when i skip it,
test_tc_tunnel.shalso has this problem.
does this means, the problem is independent of "nc" and has no relation with nc usage with -l option.
has anyone find it's root-cause..
-prabhakar (pk)
Quoted 41 lines · Prabhakar Kushwaha
Quoted 40 lines · Liu Yiding
Hi, Kushwaha.
Quoted 27 lines · Prabhakar Kushwaha
Hi All,
I am trying to understand
test_gsotest for IPv4 and IPv6 with following piece of code# listen on IPv*_DST, capture TCP into $TMPFILE if [ "${PROTO}" == "IPv4" ] ; then IP_DST=${IPv4_DST} ip netns exec ${NS3} bash -c \ "nc -4 -l -s ${IPv4_DST} -p 9000 > ${TMPFILE} &" elif [ "${PROTO}" == "IPv6" ] ; then IP_DST=${IPv6_DST} ip netns exec ${NS3} bash -c \ "nc -6 -l -s ${IPv6_DST} -p 9000 > ${TMPFILE} &" RET=$? else echo " test_gso: unknown PROTO: ${PROTO}" fiI have couple of queries around it
a) why -l is being used for reading listen on IPv*_DST with -s option.
I was looking at https://www.computerhope.com/unix/nc.htm, following has been mentioned:
-l : Used to specify that nc should listen for an incoming
connection rather than initiate a connection to a
remote host. It is an error to use this option in conjunction with the -p, -s, or -z options. Additionally, any timeouts specified with the -w option are ignored.Quoted 5 lines
b) Even if there is requirement of -l option to use. can we provide timeout option also. how? as -w dont work with -l.
I am facing an issue with Linux-5.3 Kselftest where even if
test_lwt_ip_encap.sh"exit",bpf/runner.shis not running next test case. It just wait until CRTL + c is pressed.I meet same issue. "make
run_tests-C bpf"bpf/runner.shhang ontest_lwt_ip_encap.sh. And when i skip it,
Quoted 7 lines
Quoted 3 lines
test_tc_tunnel.shalso has this problem.does this means, the problem is independent of "nc" and has no relation with nc usage with -l option.
has anyone find it's root-cause..
I think the root cause is related to kselftest/prefix.pl, you could try to kill process prefix.pl, then runner.sh will run next test.
Quoted 6 lines
-prabhakar (pk)
Signature · 2 lines
Best regards. Liu Yiding