[csw-devel] SF.net SVN: gar:[4792] csw/mgar/pkg/socat/trunk

skayser at users.sourceforge.net skayser at users.sourceforge.net
Sun May 10 17:31:54 CEST 2009


Revision: 4792
          http://gar.svn.sourceforge.net/gar/?rev=4792&view=rev
Author:   skayser
Date:     2009-05-10 15:31:54 +0000 (Sun, 10 May 2009)

Log Message:
-----------
socat: adjustments to test.sh for IPv6 tests on non-IPv6 systems

Modified Paths:
--------------
    csw/mgar/pkg/socat/trunk/Makefile
    csw/mgar/pkg/socat/trunk/checksums
    csw/mgar/pkg/socat/trunk/files/patch-test.diff

Added Paths:
-----------
    csw/mgar/pkg/socat/trunk/files/patch-sycls-utils.diff

Modified: csw/mgar/pkg/socat/trunk/Makefile
===================================================================
--- csw/mgar/pkg/socat/trunk/Makefile	2009-05-10 15:07:05 UTC (rev 4791)
+++ csw/mgar/pkg/socat/trunk/Makefile	2009-05-10 15:31:54 UTC (rev 4792)
@@ -4,13 +4,13 @@
 
 DESCRIPTION = Multipurpose relay for bidirectional data transfer
 define BLURB
-	socat is a relay for bidirectional data transfer between two independent
-	data channels. Each of these data channels may be a file, pipe, device
-	(serial line etc. or a pseudo terminal), a socket (UNIX, IP4, IP6 - raw,
-	UDP, TCP), an SSL socket, proxy CONNECT connection, a file descriptor
-	(stdin etc.), the GNU line editor (readline), a program, or a
-	combination of two of these.  These modes include generation of
-	"listening" sockets, named pipes, and pseudo terminals.
+  socat is a relay for bidirectional data transfer between two independent
+  data channels. Each of these data channels may be a file, pipe, device
+  (serial line etc. or a pseudo terminal), a socket (UNIX, IP4, IP6 - raw,
+  UDP, TCP), an SSL socket, proxy CONNECT connection, a file descriptor
+  (stdin etc.), the GNU line editor (readline), a program, or a
+  combination of two of these.  These modes include generation of
+  "listening" sockets, named pipes, and pseudo terminals.
 endef
 
 MASTER_SITES = http://www.dest-unreach.org/socat/download/
@@ -28,51 +28,44 @@
 PATCHFILES += patch-configure-netinetip.diff
 # Fix some broken tests (pending to push some of it upstream)
 PATCHFILES += patch-test.diff
+# Include utils.h in sycls.c so that setenv() is declared
+PATCHFILES += patch-sycls-utils.diff
 
 CONFIGURE_ARGS = $(DIRPATHS)
 
-# 250+ tests take a while. Run them manually when packaging a new version
+# 250+ tests take a while. Run them manually when packaging a new version.
+# To do so, change to $(WORKSRC) after building and execute ./test.sh
 TEST_SCRIPTS =
 
 # When you run the tests on a non IPV6 system you can set HAVENOT_IP6
 # to shortcut some tests
 #TEST_ENV="HAVENOT_IP6=1"
 
+# socat 1.7.1.1: 
+# --------------
 # Running test.sh on a non IPV6 system as root i get:
 #
-#   summary: 276 tests; 149 ok, 19 failed, 107 could not be performed
+#   summary: 282 tests; 145 ok, 8 failed, 129 could not be performed
 #
-# The 19 FAILED ones are
+# The 8 FAILED ones are
 #
-# test 123 PTMXWAITSLAVE: test if master pty (ptmx) waits for slave connection
-# test 208 UDP4SCM_IP_OPTIONS: UDP4 log ancillary message IP_OPTIONS options
-# test 210 UDP4SCM_IP_TTL: UDP4 log ancillary message IP_TTL ttl
-# test 215 UDP4SCM_IP_RECVIF: UDP4 log ancillary message IP_RECVIF if
-# test 216 UDP4SCM_IP_RECVDSTADDR: UDP4 log ancillary message IP_RECVDSTADDR dstaddr
-# test 217 IP4SCM_IP_OPTIONS: IP4 log ancillary message IP_OPTIONS options
-# test 219 IP4SCM_IP_TTL: IP4 log ancillary message IP_TTL ttl
-# test 224 IP4SCM_IP_RECVIF: IP4 log ancillary message IP_RECVIF if
-# test 225 IP4SCM_IP_RECVDSTADDR: IP4 log ancillary message IP_RECVDSTADDR dstaddr
+# 126 PTMXWAITSLAVE: test if master pty (ptmx) waits for slave connection
+# 214 UDP4SCM_IP_OPTIONS: UDP4 log ancillary message IP_OPTIONS options
+# 221 UDP4SCM_IP_RECVIF: UDP4 log ancillary message IP_RECVIF if
+# 222 UDP4SCM_IP_RECVDSTADDR: UDP4 log ancillary message IP_RECVDSTADDR dstaddr
+# 246 UDP4ENV_IP_OPTIONS: UDP4 ancillary message brings IP_OPTIONS into env
+# 248 UDP4ENV_IP_TTL: UDP4 ancillary message brings IP_TTL into environment
+# 253 UDP4ENV_IP_IF: UDP4 ancillary message brings IP_IF into environment
+# 254 UDP4ENV_IP_DSTADDR: UDP4 ancillary message brings IP_DSTADDR into env
 #
