[CRIU] [PATCH 14/14] zdtm: add tests which can be executed in a new user namespace

Pavel Emelyanov xemul at parallels.com
Tue Oct 14 08:16:19 PDT 2014


On 10/14/2014 03:38 PM, Andrey Vagin wrote:
> 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
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  test/zdtm.sh | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 99 insertions(+)
> 
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index 16777a6..4219372 100755
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -183,6 +183,105 @@ ns/static/clean_mntns
>  static/remap_dead_pid
>  "
>  
> +# Execute tests in a new user namespace
> +test -f /proc/self/ns/user &&

It's not clear how to compare those lists. Other than
this, new tests don't get tested inside userns by default.

Can we instead have a blacklist of tests, that we know
do not work inside userns?

> +TEST_LIST="$TEST_LIST
> +ns/user/static/pipe00
> +ns/user/static/pipe01
> +ns/user/static/pipe02
> +ns/user/static/busyloop00
> +ns/user/static/cwd00
> +ns/user/static/cwd01
> +ns/user/static/cwd02
> +ns/user/static/env00
> +ns/user/static/maps00
> +ns/user/static/maps02
> +ns/user/static/maps04
> +ns/user/static/maps05
> +ns/user/static/maps_file_prot
> +ns/user/static/mprotect00
> +ns/user/static/mtime_mmap
> +ns/user/static/sleeping00
> +ns/user/static/write_read00
> +ns/user/static/write_read01
> +ns/user/static/write_read02
> +ns/user/static/write_read10
> +ns/user/static/wait00
> +ns/user/static/vdso00
> +ns/user/static/file_shared
> +ns/user/static/file_append
> +ns/user/static/timers
> +ns/user/static/posix_timers
> +ns/user/static/futex
> +ns/user/static/futex-rl
> +ns/user/static/xids00
> +ns/user/static/groups
> +ns/user/static/pthread00
> +ns/user/static/pthread01
> +ns/user/static/umask00
> +ns/user/streaming/pipe_loop00
> +ns/user/streaming/pipe_shared00
> +ns/user/transition/file_read
> +ns/user/static/pid00
> +ns/user/static/pstree
> +ns/user/static/caps00
> +ns/user/static/cmdlinenv00
> +ns/user/static/selfexe00
> +ns/user/static/link10
> +ns/user/static/unlink_fstat00
> +ns/user/static/unlink_fstat01
> +ns/user/static/unlink_fstat02
> +ns/user/static/unlink_fstat03
> +ns/user/static/unlink_mmap00
> +ns/user/static/unlink_mmap01
> +ns/user/static/unlink_mmap02
> +ns/user/static/rmdir_open
> +ns/user/static/eventfs00
> +ns/user/static/signalfd00
> +ns/user/static/fifo-rowo-pair
> +ns/user/static/fifo
> +ns/user/static/fifo_wronly
> +ns/user/static/fifo_ro
> +ns/user/static/zombie00
> +ns/user/static/rlimits00
> +ns/user/transition/fork
> +ns/user/transition/thread-bomb
> +ns/user/static/pty04
> +ns/user/static/child_opened_proc
> +ns/user/static/cow01
> +ns/user/static/fpu00
> +ns/user/static/fpu01
> +ns/user/static/mmx00
> +ns/user/static/sse00
> +ns/user/static/sse20
> +ns/user/static/pdeath_sig
> +ns/user/static/fdt_shared
> +ns/user/static/file_locks00
> +ns/user/static/file_locks01
> +ns/user/static/file_locks02
> +ns/user/static/file_locks03
> +ns/user/static/file_locks04
> +ns/user/static/file_locks05
> +ns/user/static/sigpending
> +ns/user/static/sigaltstack
> +ns/user/static/proc-self
> +ns/user/static/grow_map
> +ns/user/static/grow_map02
> +ns/user/static/grow_map03
> +ns/user/static/stopped
> +ns/user/static/chroot
> +ns/user/static/chroot-file
> +ns/user/static/rtc
> +ns/user/transition/maps007
> +ns/user/static/dumpable01
> +ns/user/static/vdso01
> +ns/user/static/session00
> +ns/user/static/session01
> +ns/user/static/bind-mount
> +ns/user/static/tun
> +ns/user/static/mntns_open
> +"
> +
>  TEST_CR_KERNEL="
>  ns/static/tun
>  static/timerfd
> 



More information about the CRIU mailing list