Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 727997F3F for ; Tue, 29 Oct 2013 07:18:56 -0500 (CDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay2.corp.sgi.com (Postfix) with ESMTP id 42DFD304059 for ; Tue, 29 Oct 2013 05:18:53 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by cuda.sgi.com with ESMTP id ychBXl8Tz1xlfLuK for ; Tue, 29 Oct 2013 05:18:52 -0700 (PDT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9TCIpAv020955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 29 Oct 2013 08:18:51 -0400 From: Eryu Guan Subject: [PATCH] xfstests: generic/317 318 need procfs uid_map/gid_map support Date: Tue, 29 Oct 2013 20:17:48 +0800 Message-Id: <1383049068-3020-1-git-send-email-eguan@redhat.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: xfs@oss.sgi.com Cc: Eryu Guan 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 --- 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 b5eb582..ea3af12 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 6d8d3c4..c042f79 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 d3bce51..3e8eb50 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 _print_getfacls() { -- 1.8.3.1 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs