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 5/5] tests: Use nmap-ncat instead of openbsd netcat for pasta tests
Date: Sat, 18 Jun 2022 09:03:00 +0200	[thread overview]
Message-ID: <20220618090300.221406ec@elisabeth> (raw)
In-Reply-To: <20220610023245.845652-6-david@gibson.dropbear.id.au>

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

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

> A number of the testcases use options specific the OpenBSD version of
> netcat.  That's available in Debian, but not easily available in Fedora.
> Switch the pasta tests to using the nmap version of netcat (a.k.a. ncat).
> This is easily available in both Debian and Fedora, and appears to be a
> bit more modern and maintained as well.
> 
> ncat generally requires explicit listen addresses (which is good for
> clarity anywhere).  Its default options appear to remove the need for the
> -N and -q options.
> 
> Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au>
> ---
>  test/README.md  |  2 +-
>  test/demo/pasta | 12 ++++++------
>  test/tcp/pasta  | 52 ++++++++++++++++++++++++-------------------------
>  test/udp/pasta  | 29 ++++++++++++++-------------
>  4 files changed, 48 insertions(+), 47 deletions(-)
> 
> diff --git a/test/README.md b/test/README.md
> index 362690c..201332b 100644
> --- a/test/README.md
> +++ b/test/README.md
> @@ -29,7 +29,7 @@ on a system, i.e. common utilities such as a shell are not included here.
>  Example for Debian, and possibly most Debian-based distributions:
>  
>      build-essential git jq strace iperf3 qemu-system-x86 tmux sipcalc bc
> -    clang-tidy cppcheck isc-dhcp-common psmisc linux-cpupower
> +    clang-tidy cppcheck isc-dhcp-common psmisc linux-cpupower ncat
>      netcat-openbsd fakeroot lz4 lm-sensors qemu-system-arm qemu-system-ppc
>      qemu-system-misc qemu-system-x86 valgrind
>  
> diff --git a/test/demo/pasta b/test/demo/pasta
> index e2517ed..de1bdc5 100644
> --- a/test/demo/pasta
> +++ b/test/demo/pasta
> @@ -100,9 +100,9 @@ nl
>  say	  pasta detects bound ports and forwards them.
>  sleep	3
>  
> -nsb	nc -6 -l -p 31337
> +nsb	ncat -6 -l ::1 31337
>  sleep	2
> -host	echo "Hello from the host" | nc -N ::1 31337
> +host	echo "Hello from the host" | ncat ::1 31337
>  sleep	5
>  
>  nl
> @@ -111,9 +111,9 @@ say	Now the other way around...
>  nl
>  say	  we can use a loopback address
>  sleep	2
> -hostb	nc -l -p 31337
> +hostb	ncat -l ::1 31337
>  sleep	2
> -ns	echo "Hello from the namespace" | nc -N 127.0.0.1 31337
> +ns	echo "Hello from the namespace" | ncat 127.0.0.1 31337

...changing this to ::1. :)

-- 
Stefano


  reply	other threads:[~2022-06-18  7:03 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
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 [this message]
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=20220618090300.221406ec@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).