-# test 234 TCP4LISTENENV: TCP4-LISTEN fills environment variables with socket addresses
-# test 239 UNIXLISTENENV: UNIX-LISTEN fills environment variables with socket addresses
+# Most of them (all of them?) relate to ancillary data. Seems as if there are
+# two competing socket libraries on Solaris: 3SOCKET and 3XNET, where only the
+# latter handles ancillary data.
 #
-# test 240 UDP4ENV_IP_OPTIONS: UDP4 ancillary message brings IP_OPTIONS into environment
-# test 242 UDP4ENV_IP_TTL: UDP4 ancillary message brings IP_TTL into environment
-# test 247 UDP4ENV_IP_IF: UDP4 ancillary message brings IP_IF into environment
-# test 248 UDP4ENV_IP_DSTADDR: UDP4 ancillary message brings IP_DSTADDR into environment
-# test 249 IP4ENV_IP_OPTIONS: IP4 ancillary message brings IP_OPTIONS into environment
-# test 251 IP4ENV_IP_TTL: IP4 ancillary message brings IP_TTL into environment
-# test 256 IP4ENV_IP_IF: IP4 ancillary message brings IP_IF into environment
-# test 257 IP4ENV_IP_DSTADDR: IP4 ancillary message brings IP_DSTADDR into environment
-#
-# Most of them (all of them?) relate to ancillary data. Seems as if there are two
-# competing socket libraries on Solaris: 3SOCKET and 3XNET, where only the latter
-# handles ancillary data.
-#
 # http://www.mail-archive.com/networking-discuss@opensolaris.org/msg01146.html
 #
-# 3XNET is only defined when using SUS/XPG4v2 feature macros. socat README suggests
+# 3XNET is only defined when using SUS/XPG4v2 feature macros. socat README 
+# suggests
 #
 #   EXTRA_CFLAGS = -D_XPG4_2 -D__EXTENSIONS__
 #
@@ -92,8 +85,8 @@
 #
 #   ./test.sh <TESTNAME>
 #
-# where TESTNAME is one of the uppercase testnames from above (for example PTMXWAITSLAVE).
-#
+# where TESTNAME is one of the uppercase testnames from above 
+# (for example PTMXWAITSLAVE).
 
 include gar/category.mk
 

Modified: csw/mgar/pkg/socat/trunk/checksums
===================================================================
--- csw/mgar/pkg/socat/trunk/checksums	2009-05-10 15:07:05 UTC (rev 4791)
+++ csw/mgar/pkg/socat/trunk/checksums	2009-05-10 15:31:54 UTC (rev 4792)
@@ -1,4 +1,5 @@
 a3a68cabdfd9145aa6570fc4777be45c  download/cc_compile.patch
 76ce5e07c1b8925b33e664accefa1923  download/patch-configure-netinetip.diff
-0f34e654b9a652278fa2fd1b36d51469  download/patch-test.diff
+b6863876e1e8deac45015662f04cb683  download/patch-sycls-utils.diff
+f8d2e302f66b98b5e2236dee155d32be  download/patch-test.diff
 52b0216607e35bdfba247560fb85dd82  download/socat-1.7.1.1.tar.gz

Added: csw/mgar/pkg/socat/trunk/files/patch-sycls-utils.diff
===================================================================
--- csw/mgar/pkg/socat/trunk/files/patch-sycls-utils.diff	                        (rev 0)
+++ csw/mgar/pkg/socat/trunk/files/patch-sycls-utils.diff	2009-05-10 15:31:54 UTC (rev 4792)
@@ -0,0 +1,10 @@
+--- socat-1.7.1.1.orig/sycls.c	2009-05-10 16:55:51.012555282 +0200
++++ socat-1.7.1.1/sycls.c	2009-05-10 16:56:21.819201100 +0200
+@@ -18,6 +18,7 @@
+ 
+ #include "error.h"
+ #include "filan.h"
++#include "utils.h"
+ #include "sysutils.h"
+ #include "sycls.h"
+ 

Modified: csw/mgar/pkg/socat/trunk/files/patch-test.diff
===================================================================
--- csw/mgar/pkg/socat/trunk/files/patch-test.diff	2009-05-10 15:07:05 UTC (rev 4791)
+++ csw/mgar/pkg/socat/trunk/files/patch-test.diff	2009-05-10 15:31:54 UTC (rev 4792)
@@ -1,33 +1,34 @@
-diff --speed-large-files --minimal -Nru socat-1.7.0.0.orig/readline-test.sh socat-1.7.0.0/readline-test.sh
---- socat-1.7.0.0.orig/readline-test.sh	2008-09-22 22:33:30.000000000 +0200
-+++ socat-1.7.0.0/readline-test.sh	2009-03-19 20:57:41.847390097 +0100
+diff -ur socat-1.7.1.1.orig/readline-test.sh socat-1.7.1.1/readline-test.sh
+--- socat-1.7.1.1.orig/readline-test.sh	2009-04-02 09:32:48.000000000 +0200
++++ socat-1.7.1.1/readline-test.sh	2009-05-10 16:36:54.125213675 +0200
 @@ -1,4 +1,4 @@
 -#! /bin/bash
 +#! /opt/csw/bin/bash
  # source: readline-test.sh
  # Copyright Gerhard Rieger 2003-2008
  # Published under the GNU General Public License V.2, see file COPYING
