Skip to contentSkip to conversation

xfstests: generic/317 318 need procfs uid_map/gid_map support

PATCH In review Eryu Guan 3 participants 3 messages Oct 29, 2013 – Nov 4, 2013

lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH 1/1 xfstests: generic/317 318 need procfs uid_map/gid_map support

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.

---
 common/rc         | 10 ++++++++++
 tests/generic/317 |  1 +
 tests/generic/318 |  1 +
 3 files changed, 12 insertions(+)
common/rc +10 -0
index b5eb582..ea3af12 100644
@@ -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
tests/generic/317 +1 -0
index 6d8d3c4..c042f79 100644
@@ -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()
tests/generic/318 +1 -0
index d3bce51..3e8eb50 100755
@@ -63,6 +63,7 @@ _require_scratch
 _need_to_be_root
 _acl_setup_ids
 _require_acls
+_require_ugid_map
 
 _print_getfacls()
 {
Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Eryu Guan

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.

---

Quoted 44 lines
 common/rc         | 10 ++++++++++
 tests/generic/317 |  1 +
 tests/generic/318 |  1 +
 3 files changed, 12 insertions(+)
common/rc +10 -0
index b5eb582..ea3af12 100644
@@ -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
tests/generic/317 +1 -0
index 6d8d3c4..c042f79 100644
@@ -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()
tests/generic/318 +0 -0
index d3bce51..3e8eb50 100755

tests/generic/318 _require_scratch · line 69

Quoted 7 lines
tests/generic/318 +1 -0
@@ -63,6 +63,7 @@ _require_scratch
 _need_to_be_root
 _acl_setup_ids
 _require_acls
+_require_ugid_map
 
 _print_getfacls()
 {

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs