image: archlinux
packages:
+ - bird
- go
- iproute2
tasks:
- all: |
+ sudo useradd --system --user-group bird
+ sudo mkdir -p /run/bird
+
cd linux-network-namespace-labs
make
sudo ./ci/examples
# Copyright (C) 2024 Simon Ruderich
set -eu
-set -x
+wait_for_route() {
+ for x in $(seq 1 60); do
+ if ip -n "$1" route get "$2" 2> /dev/null; then
+ break
+ fi
+ sleep 1
+ done
+}
+
+
+set -x
+
cd "$(dirname "$0")"
examples="$(pwd)/../examples"
ip netns exec r1 ping -c1 r3-loop
../../linux-network-namespace-labs down lab.conf
test -z "$(ip netns)"
+
+cd "$examples/bird-ospf"
+../../linux-network-namespace-labs up lab.conf
+# Wait until OSPF is ready
+wait_for_route r1 3fff::1
+wait_for_route r1 3fff::2
+ip netns exec r1 ping -c1 r1-loop
+ip netns exec r1 ping -c1 r2-loop
+ip netns exec r1 ping -c1 r3-loop
+../../linux-network-namespace-labs down lab.conf
+test -z "$(ip netns)"