-diff --speed-large-files --minimal -Nru socat-1.7.0.0.orig/test.sh socat-1.7.0.0/test.sh
---- socat-1.7.0.0.orig/test.sh	2008-10-14 19:16:32.000000000 +0200
-+++ socat-1.7.0.0/test.sh	2009-03-19 20:57:29.843380940 +0100
+diff -ur socat-1.7.1.1.orig/test.sh socat-1.7.1.1/test.sh
+--- socat-1.7.1.1.orig/test.sh	2009-04-02 17:11:28.000000000 +0200
++++ socat-1.7.1.1/test.sh	2009-05-10 16:36:54.011852555 +0200
 @@ -1,4 +1,4 @@
 -#! /bin/bash
 +#! /opt/csw/bin/bash
  # source: test.sh
- # Copyright Gerhard Rieger 2001-2008
+ # Copyright Gerhard Rieger 2001-2009
  # Published under the GNU General Public License V.2, see file COPYING
-@@ -11,6 +11,10 @@
- 
- #set -vx
- 
-+# /usr/bin/tr doesn't handle the a-z range syntax (needs [a-z]) which
-+# is used throughout this script
-+alias tr=/usr/xpg4/bin/tr
-+
- val_t=0.1
- NUMCOND=true
- #NUMCOND="test \$N -gt 70"
-@@ -8931,6 +8935,9 @@
+@@ -97,6 +97,11 @@
+     chmod a+x cat.sh
+     CAT=./cat.sh
+     ;;
++SunOS)
++    # /usr/bin/tr doesn't handle the a-z range syntax (needs [a-z]), use
++    # /usr/xpg4/bin/tr instead
++    alias tr=/usr/xpg4/bin/tr
++    ;;
+ *)
+     CAT=cat
+     ;;
+@@ -9059,6 +9064,9 @@
  elif [ "$ROOT" = root -a $(id -u) -ne 0 -a "$withroot" -eq 0 ]; then
      $PRINTF "test $F_n $TEST... ${YELLOW}must be root${NORMAL}\n" $N
      numCANT=$((numCANT+1))
@@ -37,19 +38,18 @@
  else
  tf="$td/test$N.stdout"
  te="$td/test$N.stderr"
-@@ -9051,6 +9058,11 @@
+@@ -9179,6 +9187,10 @@
  elif ! feat=$(testaddrs $FEAT); then
-     $PRINTF "test $F_n $TEST... ${YELLOW}$(echo $feat |tr a-z A-Z) not available${NORMAL}\n" $N
+     $PRINTF "test $F_n $TEST... ${YELLOW}$(echo "$feat" |tr a-z A-Z) not available${NORMAL}\n" $N
      numCANT=$((numCANT+1))
-+
 +elif [ "$KEYW" = "TCP6" -o "$KEYW" = "UDP6" -o "$KEYW" = "SCTP6" ] && \
-+    ( ! feat=$(testaddrs ip6) || ! runsip6 >/dev/null ); then
++    ! runsip6 >/dev/null; then
 +    $PRINTF "test $F_n $TEST... ${YELLOW}IP6 not available${NORMAL}\n" $N
 +    numCANT=$((numCANT+1))
  else
  tf="$td/test$N.stdout"
  te="$td/test$N.stderr"
-@@ -9146,6 +9158,9 @@
+@@ -9274,6 +9286,9 @@
  elif [ "$ROOT" = root -a $(id -u) -ne 0 -a "$withroot" -eq 0 ]; then
      $PRINTF "test $F_n $TEST... ${YELLOW}must be root${NORMAL}\n" $N
      numCANT=$((numCANT+1))
@@ -59,3 +59,16 @@
  else
  tf="$td/test$N.stdout"
  te="$td/test$N.stderr"
+@@ -9427,7 +9442,11 @@
+ case "$TESTS" in
+ *%functions%*|*%generic%*|*%tcp6%*|*%socket%*|*%$NAME%*)
+ TEST="$NAME: socket connect with TCP/IPv6"
+-if ! eval $NUMCOND; then :; else
++if ! eval $NUMCOND; then :;
++elif ! testaddrs tcp ip6 >/dev/null || ! runsip6 >/dev/null; then
++    $PRINTF "test $F_n $TEST... ${YELLOW}TCP6 not available${NORMAL}\n" $N
++    numCANT=$((numCANT+1))
++else
+ # start a TCP6-LISTEN process that echoes data, and send test data using
+ # SOCKET-CONNECT, selecting TCP/IPv6. The sent data should be returned.
+ tf="$td/test$N.stdout"


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list