xref: /openbmc/qemu/tests/rocker/port (revision 2e1cacfb)
1simp destroy ".*"
2simp create -o sw1:rocker:sw1 tut tut.dot
3simp start tut
4while ! simp ssh tut sw1 --cmd "ping -c 1 localhost >/dev/null"; do sleep 1; done
5while ! simp ssh tut h1 --cmd "ping -c 1 localhost >/dev/null"; do sleep 1; done
6while ! simp ssh tut h2 --cmd "ping -c 1 localhost >/dev/null"; do sleep 1; done
7
8# bring up DUT ports
9
10simp ssh tut sw1 --cmd "sudo ifconfig sw1p1 11.0.0.1/24"
11simp ssh tut sw1 --cmd "sudo ifconfig sw1p2 12.0.0.1/24"
12
13# config IP on hosts
14
15simp ssh tut h1 --cmd "sudo ifconfig sw1p1 11.0.0.2/24"
16simp ssh tut h2 --cmd "sudo ifconfig sw1p1 12.0.0.2/24"
17
18# test...
19
20simp ssh tut h1 --cmd "ping -c10 11.0.0.1 >/dev/null"
21if [ $? -eq 1 ]; then exit 1; fi
22simp ssh tut h2 --cmd "ping -c10 12.0.0.1 >/dev/null"
23