All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: allow chacl to be in any directory in $PATH
@ 2014-08-09  5:18 Theodore Ts'o
  2014-08-09 13:28 ` Eric Sandeen
  0 siblings, 1 reply; 2+ messages in thread
From: Theodore Ts'o @ 2014-08-09  5:18 UTC (permalink / raw)
  To: fstests; +Cc: Theodore Ts'o

Previously, xfstests checked for chacl in only a few hard-coded
directory: /bin, /sbin, and /usr/bin.  Use set_prog_path to allow
chacl to be in any directory in $PATH, which is how we find the
executable path for most other executables.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 common/attr   | 4 +---
 common/config | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/common/attr b/common/attr
index 42a1a16..f33166e 100644
--- a/common/attr
+++ b/common/attr
@@ -165,9 +165,7 @@ _filter_aces_notypes()
 
 _require_acls()
 {
-    if [ ! -x /bin/chacl -a ! -x /usr/bin/chacl -a ! -x /sbin/chacl ]; then
-    	_notrun "chacl command not found"
-    fi
+    [ -n $CHACL_PROG ] || _notrun "chacl command not found"
 
     #
     # Test if chacl is able to list ACLs on the target filesystems.  On really
diff --git a/common/config b/common/config
index 0dbf0b9..10cc6fe 100644
--- a/common/config
+++ b/common/config
@@ -168,6 +168,7 @@ export XFSRESTORE_PROG="`set_prog_path xfsrestore`"
 export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`"
 export GETFATTR_PROG="`set_prog_path getfattr`"
 export SETFATTR_PROG="`set_prog_path setfattr`"
+export CHACL_PROG="`set_prog_path chacl`"
 export ATTR_PROG="`set_prog_path attr`"
 export QUOTA_PROG="`set_prog_path quota`"
 export XFS_QUOTA_PROG="`set_prog_path xfs_quota`"
-- 
2.0.0


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

* Re: [PATCH] xfstests: allow chacl to be in any directory in $PATH
  2014-08-09  5:18 [PATCH] xfstests: allow chacl to be in any directory in $PATH Theodore Ts'o
@ 2014-08-09 13:28 ` Eric Sandeen
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2014-08-09 13:28 UTC (permalink / raw)
  To: Theodore Ts'o, fstests

On 8/9/14, 12:18 AM, Theodore Ts'o wrote:
> Previously, xfstests checked for chacl in only a few hard-coded
> directory: /bin, /sbin, and /usr/bin.  Use set_prog_path to allow
> chacl to be in any directory in $PATH, which is how we find the
> executable path for most other executables.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Aw, but it's been that way since at least 2004! ;)

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  common/attr   | 4 +---
>  common/config | 1 +
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/common/attr b/common/attr
> index 42a1a16..f33166e 100644
> --- a/common/attr
> +++ b/common/attr
> @@ -165,9 +165,7 @@ _filter_aces_notypes()
>  
>  _require_acls()
>  {
> -    if [ ! -x /bin/chacl -a ! -x /usr/bin/chacl -a ! -x /sbin/chacl ]; then
> -    	_notrun "chacl command not found"
> -    fi
> +    [ -n $CHACL_PROG ] || _notrun "chacl command not found"
>  
>      #
>      # Test if chacl is able to list ACLs on the target filesystems.  On really
> diff --git a/common/config b/common/config
> index 0dbf0b9..10cc6fe 100644
> --- a/common/config
> +++ b/common/config
> @@ -168,6 +168,7 @@ export XFSRESTORE_PROG="`set_prog_path xfsrestore`"
>  export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`"
>  export GETFATTR_PROG="`set_prog_path getfattr`"
>  export SETFATTR_PROG="`set_prog_path setfattr`"
> +export CHACL_PROG="`set_prog_path chacl`"
>  export ATTR_PROG="`set_prog_path attr`"
>  export QUOTA_PROG="`set_prog_path quota`"
>  export XFS_QUOTA_PROG="`set_prog_path xfs_quota`"
> 


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

end of thread, other threads:[~2014-08-09 13:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-09  5:18 [PATCH] xfstests: allow chacl to be in any directory in $PATH Theodore Ts'o
2014-08-09 13:28 ` Eric Sandeen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.