Create test environment
This commit is contained in:
parent
847d327d58
commit
dc2e851655
|
@ -4,4 +4,5 @@ target
|
||||||
*~
|
*~
|
||||||
*\#
|
*\#
|
||||||
3700send
|
3700send
|
||||||
3700recv
|
3700recv
|
||||||
|
.netsim
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
profile = "default"
|
||||||
|
version = "12"
|
||||||
|
|
||||||
|
[overrides]
|
8
Makefile
8
Makefile
|
@ -25,3 +25,11 @@ t: test
|
||||||
rustup install nightly
|
rustup install nightly
|
||||||
rustup install stable
|
rustup install stable
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
.netsim:
|
||||||
|
mkdir $@
|
||||||
|
curl -Ss https://course.ccs.neu.edu/cs3700sp20/archive/tcp-sim.tgz | tar xzf - -C $@
|
||||||
|
sed -i '/.usr.bin.sudo/d' .netsim/netsim
|
||||||
|
|
||||||
|
netsim-shell: .netsim
|
||||||
|
./scripts/create-net-ns.sh
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
nightly
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
|
||||||
|
cd $(dirname $DIR)
|
||||||
|
|
||||||
|
sudo unshare -n capsh --caps="cap_net_admin+eip cap_setpcap,cap_setuid,cap_setgid+ep" --keep=1 \
|
||||||
|
--user=$USER --addamb=cap_net_admin \
|
||||||
|
-- -c "export PATH=$PWD/.netsim:\$PATH; export HOME=$PWD; /usr/bin/ip link set lo up; netsim; \
|
||||||
|
tc qdisc show dev lo; /bin/bash --init-file <(echo unset HISTFILE)"
|
||||||
|
true
|
Loading…
Reference in New Issue