[PATCH] generic/317,318: fail gracefully if userns not supported

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



generic/317 and generic/318 fail un-gracefully on older kernels
which don't support userns; fix that by running a simple test
as a prerequisite and fail gracefully if needed.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/tests/generic/317 b/tests/generic/317
index e016a42..8919db2 100755
--- a/tests/generic/317
+++ b/tests/generic/317
@@ -56,6 +56,8 @@ _supported_os Linux
 [ -x $nsexec  ] || _notrun "$nsexec executable not found"
 [ -x $lstat64 ] || _notrun "$lstat64 executable not found"
 
+$nsexec -U true 2>/dev/null || _notrun "user namespaces not supported by this kernel"
+
 rm -f $seqres.full
 
 _require_scratch
diff --git a/tests/generic/318 b/tests/generic/318
index 0bfbba0..0212712 100755
--- a/tests/generic/318
+++ b/tests/generic/318
@@ -57,6 +57,8 @@ _supported_os Linux
 
 [ -x $nsexec ] || _notrun "$nsexec executable not found"
 
+$nsexec -U true 2>/dev/null || _notrun "user namespaces not supported by this kernel"
+
 rm -f $seqres.full
 
 _require_scratch

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux