Add tests for the fsck command.
[tinc] / test / compression.test
index 0572e48..7c69c2c 100755 (executable)
@@ -2,7 +2,7 @@
 
 . ./testlib.sh
 
-test "$(id -u)" = "0" || exit $EXIT_SKIP_TEST
+require_root "$0" "$@"
 test -e /dev/net/tun || exit $EXIT_SKIP_TEST
 ip netns list || exit $EXIT_SKIP_TEST
 command -v socat || exit $EXIT_SKIP_TEST
@@ -110,8 +110,9 @@ for level in $levels; do
     socat -u TCP4-LISTEN:$recv_port_foo,reuseaddr OPEN:"$tmp_file",creat &
 
   ip netns exec bar \
-    socat -u OPEN:"$ref_file" TCP4:$ip_foo:$recv_port_foo,retry=30
+    socat -u OPEN:"$ref_file" TCP4:$ip_foo:$recv_port_foo,retry=30 &
 
+  wait
   diff -w "$ref_file" "$tmp_file"
 
   tinc foo stop