From a4ba47ca9443420495d83c7146b355d466e52ebf Mon Sep 17 00:00:00 2001 From: Eryu Guan Date: Tue, 29 Oct 2013 12:17:48 +0000 Subject: [PATCH] xfstests: generic/317 318 need procfs uid_map/gid_map support generic/317 and 318 need /proc//[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 Reviewed-by: Eric Sandeen Signed-off-by: Rich Johnston --- common/rc | 10 ++++++++++ tests/generic/317 | 1 + tests/generic/318 | 1 + 3 files changed, 12 insertions(+) diff --git a/common/rc b/common/rc index b5eb5826..ea3af128 100644 --- 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 diff --git a/tests/generic/317 b/tests/generic/317 index 6d8d3c44..c042f79c 100644 --- a/tests/generic/317 +++ b/tests/generic/317 @@ -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() diff --git a/tests/generic/318 b/tests/generic/318 index 810cff43..0bfbba01 100755 --- a/tests/generic/318 +++ b/tests/generic/318 @@ -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` -- 2.39.5