mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +00:00
test: don't use nsenter in tests
Ubuntu 14.04 (Travis) doesn't have it. Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com> Looks-good-to: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
71dcc6e918
commit
98204deb34
@ -1,8 +1,16 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ "$CRTOOLS_SCRIPT_ACTION" == "setup-namespaces" ]; then
|
||||
echo "Will up lo at $CRTOOLS_INIT_PID netns"
|
||||
nsenter -t "$CRTOOLS_INIT_PID" --net ip link set up dev lo || exit 1
|
||||
mkdir -p /var/run/netns
|
||||
mount -t tmpfs xxx /var/run/netns
|
||||
touch /var/run/netns/emptyns
|
||||
mount --bind /proc/$CRTOOLS_INIT_PID/ns/net /var/run/netns/emptyns
|
||||
ip netns exec emptyns ip link set up dev lo || exit 1
|
||||
ip netns exec emptyns ip a
|
||||
umount -l /var/run/netns
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user