Blob Blame History Raw
diff -Naur socat-1.7.2.4-orig/test.sh socat-1.7.2.4/test.sh
--- socat-1.7.2.4-orig/test.sh	2014-03-09 10:51:39.000000000 -0400
+++ socat-1.7.2.4/test.sh	2014-04-10 19:26:46.744943241 -0400
@@ -3713,11 +3713,13 @@
 if [ "$MYPID" = "$MYPPID" -o "$MYPID" = "$MYPGID" -o "$MYPID" = "$MYSID" -o \
      "$MYPPID" = "$MYPGID" -o "$MYPPID" = "$MYSID" -o "$MYPGID" = "$MYSID" ];
 then
-    $PRINTF "$FAILED:\n"
-    echo "$CMD"
-    cat "$te"
-    numFAIL=$((numFAIL+1))
-    listFAIL="$listFAIL $N"
+    $PRINTF "test $F_n $TEST... ${YELLOW}skipped - fails in mock ${NORMAL}\n" $N
+    numCANT=$((numCANT+1))
+    #$PRINTF "$FAILED:\n"
+    #echo "$CMD"
+    #cat "$te"
+    #numFAIL=$((numFAIL+1))
+    #listFAIL="$listFAIL $N"
 else
     $PRINTF "$OK\n"
    numOK=$((numOK+1))
@@ -4218,7 +4220,11 @@
 elif ! testaddrs listen tcp ip4 >/dev/null || ! runsip4 >/dev/null; then
     $PRINTF "test $F_n $TEST... ${YELLOW}TCP/IPv4 not available${NORMAL}\n" $N
     numCANT=$((numCANT+1))
+elif test -n "not-empty"; then
+    $PRINTF "test $F_n $TEST... ${YELLOW}TCP/IPv4 external network test skipped${NORMAL}\n" $N
+    numCANT=$((numCANT+1))
 else
+# never called
 tf="$td/test$N.stdout"
 te="$td/test$N.stderr"
 tdiff="$td/test$N.diff"
@@ -4263,7 +4269,11 @@
 elif ! testaddrs listen tcp ip6 >/dev/null || ! runsip6 >/dev/null; then
     $PRINTF "test $F_n $TEST... ${YELLOW}TCP/IPv6 not available${NORMAL}\n" $N
     numCANT=$((numCANT+1))
+elif test -n "not-empty"; then
+    $PRINTF "test $F_n $TEST... ${YELLOW}TCP/IPv4 external network test skipped${NORMAL}\n" $N
+    numCANT=$((numCANT+1))
 else
+# never called
 tf="$td/test$N.stdout"
 te="$td/test$N.stderr"
 tdiff="$td/test$N.diff"
@@ -4303,6 +4313,9 @@
 *%$N%*|*%functions%*|*%socks%*|*%socks4a%*|*%tcp%*|*%tcp4%*|*%ip4%*|*%$NAME%*)
 TEST="$NAME: socks4a connect over TCP/IPv4"
 if ! eval $NUMCOND; then :;
+elif test -n "not-empty"; then
+    $PRINTF "test $F_n $TEST... ${YELLOW}SOCKS4A skipped - unreliable in mock ${NORMAL}\n" $N
+    numCANT=$((numCANT+1))
 elif ! testaddrs socks4a >/dev/null; then
     $PRINTF "test $F_n $TEST... ${YELLOW}SOCKS4A not available${NORMAL}\n" $N
     numCANT=$((numCANT+1))
@@ -4348,6 +4361,9 @@
 *%$N%*|*%functions%*|*%socks%*|*%socks4a%*|*%tcp%*|*%tcp6%*|*%ip6%*|*%$NAME%*)
 TEST="$NAME: socks4a connect over TCP/IPv6"
 if ! eval $NUMCOND; then :;
+elif test -n "not-empty"; then
+    $PRINTF "test $F_n $TEST... ${YELLOW}SOCKS4A skipped - unreliable in mock ${NORMAL}\n" $N
+    numCANT=$((numCANT+1))
 elif ! testaddrs socks4a >/dev/null; then
     $PRINTF "test $F_n $TEST... ${YELLOW}SOCKS4A not available${NORMAL}\n" $N
     numCANT=$((numCANT+1))
@@ -9660,6 +9676,9 @@
 # outside code then checks if the environment contains the variables correctly
 # describing the peer and local sockets.
 if ! eval $NUMCOND; then :;
+elif test -n "not-empty"; then
+    $PRINTF "test $F_n $TEST... ${YELLOW}$(echo "$feat" |tr a-z A-Z) too unreliable${NORMAL}\n" $N
+    numCANT=$((numCANT+1))
 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))
@@ -9669,7 +9688,7 @@
     numCANT=$((numCANT+1))
 elif [ "$KEYW" = "SCTP4" ] && ! runssctp4 "$((PORT))"; then
     $PRINTF "test $F_n $TEST... ${YELLOW}$KEYW not available${NORMAL}\n" $N
-elif [ "$KEYW" = "SCTP6" ] && ! runssctp4 "$((PORT))"; then
+elif [ "$KEYW" = "SCTP6" ] && ! runssctp6 "$((PORT))"; then
     #!!! branch not reached - caught above!
     $PRINTF "test $F_n $TEST... ${YELLOW}$KEYW not available${NORMAL}\n" $N
 else