File: integration-net.sh

package info (click to toggle)
rootlesskit 2.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 636 kB
  • sloc: sh: 433; makefile: 25
file content (21 lines) | stat: -rwxr-xr-x 543 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# Integration tests for network drivers.
# See also: benchmark-iperf3-net.sh

source $(realpath $(dirname $0))/common.inc.sh
if [ $# -lt 1 ]; then
	ERROR "Usage: $0 NETDRIVER [FLAGS...]"
	exit 1
fi
net=$1
shift 1
flags=$@
INFO "net=${net} flags=$@"

# Test DNS
set -x
if [ "${net}" = "lxc-user-nic" ]; then
	# ignore "lxc-net is already running" error
	sudo /usr/lib/$(uname -m)-linux-gnu/lxc/lxc-net start || true
fi
$ROOTLESSKIT --net=${net} --copy-up=/etc --copy-up=/run --disable-host-loopback ${flags} -- nslookup example.com