fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/docker-playground/+/36372?usp=email )
Change subject: ttcn3-*-test: allow running tests with artificial link delay
......................................................................
ttcn3-*-test: allow running tests with artificial link delay
Change-Id: I4da3167ecda6ec5f27433da47d1a501180b37ca5
Related: OS#6411, OS#6375
---
M README.md
M common/ttcn3-docker-run.sh
M debian-bookworm-titan-master/Dockerfile
M debian-bookworm-titan/Dockerfile
M debian-bullseye-titan-master/Dockerfile
M debian-bullseye-titan/Dockerfile
6 files changed, 31 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/72/36372/1
diff --git a/README.md b/README.md
index 436fdd0..95ba200 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,18 @@
$ ./jenkins.sh
```
+### Running a testsuite with artificial link delay
+
+Below is an example of running ttcn3-bsc-test with a link delay of 30ms:
+
+```
+$ export DOCKER_ARGS="--cap-add=NET_ADMIN -e
'OSMO_TTCN3_NETEM_DELAY=30'"
+$ cd ttcn3-bsc-test
+$ ./jenkins.sh
+```
+
+FIXME: somehow, `--cap-add=NET_ADMIN` breaks tcpdump/dumpcap!
+
### More examples
latest (debian):
diff --git a/common/ttcn3-docker-run.sh b/common/ttcn3-docker-run.sh
index c8c871e..84bfc6c 100755
--- a/common/ttcn3-docker-run.sh
+++ b/common/ttcn3-docker-run.sh
@@ -31,6 +31,11 @@
done
fi
+if [ -n "$OSMO_TTCN3_NETEM_DELAY" ]; then
+ echo "Enabling netem delay (${OSMO_TTCN3_NETEM_DELAY}ms)"
+ tc qdisc add dev eth0 root netem delay ${OSMO_TTCN3_NETEM_DELAY}ms
+fi
+
cd /data
# Use TEST_NAME to only run one test instead of all. Set it like this:
diff --git a/debian-bookworm-titan-master/Dockerfile
b/debian-bookworm-titan-master/Dockerfile
index 2b0644a..161c933 100644
--- a/debian-bookworm-titan-master/Dockerfile
+++ b/debian-bookworm-titan-master/Dockerfile
@@ -20,6 +20,7 @@
build-essential \
ca-certificates \
git \
+ iproute2 \
iputils-ping \
netcat-openbsd \
procps \
diff --git a/debian-bookworm-titan/Dockerfile b/debian-bookworm-titan/Dockerfile
index fcc00ba..c4af2ef 100644
--- a/debian-bookworm-titan/Dockerfile
+++ b/debian-bookworm-titan/Dockerfile
@@ -21,6 +21,7 @@
ca-certificates \
ccache \
git \
+ iproute2 \
iputils-ping \
netcat-openbsd \
procps \
diff --git a/debian-bullseye-titan-master/Dockerfile
b/debian-bullseye-titan-master/Dockerfile
index a7ec65d..b364bd2 100644
--- a/debian-bullseye-titan-master/Dockerfile
+++ b/debian-bullseye-titan-master/Dockerfile
@@ -18,6 +18,7 @@
DEBIAN_FRONTEND='noninteractive' apt-get install -y --no-install-recommends
--no-install-suggests \
build-essential \
git \
+ iproute2 \
iputils-ping \
netcat-openbsd \
procps \
diff --git a/debian-bullseye-titan/Dockerfile b/debian-bullseye-titan/Dockerfile
index 2274cc4..75591d1 100644
--- a/debian-bullseye-titan/Dockerfile
+++ b/debian-bullseye-titan/Dockerfile
@@ -23,6 +23,7 @@
DEBIAN_FRONTEND='noninteractive' apt-get install -y --no-install-recommends
--no-install-suggests \
build-essential \
git \
+ iproute2 \
iputils-ping \
netcat-openbsd \
procps \
--
To view, visit
https://gerrit.osmocom.org/c/docker-playground/+/36372?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I4da3167ecda6ec5f27433da47d1a501180b37ca5
Gerrit-Change-Number: 36372
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange