diff options
author | Harshavardhana <harsha@harshavardhana.net> | 2014-08-23 02:14:36 -0700 |
---|---|---|
committer | Harshavardhana <harsha@harshavardhana.net> | 2014-09-05 10:04:20 -0700 |
commit | fd500d4396f910e4cf759e0fffa4daf4ed24745a (patch) | |
tree | 2e52c1b64659efc3cf98fed31a8a2fc6f8a4bc26 /tests/bugs/bug-856455.t | |
parent | 88159becd90d40323ecfc24cf40813538c9204cc (diff) |
porting: Provide setfattr/getfattr implementation
- Use 'getfattr' properly avoid redundant options during xattr query
- Untabify certain parts of tests (remove tabs)
- Avoid backtick evaluation for certain values to make code more portable.
- Use awk on FreeBSD/Darwin, since 'wc' implementation is broken and adds
spurious spaces in its output.
Change-Id: I7dcc0b70874e43b4cda8c306ed18a31b7a3f990a
BUG: 1131713
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8520
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
Diffstat (limited to 'tests/bugs/bug-856455.t')
-rw-r--r-- | tests/bugs/bug-856455.t | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/bugs/bug-856455.t b/tests/bugs/bug-856455.t index 3e314aa5bb3..0e79d9fa1c9 100644 --- a/tests/bugs/bug-856455.t +++ b/tests/bugs/bug-856455.t @@ -13,20 +13,20 @@ TEST $CLI volume create $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1 $H0:$B0/${V0}2 TEST $CLI volume start $V0 ## Mount FUSE with caching disabled -TEST glusterfs --entry-timeout=0 --attribute-timeout=0 -s $H0 --volfile-id $V0 $M0; +TEST $GFS -s $H0 --volfile-id $V0 $M0; function query_pathinfo() { local path=$1; local retval; - local pathinfo=`getfattr -m . -n trusted.glusterfs.pathinfo $path`; - retval=`echo $pathinfo | grep -o 'POSIX' | wc -l`; + local pathinfo=$(getfattr -n trusted.glusterfs.pathinfo $path); + retval=$(echo $pathinfo | grep -o 'POSIX' | wc -l); echo $retval } -touch $M0/f00f; -mkdir $M0/f00d; +TEST touch $M0/f00f; +TEST mkdir $M0/f00d; # verify pathinfo for a file and directory EXPECT 1 query_pathinfo $M0/f00f; |