From: Anatoly Pugachev Date: Fri, 18 Jun 2021 12:45:31 +0000 (+0200) Subject: tests: fix lsns test on kernels without USER namespaces X-Git-Tag: v2.38-rc1~437 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c6fb9841c360d883a90879520bfa8eea499167a;p=thirdparty%2Futil-linux.git tests: fix lsns test on kernels without USER namespaces Reported-by: Bruce Dubbs Signed-off-by: Karel Zak --- diff --git a/tests/ts/lsns/ioctl_ns b/tests/ts/lsns/ioctl_ns index e91f6743f5..ef63606077 100755 --- a/tests/ts/lsns/ioctl_ns +++ b/tests/ts/lsns/ioctl_ns @@ -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"