]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: check for ns-get*-ok
authorKarel Zak <kzak@redhat.com>
Tue, 4 Mar 2025 18:07:43 +0000 (19:07 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 4 Mar 2025 18:14:07 +0000 (19:14 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/lsns/filedesc
tests/ts/lsns/netns-from-sock
tests/ts/lsns/nsfs

index 1427dee0dabd2ec447aef59847b5b3c4180fcd90..9a3642162ac4b98243cb296e537492873ea70275 100755 (executable)
@@ -35,6 +35,10 @@ if [ "$($TS_HELPER_SYSINFO ns-gettype-ok)" == "0" ]; then
     ts_skip "NS_GET_NSTYPE ioctl cmd not available"
 fi
 
+if [ "$($TS_HELPER_SYSINFO ns-getuserns-ok)" == "0" ]; then
+    ts_skip "NS_GET_USERNS ioctl cmd not available"
+fi
+
 FD=4
 NS=LSNS-TEST-FILEDESC-NS
 FILE=/run/netns/$NS
index c8384104427eb92fd70eb0e13d11496cf8590b7c..f4249a8a6281116f8d69edf87b400f0fa30deeca 100755 (executable)
@@ -30,6 +30,9 @@ ts_check_test_command "$TS_HELPER_SYSINFO"
 
 ts_skip_nonroot
 
+if [ "$($TS_HELPER_SYSINFO ns-gettype-ok)" == "0" ]; then
+    ts_skip "NS_GET_NSTYPE ioctl cmd not available"
+fi
 if [ "$($TS_HELPER_SYSINFO ns-getuserns-ok)" == "0" ]; then
     ts_skip "NS_GET_USERNS ioctl cmd not available"
 fi
index caa81dc10272cd2044af37cd59d81be419a9ab9f..e9c1910d784cfa17fa9e9df0a000ff8671678c53 100755 (executable)
@@ -35,6 +35,13 @@ ts_check_prog "sed"
 
 grep -q '#define HAVE_LINUX_NET_NAMESPACE_H' ${top_builddir}/config.h || ts_skip "no netns support"
 
+if [ "$($TS_HELPER_SYSINFO ns-gettype-ok)" == "0" ]; then
+    ts_skip "NS_GET_NSTYPE ioctl cmd not available"
+fi
+if [ "$($TS_HELPER_SYSINFO ns-getuserns-ok)" == "0" ]; then
+    ts_skip "NS_GET_USERNS ioctl cmd not available"
+fi
+
 ts_cd "$TS_OUTDIR"
 
 NAME1=ABC