linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prabhakar Kushwaha <prabhakar.pkin@gmail.com>
To: linux-kselftest@vger.kernel.org
Subject: kseltest: bpf: test_lwt_ip_encap.sh: Why -l used in test_gso
Date: Sun, 13 Oct 2019 07:29:32 +0530	[thread overview]
Message-ID: <731bcbd4-0e01-245a-8f8d-bec8024868ca@gmail.com> (raw)

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}"
	fi

I 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)

             reply	other threads:[~2019-10-13  1:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-13  1:59 Prabhakar Kushwaha [this message]
2019-10-14  6:34 ` kseltest: bpf: test_lwt_ip_encap.sh: Why -l used in test_gso Liu Yiding
2019-10-14 14:29   ` Prabhakar Kushwaha
2019-10-15  3:43     ` Liu Yiding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=731bcbd4-0e01-245a-8f8d-bec8024868ca@gmail.com \
    --to=prabhakar.pkin@gmail.com \
    --cc=linux-kselftest@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).