|
|
5f4e7f |
From f41fcb93de47ddf2ec5063be1df29e99cafc61c0 Mon Sep 17 00:00:00 2001
|
|
|
5f4e7f |
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
|
|
5f4e7f |
Date: Wed, 11 Oct 2017 23:04:50 +0200
|
|
|
5f4e7f |
Subject: [PATCH 1/2] Do not fail if two tests run on the same machine.
|
|
|
5f4e7f |
Randomize outgoing port too.
|
|
|
5f4e7f |
|
|
|
5f4e7f |
---
|
|
|
5f4e7f |
testdata/fwd_oneport.tdir/fwd_oneport.conf | 2 +-
|
|
|
5f4e7f |
testdata/fwd_oneport.tdir/fwd_oneport.pre | 7 +++++--
|
|
|
5f4e7f |
2 files changed, 6 insertions(+), 3 deletions(-)
|
|
|
5f4e7f |
|
|
|
5f4e7f |
diff --git a/testdata/fwd_oneport.tdir/fwd_oneport.conf b/testdata/fwd_oneport.tdir/fwd_oneport.conf
|
|
|
5f4e7f |
index f3427fe..76cade4 100644
|
|
|
5f4e7f |
--- a/testdata/fwd_oneport.tdir/fwd_oneport.conf
|
|
|
5f4e7f |
+++ b/testdata/fwd_oneport.tdir/fwd_oneport.conf
|
|
|
5f4e7f |
@@ -5,7 +5,7 @@ server:
|
|
|
5f4e7f |
port: @PORT@
|
|
|
5f4e7f |
outgoing-range: 2
|
|
|
5f4e7f |
outgoing-port-avoid: 0-65535
|
|
|
5f4e7f |
- outgoing-port-permit: 20675
|
|
|
5f4e7f |
+ outgoing-port-permit: @OUTPORT@
|
|
|
5f4e7f |
directory: ""
|
|
|
5f4e7f |
pidfile: "unbound.pid"
|
|
|
5f4e7f |
chroot: ""
|
|
|
5f4e7f |
diff --git a/testdata/fwd_oneport.tdir/fwd_oneport.pre b/testdata/fwd_oneport.tdir/fwd_oneport.pre
|
|
|
5f4e7f |
index eeb5238..256d8dc 100644
|
|
|
5f4e7f |
--- a/testdata/fwd_oneport.tdir/fwd_oneport.pre
|
|
|
5f4e7f |
+++ b/testdata/fwd_oneport.tdir/fwd_oneport.pre
|
|
|
5f4e7f |
@@ -5,11 +5,13 @@
|
|
|
5f4e7f |
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
|
|
5f4e7f |
|
|
|
5f4e7f |
. ../common.sh
|
|
|
5f4e7f |
-get_random_port 2
|
|
|
5f4e7f |
+get_random_port 3
|
|
|
5f4e7f |
UNBOUND_PORT=$RND_PORT
|
|
|
5f4e7f |
FWD_PORT=$(($RND_PORT + 1))
|
|
|
5f4e7f |
+OUT_PORT=$(($RND_PORT + 2))
|
|
|
5f4e7f |
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
|
|
|
5f4e7f |
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
|
|
|
5f4e7f |
+echo "OUT_PORT=$OUT_PORT" >> .tpkg.var.test
|
|
|
5f4e7f |
|
|
|
5f4e7f |
# start forwarder
|
|
|
5f4e7f |
get_ldns_testns
|
|
|
5f4e7f |
@@ -18,7 +20,8 @@ FWD_PID=$!
|
|
|
5f4e7f |
echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
|
|
|
5f4e7f |
|
|
|
5f4e7f |
# make config file
|
|
|
5f4e7f |
-sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$FWD_PORT'/' < fwd_oneport.conf > ub.conf
|
|
|
5f4e7f |
+sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$FWD_PORT'/' -e 's/@OUTPORT\@/'$OUT_PORT'/' < fwd_oneport.conf > ub.conf
|
|
|
5f4e7f |
+
|
|
|
5f4e7f |
# start unbound in the background
|
|
|
5f4e7f |
PRE="../.."
|
|
|
5f4e7f |
$PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
|
|
|
5f4e7f |
--
|
|
|
5f4e7f |
2.9.5
|
|
|
5f4e7f |
|