summaryrefslogtreecommitdiffstats
path: root/testsuite/tests/ip/netns/set_nsid_batch.t
blob: 196fd4b33e0ea68bdb062ff59c3bdc27a3988a3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

. lib/generic.sh

ts_log "[Testing netns nsid in batch mode]"

NS=testnsid
NSID=99
BATCHFILE=`mktemp`

echo "netns add $NS" >> $BATCHFILE
echo "netns set $NS $NSID" >> $BATCHFILE
echo "netns list-id" >> $BATCHFILE
ts_ip "$0" "Add ns, set nsid and list in batch mode" -b $BATCHFILE
test_on "nsid $NSID \(iproute2 netns name: $NS\)"
rm -f $BATCHFILE

ts_ip "$0" "Delete netns $NS" netns del $NS