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

skayser at users.sourceforge.net skayser at users.sourceforge.net
Fri Mar 20 12:44:28 CET 2009


Revision: 3839
          http://gar.svn.sourceforge.net/gar/?rev=3839&view=rev
Author:   skayser
Date:     2009-03-20 11:44:28 +0000 (Fri, 20 Mar 2009)

Log Message:
-----------
socat: tweaked test script, added CSW files

Modified Paths:
--------------
    csw/mgar/pkg/socat/trunk/Makefile
    csw/mgar/pkg/socat/trunk/checksums
    csw/mgar/pkg/socat/trunk/files/changelog.CSW

Added Paths:
-----------
    csw/mgar/pkg/socat/trunk/files/README.CSW
    csw/mgar/pkg/socat/trunk/files/patch-test.diff

Modified: csw/mgar/pkg/socat/trunk/Makefile
===================================================================
--- csw/mgar/pkg/socat/trunk/Makefile	2009-03-20 11:21:11 UTC (rev 3838)
+++ csw/mgar/pkg/socat/trunk/Makefile	2009-03-20 11:44:28 UTC (rev 3839)
@@ -15,25 +15,94 @@
 
 MASTER_SITES = http://www.dest-unreach.org/socat/download/
 DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
-DISTFILES += changelog.CSW
 
 SPKG_SOURCEURL = http://www.dest-unreach.org/socat/
 
+REQUIRED_PKGS = CSWosslrt CSWreadline CSWtcpwrap
+
 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
 
 # Disable gcc specific options
 PATCHFILES = cc_compile.patch
 
+# Fix some broken tests (pending to push some of it upstream)
+PATCHFILES += patch-test.diff
+
 CONFIGURE_ARGS = $(DIRPATHS)
 
-# 200+ 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
 TEST_SCRIPTS =
 
-EXTRA_EXCLUDE_FILES = $(bindir)/procan $(bindir)/filan
+# When you run the tests on a non IPV6 system you can set HAVENOT_IP6
+# to shortcut some tests
+#TEST_ENV="HAVENOT_IP6=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
+#
+# The 19 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
+#
+# test 234 TCP4LISTENENV: TCP4-LISTEN fills environment variables with socket addresses
+# test 239 UNIXLISTENENV: UNIX-LISTEN fills environment variables with socket addresses
+#
+# 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
+#
+#   EXTRA_CFLAGS = -D_XPG4_2 -D__EXTENSIONS__
+#
+# However, when compiling with these flags the above tests still fail.
+# Might well be that the ancillary data handling within socat is not
+# coded to work on Solaris.
+#
+# As a matter of fact, the socat man page even points out that some of
+# the address options related to ancillary data are restricted to
+# specific platforms (see IP4 and IP6 option groups).
+
+# Note to self: standards(5) says something like the following for XPG4v2
+#EXTRA_CFLAGS = -D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__
+#EXTRA_LDFLAGS = -lxnet
+
+# Individual tests can be run by changing to $(WORKSRC) and running
+#
+#   ./test.sh <TESTNAME>
+#
+# where TESTNAME is one of the uppercase testnames from above (for example PTMXWAITSLAVE).
+#
+
 include gar/category.mk
 
 # Run autoconf to re-evaulate the patched configure.in / Makefile.in
 pre-configure-modulated:
 	cd $(WORKSRC) && autoconf
 	 @$(MAKECOOKIE)
+
+post-install-modulated: DOCDEST=$(DESTDIR)$(docdir)/$(GARNAME)
+post-install-modulated: 
+	@ginstall -d $(DOCDEST)
+	@cp $(FILEDIR)/changelog.CSW $(FILEDIR)/README.CSW $(DOCDEST)
+	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/socat/trunk/checksums
===================================================================
--- csw/mgar/pkg/socat/trunk/checksums	2009-03-20 11:21:11 UTC (rev 3838)
+++ csw/mgar/pkg/socat/trunk/checksums	2009-03-20 11:44:28 UTC (rev 3839)
@@ -1,6 +1,3 @@
-5a6a1d1e398d5c4d32fa6515baf477af  download/socat-1.6.0.1.tar.gz
-301932abeb50285749feb22cf659ebfe  download/CSWsocat.gspec
-f824e7d56a8a1e8181fdf49842540b24  download/CSWsocat.depend
-27d6d97af6bb7cc2cb73f986e7826f1f  download/CSWsocat.prototype
-9f6dbf38c969bc9ad90807350be191d8  download/changelog.CSW
+82967132b5a8ca4d07e54370fdcb2662  download/socat-1.7.0.0.tar.gz
 06fac9e8c6e979e163630163238296d8  download/cc_compile.patch
+04ac1b9432d18d62d43a00e0f73d6449  download/patch-test.diff

Added: csw/mgar/pkg/socat/trunk/files/README.CSW
===================================================================
--- csw/mgar/pkg/socat/trunk/files/README.CSW	                        (rev 0)
+++ csw/mgar/pkg/socat/trunk/files/README.CSW	2009-03-20 11:44:28 UTC (rev 3839)
@@ -0,0 +1,8 @@
+Known issues
+------------
+Some of the IP4/IP6 socket options related to ancillary messages don't
+work with this build. This comprises ip-recvopts, ip-recvttl and alike
+and seems to be a known socat portability issue.
+
+See "IP4 and IP6 option groups" in the socat man page. Options marked as
+Linux and/or *BSD won't work.

Modified: csw/mgar/pkg/socat/trunk/files/changelog.CSW
===================================================================
--- csw/mgar/pkg/socat/trunk/files/changelog.CSW	2009-03-20 11:21:11 UTC (rev 3838)
+++ csw/mgar/pkg/socat/trunk/files/changelog.CSW	2009-03-20 11:44:28 UTC (rev 3839)
@@ -1,5 +1,5 @@
-socat (1.6.0.1,REV=20080407) unstable
+socat (1.7.0.0,REV=20090320)
 
   * Initial package.
 
- -- Yann Rouillard <yann.rouillard at jouy.inra.fr>  Mon, 07 Apr 2008 23:02:18 +0200
+ -- Sebastian Kayser <skayser at opencsw.org>  Fri, 20 Mar 2009 11:38:48 +0100

Added: csw/mgar/pkg/socat/trunk/files/patch-test.diff
===================================================================
--- csw/mgar/pkg/socat/trunk/files/patch-test.diff	                        (rev 0)
+++ csw/mgar/pkg/socat/trunk/files/patch-test.diff	2009-03-20 11:44:28 UTC (rev 3839)
@@ -0,0 +1,61 @@
+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
+@@ -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
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#! /opt/csw/bin/bash
+ # source: test.sh
+ # Copyright Gerhard Rieger 2001-2008
+ # 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 @@
+ 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))
++elif [ "$PF" = "IP6" ] && ( ! feat=$(testaddrs ip6) || ! 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"
+@@ -9051,6 +9058,11 @@
+ elif ! feat=$(testaddrs $FEAT); then
+     $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
++    $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 @@
+ 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))
++elif [ "$PF" = "IP6" ] && ( ! feat=$(testaddrs ip6) || ! 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"


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