1 #!/bin/sh 2 3 . lib/generic.sh 4 5 ts_log "[Testing netns nsid in batch mode]" 6 7 NS=testnsid 8 NSID=99 9 BATCHFILE=`mktemp` 10 11 echo "netns add $NS" >> $BATCHFILE 12 echo "netns set $NS $NSID" >> $BATCHFILE 13 echo "netns list-id" >> $BATCHFILE 14 ts_ip "$0" "Add ns, set nsid and list in batch mode" -b $BATCHFILE 15 test_on "nsid $NSID \(iproute2 netns name: $NS\)" 16 rm -f $BATCHFILE 17 18 ts_ip "$0" "Delete netns $NS" netns del $NS 19