public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Subject: Re: [PATCH 1/5] tests: Use more explicit netcat options for distro/fedora tests
Date: Tue, 14 Jun 2022 16:10:48 +0200	[thread overview]
Message-ID: <20220614161048.251abe01@elisabeth> (raw)
In-Reply-To: <20220610023245.845652-2-david@gibson.dropbear.id.au>

[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]

On Fri, 10 Jun 2022 12:32:41 +1000
David Gibson <david(a)gibson.dropbear.id.au> wrote:

> distro/fedora contains two versions of the basic tests, used for different
> Fedora versions.  One uses explicit listening address for netcat in some
> extra places, the other does not.  Apparently the older netcat versions
> didn't require the explicit addresses.  Not supplying addresses doesn't
> test anything useful though, just a detail in netcat's behaviour.  So,
> it's cleaner to just always supply explicit addresses.
> 
> In addition, we're explicitly expecting the nmap version of ncat, also
> known as "ncat".  So, it's more explicit what we're after if we invoke it
> via that name rather than "nc", which will go via an /etc/alternatives
> link.
> 
> Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au>
> ---
>  test/distro/fedora | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/test/distro/fedora b/test/distro/fedora
> index f2f8f27..b7f1e3b 100644
> --- a/test/distro/fedora
> +++ b/test/distro/fedora
> @@ -16,13 +16,13 @@ htools	wget virt-edit guestfish head sed cat kill
>  
>  # Quick pasta test: send message from init to ns, and from ns to init
>  def	distro_quick_pasta_test
> -host	(nc -6 -l -p 10000 > /tmp/init_msg; echo "from_init" | nc ::1 9999) &
> +host	(ncat -6 -l -p 10000 ::1 > /tmp/init_msg; echo "from_init" | ncat ::1 9999) &

This doesn't work:

  $ ncat -6 -l -p 9999 ::1 > /tmp/ns_msg &
  [1] 21
  $ Ncat: bind to ::1:31337: Address already in use. QUITTING.

because with ncat(1) '-p' doesn't specify the listening port -- I see that
you changed this to the right version for tests under 'pasta/', that works
fine. I fixed this up (together with the other occurrences), re-running
tests now, I can merge the fix-up directly.

-- 
Stefano


  reply	other threads:[~2022-06-14 14:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10  2:32 [PATCH 0/5] More test fixes for Fedora host David Gibson
2022-06-10  2:32 ` [PATCH 1/5] tests: Use more explicit netcat options for distro/fedora tests David Gibson
2022-06-14 14:10   ` Stefano Brivio [this message]
2022-06-15  0:35     ` David Gibson
2022-06-10  2:32 ` [PATCH 2/5] Don't abbreviate ip(8) arguments in examples and tests David Gibson
2022-06-10  2:32 ` [PATCH 3/5] Tweak dhclient arguments for readability David Gibson
2022-06-10  2:32 ` [PATCH 4/5] Use dhclient instead of udhcpc David Gibson
2022-06-14  1:32   ` Stefano Brivio
2022-06-14  2:47     ` David Gibson
2022-06-10  2:32 ` [PATCH 5/5] tests: Use nmap-ncat instead of openbsd netcat for pasta tests David Gibson
2022-06-18  7:03   ` Stefano Brivio
2022-06-14  1:32 ` [PATCH 0/5] More test fixes for Fedora host Stefano Brivio

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=20220614161048.251abe01@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=passt-dev@passt.top \
    /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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).