UML trouble
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
--- /dev/null
+#!/bin/bash
+set -ex
+
+# expects to be run inside the uml
+
+fail () { echo >&2 "$0: fail: $*"; exit 1; }
+
+tname="${0#**/t-}"
+case "$tname" in
+.* | */* | '') fail "bad tname $tname" ;;#
+esac
+
+test="${0%/*}"
+
+tmp=tmp/$tname
+rm -rf "$tmp"
+mkdir -p $tmp
+
+$test/netns-setup "$tname"
+$test/run-server "$tname" & spid=$!
+$test/run-client "$tname" & cpid=$1
+
+$test/netns-run-client "$tname" -- ping -c 10 192.0.2.1 >$tmp/ping
+grep ' 0% packet loss' $tmp/ping
--- /dev/null
+#!/bin/sh
+set -e
+set -x
+
+uml="${0%/*}"/psusan-uml
+
+if timeout --foreground 5 $uml-run true; then :
+else
+ $uml-setup 2>&1 |ts >tmp/uml-setup &
+ sleep 5
+ timeout --foreground 5 $uml-run true ||:
+ timeout --foreground 5 $uml-run true
+fi
+
+echo hi