[CRIU] [PATCH 14/14] zdtm: add tests which can be executed in a new user namespace (v2)
Andrey Vagin
avagin at openvz.org
Wed Oct 15 12:38:19 PDT 2014
Sockets tests are excluded, because SO_RCVBUFFORCE and SO_SNDBUFFORCE
are protected by CAP_NET_ADMIN
tty*, pty* are excluded, because TIOCSLCKTRMIOS protected by
CAP_SYS_ADMIN
*ghost, *notify, *unlink* are excluded, because linkat(AT_EMPTY_PATH)
are protected by CAP_DAC_READ_SEARCH
v2: use a blacklist
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
test/zdtm.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 6531ec5..6f99457 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -199,6 +199,61 @@ else
export ZDTM_NOSUBNS=1
fi
+BLACKLIST_FOR_USERNS="
+ns/static/maps01
+ns/static/mlock_setuid
+ns/static/sched_prio00
+ns/static/sched_policy00
+ns/static/sockets00
+ns/static/sockets01
+ns/static/sockets02
+ns/static/sock_opts00
+ns/static/sock_opts01
+ns/static/sockets_spair
+ns/static/sockets_dgram
+ns/static/socket_queues
+ns/static/deleted_unix_sock
+ns/static/sk-unix-unconn
+ns/static/socket_listen
+ns/static/socket_listen6
+ns/static/packet_sock
+ns/static/socket_udp
+ns/static/sock_filter
+ns/static/socket6_udp
+ns/static/socket_udplite
+ns/static/inotify00
+ns/static/inotify_irmap
+ns/static/fanotify00
+ns/static/unbound_sock
+ns/static/fifo-ghost
+ns/static/unlink_fifo
+ns/static/unlink_fifo_wronly
+ns/static/pty00
+ns/static/pty01
+ns/static/tty02
+ns/static/tty03
+ns/static/sk-netlink
+ns/static/dumpable02
+ns/static/deleted_dev
+ns/static/tempfs
+ns/static/clean_mntns
+ns/static/mntns_link_remap
+ns/static/mntns_link_ghost
+"
+
+# Add tests which can be executed in an user namespace
+test -f /proc/self/ns/user && {
+ local flist, blist
+ blist=`mktemp /tmp/zdtm.black.XXXXXX`
+ echo "$BLACKLIST_FOR_USERNS" | sort > $blist
+
+
+ TEST_LIST="$TEST_LIST
+ `echo "$TEST_LIST" | grep "^ns/" | sort | \
+ diff --changed-group-format="%<" --unchanged-group-format="" - $blist | \
+ sed s#ns/#ns/user/#`"
+ unlink $blist
+}
TEST_SUID_LIST="
pid00
--
1.9.3
More information about the CRIU
mailing list