xfstests: generic/317 318 need procfs uid_map/gid_map support
authorEryu Guan <eguan@redhat.com>
Tue, 29 Oct 2013 12:17:48 +0000 (12:17 +0000)
committerRich Johnston <rjohnston@sgi.com>
Mon, 4 Nov 2013 20:31:04 +0000 (14:31 -0600)
generic/317 and 318 need /proc/<pid>/[uid_map|gid_map], test fail on
older kernels without that support.

Add a _require_ugid_map() function and called by 317 and 318.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
common/rc
tests/generic/317
tests/generic/318

index b5eb58264441bda6bcbaf57c08ec2d5895b9870a..ea3af128086d0652918d7a7de692722ac6b0f668 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2142,6 +2142,16 @@ _require_dumpe2fs()
        fi
 }
 
+_require_ugid_map()
+{
+       if [ ! -e /proc/self/uid_map ]; then
+               _notrun "This test requires procfs uid_map support."
+       fi
+       if [ ! -e /proc/self/gid_map ]; then
+               _notrun "This test requires procfs gid_map support."
+       fi
+}
+
 _create_loop_device()
 {
        file=$1
index 6d8d3c44b8b02d1f10ad8a691f8592fe96695a8a..c042f79cf2e043c3a26fcfb02ae78195461d89aa 100644 (file)
@@ -63,6 +63,7 @@ rm -f $seqres.full
 _require_scratch
 _need_to_be_root
 _require_user
+_require_ugid_map
 qa_user_id=`grep $qa_user /etc/passwd |awk -F: '{print $3}'`
 
 _filter_output()
index 810cff43615a90dcb98d3c7bf0edf73e34ba004e..0bfbba01cc83bf091ca93387e289c1e6170d1abb 100755 (executable)
@@ -63,6 +63,7 @@ _require_scratch
 _need_to_be_root
 _acl_setup_ids
 _require_acls
+_require_ugid_map
 ns_acl1=0
 ns_acl2=`expr $acl2 - $acl1`
 ns_acl3=`expr $acl3 - $acl1`