public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: generic/317 318 need procfs uid_map/gid_map support
@ 2013-10-29 12:17 Eryu Guan
  2013-10-29 17:55 ` Eric Sandeen
  2013-11-04 20:36 ` Rich Johnston
  0 siblings, 2 replies; 3+ messages in thread
From: Eryu Guan @ 2013-10-29 12:17 UTC (permalink / raw)
  To: xfs; +Cc: 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.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfstests: generic/317 318 need procfs uid_map/gid_map support
  2013-10-29 12:17 [PATCH] xfstests: generic/317 318 need procfs uid_map/gid_map support Eryu Guan
@ 2013-10-29 17:55 ` Eric Sandeen
  2013-11-04 20:36 ` Rich Johnston
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2013-10-29 17:55 UTC (permalink / raw)
  To: Eryu Guan, xfs

On 10/29/13 7:17 AM, Eryu Guan wrote:
> 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>

>  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()
>  {
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfstests: generic/317 318 need procfs uid_map/gid_map support
  2013-10-29 12:17 [PATCH] xfstests: generic/317 318 need procfs uid_map/gid_map support Eryu Guan
  2013-10-29 17:55 ` Eric Sandeen
@ 2013-11-04 20:36 ` Rich Johnston
  1 sibling, 0 replies; 3+ messages in thread
From: Rich Johnston @ 2013-11-04 20:36 UTC (permalink / raw)
  To: Eryu Guan, xfs

This has been committed.

Thanks
--Rich

commit a4ba47ca9443420495d83c7146b355d466e52ebf
Author: Eryu Guan <eguan@redhat.com>
Date:   Tue Oct 29 12:17:48 2013 +0000

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

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-04 20:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29 12:17 [PATCH] xfstests: generic/317 318 need procfs uid_map/gid_map support Eryu Guan
2013-10-29 17:55 ` Eric Sandeen
2013-11-04 20:36 ` Rich Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox