-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·60 lines (48 loc) · 1.44 KB
/
test.sh
File metadata and controls
executable file
·60 lines (48 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
set -ex
(sudo pkill iokerneld && sleep 2) || true
sudo pkill -9 netperf || true
sudo scripts/setup_machine.sh ${NOUINTR}
sudo ./iokerneld ias nobw noht no_hw_qdel numanode -1 -- --allow 00:00.0 --vdev=net_tap0 > /tmp/iokernel_$USER.log 2>&1 &
iokpid=$!
while ! grep -q 'running dataplan' /tmp/iokernel_$USER.log; do
sleep 0.3
# make sure it is still alive
pgrep iokerneld > /dev/null || exit 1
cat /tmp/iokernel_$USER.log
done
CORES=`getconf _NPROCESSORS_ONLN`
gen_configs() {
exec {test_fd}<<EOF
host_addr 192.168.1.5
host_netmask 255.255.255.0
host_gateway 192.168.1.1
runtime_kthreads $((CORES-2))
runtime_guaranteed_kthreads 0
runtime_priority lc
EOF
exec {test_fd2}<<EOF
host_addr 192.168.1.6
host_netmask 255.255.255.0
host_gateway 192.168.1.1
runtime_kthreads $((CORES-2))
runtime_guaranteed_kthreads 0
runtime_priority lc
EOF
}
for test in `find tests -name 'test_*' -executable | grep -v storage`; do
gen_configs
$test /proc/self/fd/$test_fd /proc/self/fd/$test_fd2
done
make -C bindings/cc/ -j librt++.a
make -C apps/bench/ netperf -j
gen_configs
apps/bench/netperf /proc/self/fd/$test_fd server &
np=$!
sleep 1
apps/bench/netperf /proc/self/fd/$test_fd2 tcprr 192.168.1.5 10 10000 4096
gen_configs
apps/bench/netperf /proc/self/fd/$test_fd2 tcpstream 192.168.1.5 10 10000 4096
kill $np
sudo kill $iokpid
wait