* [kvm-unit-tests PATCH] scripts/arch-run: use ncat rather than nc.
@ 2020-09-21 10:36 Jamie Iles
2020-09-28 13:03 ` Thomas Huth
0 siblings, 1 reply; 2+ messages in thread
From: Jamie Iles @ 2020-09-21 10:36 UTC (permalink / raw)
To: kvm
On Red Hat 7+ and derived distributions, 'nc' is nmap-ncat, but on
Debian based distributions this is often netcat-openbsd. Both are
mostly compatible with the important distinction that netcat-openbsd
does not shutdown the socket on stdin EOF without also passing '-N' as
an argument which is not supported on nmap-ncat. This has the
unfortunate consequence of hanging qmp calls so tests like aarch64
its-migration never complete.
We're depending on ncat behaviour and nmap-ncat is available in all
major distributions.
Signed-off-by: Jamie Iles <jamie@nuviainc.com>
---
scripts/arch-run.bash | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 660f1b7acb93..5997e384019b 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -101,13 +101,13 @@ timeout_cmd ()
qmp ()
{
- echo '{ "execute": "qmp_capabilities" }{ "execute":' "$2" '}' | nc -U $1
+ echo '{ "execute": "qmp_capabilities" }{ "execute":' "$2" '}' | ncat -U $1
}
run_migration ()
{
- if ! command -v nc >/dev/null 2>&1; then
- echo "${FUNCNAME[0]} needs nc (netcat)" >&2
+ if ! command -v ncat >/dev/null 2>&1; then
+ echo "${FUNCNAME[0]} needs ncat (netcat)" >&2
return 2
fi
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [kvm-unit-tests PATCH] scripts/arch-run: use ncat rather than nc.
2020-09-21 10:36 [kvm-unit-tests PATCH] scripts/arch-run: use ncat rather than nc Jamie Iles
@ 2020-09-28 13:03 ` Thomas Huth
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Huth @ 2020-09-28 13:03 UTC (permalink / raw)
To: Jamie Iles, kvm; +Cc: Paolo Bonzini, Eric Auger, Andrew Jones, Laurent Vivier
On 21/09/2020 12.36, Jamie Iles wrote:
> On Red Hat 7+ and derived distributions, 'nc' is nmap-ncat, but on
> Debian based distributions this is often netcat-openbsd. Both are
> mostly compatible with the important distinction that netcat-openbsd
> does not shutdown the socket on stdin EOF without also passing '-N' as
> an argument which is not supported on nmap-ncat. This has the
> unfortunate consequence of hanging qmp calls so tests like aarch64
> its-migration never complete.
>
> We're depending on ncat behaviour and nmap-ncat is available in all
> major distributions.
>
> Signed-off-by: Jamie Iles <jamie@nuviainc.com>
> ---
> scripts/arch-run.bash | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
> index 660f1b7acb93..5997e384019b 100644
> --- a/scripts/arch-run.bash
> +++ b/scripts/arch-run.bash
> @@ -101,13 +101,13 @@ timeout_cmd ()
>
> qmp ()
> {
> - echo '{ "execute": "qmp_capabilities" }{ "execute":' "$2" '}' | nc -U $1
> + echo '{ "execute": "qmp_capabilities" }{ "execute":' "$2" '}' | ncat -U $1
> }
>
> run_migration ()
> {
> - if ! command -v nc >/dev/null 2>&1; then
> - echo "${FUNCNAME[0]} needs nc (netcat)" >&2
> + if ! command -v ncat >/dev/null 2>&1; then
> + echo "${FUNCNAME[0]} needs ncat (netcat)" >&2
> return 2
> fi
Sounds reasonable, and still seems to work fine with the sprs ppc64 test.
Tested-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-28 13:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 10:36 [kvm-unit-tests PATCH] scripts/arch-run: use ncat rather than nc Jamie Iles
2020-09-28 13:03 ` Thomas Huth
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).