tests: fix lsns test on kernels without USER namespaces

Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Anatoly Pugachev 2021-06-18 14:45:31 +02:00 committed by Karel Zak
parent ed03caf2c6
commit 5fc0e55af1
1 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,9 @@ ts_init "$*"
# ts_skip_nonroot
grep -q '#define HAVE_LINUX_NSFS_H' ${top_builddir}/config.h || ts_skip "no ioctl_ns support"
[ -r /proc/self/ns/user ] || ts_skip "no USER namespace kernel support"
[ -r /proc/self/ns/pid ] || ts_skip "no PID namespace kernel support"
ts_check_test_command "$TS_CMD_LSNS"
ts_check_test_command "$TS_CMD_UNSHARE"
ts_check_prog "stat"