GNU netcat in make tests

Corinna Vinschen vinschen at redhat.com
Fri Jul 25 18:33:57 EST 2014


On Jul 25 08:28, Christian Hesse wrote:
> Damien Miller <djm at mindrot.org> on Fri, 2014/07/25 09:02:
> > On Thu, 24 Jul 2014, Damien Miller wrote:
> > 
> > > In the meantime, maybe we could avoid the use of GNU netcat althother
> > > by using a ssh-agent's socket in the tests...
> > 
> > I got halfway through implementing this before realising that it is
> > insufficient - we need to tests UNIX domain socket to TCP forwarding
> > and ssh-add/agent can't do this.
> 
> Perhaps we should rely on OpenBSD netcat and skip tests if GNU netcat is
> found. Something like this?
> 
> From 9e3fb5105317a4d64ea3d7285f86fa66af623761 Mon Sep 17 00:00:00 2001
> From: Christian Hesse <mail at eworm.de>
> Date: Fri, 25 Jul 2014 08:26:17 +0200
> Subject: [PATCH 1/1] skip multiplex.sh if nc does not support UNIX domain
>  sockets
> 
> ---
>  regress/multiplex.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/regress/multiplex.sh b/regress/multiplex.sh
> index 693211b..45480eb 100644
> --- a/regress/multiplex.sh
> +++ b/regress/multiplex.sh
> @@ -6,7 +6,10 @@ CTL=/tmp/openssh.regress.ctl-sock.$$
>  tid="connection multiplexing"
>  
>  if have_prog nc ; then
> -	if nc -h 2>&1 | grep -- -N >/dev/null; then
> +	if nc -h 2>&1 | grep -- -U >/dev/null; then
> +		echo "skipped (netcat does not support UNIX domain sockets)"
> +		exit 0
> +	else if nc -h 2>&1 | grep -- -N >/dev/null; then
>  		NC="nc -N";

That would skip all netcat's which implement -U.  Like OpenBSD netcat as
used on Cygwin, or the ncat tool from http://nmap.org/ as used on
Fedora, both of which provide -U for AF_UNIX sockets.

That was not really what you want, right?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20140725/571336e2/attachment.bin>


More information about the openssh-unix-dev mailing list