diff options
| author | Krutika Dhananjay <kdhananj@redhat.com> | 2016-02-09 16:40:36 +0530 |
|---|---|---|
| committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-03-10 03:16:55 -0800 |
| commit | 6df883cef3e69b37a192aae9e979f95b32f8ad41 (patch) | |
| tree | 33729a013e69528861e8449c24c056cf5e21d211 /tests/bugs/shard/bug-1251824.t | |
| parent | ed98d128a9413f7b8af328ca27bf4b27514d61e9 (diff) | |
tests, shard: fallocate tests refactor
Change-Id: I3f275185f4dcb1939e8074851c8f140c5e40b28d
BUG: 1261841
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/13405
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests/bugs/shard/bug-1251824.t')
| -rw-r--r-- | tests/bugs/shard/bug-1251824.t | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/bugs/shard/bug-1251824.t b/tests/bugs/shard/bug-1251824.t index cdb6c5e9f72..85f0638d13c 100644 --- a/tests/bugs/shard/bug-1251824.t +++ b/tests/bugs/shard/bug-1251824.t @@ -1,6 +1,7 @@ #!/bin/bash . $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc . $(dirname $0)/../../common-utils.rc cleanup; @@ -29,8 +30,7 @@ TEST chown test_user:test_user $M0/bar TEST run_cmd_as_user test_user "dd if=/dev/zero of=$M0/foo bs=1M count=6" # Ensure owner and group are root on the block-1 shard. -gfid_foo=`getfattr -n glusterfs.gfid.string $M0/foo 2>/dev/null \ - | grep glusterfs.gfid.string | cut -d '"' -f 2` +gfid_foo=$(get_gfid_string $M0/foo) EXPECT "root" echo `find $B0 -name $gfid_foo.1 | xargs stat -c %U` EXPECT "root" echo `find $B0 -name $gfid_foo.1 | xargs stat -c %G` @@ -49,8 +49,7 @@ EXPECT "root" echo `find $B0/${V0}3 -name .shard | xargs stat -c %G` TEST dd if=/dev/zero of=$M0/bar bs=1M count=6 # Ensure owner and group are root on the block-1 shard. -gfid_bar=`getfattr -n glusterfs.gfid.string $M0/bar 2>/dev/null \ - | grep glusterfs.gfid.string | cut -d '"' -f 2` +gfid_bar=$(get_gfid_string $M0/bar) EXPECT "root" echo `find $B0 -name $gfid_bar.1 | xargs stat -c %U` EXPECT "root" echo `find $B0 -name $gfid_bar.1 | xargs stat -c %G` @@ -58,8 +57,7 @@ EXPECT "root" echo `find $B0 -name $gfid_bar.1 | xargs stat -c %G` # Write 6M of data on baz as root. TEST dd if=/dev/zero of=$M0/baz bs=1M count=6 -gfid_baz=`getfattr -n glusterfs.gfid.string $M0/baz 2>/dev/null \ - | grep glusterfs.gfid.string | cut -d '"' -f 2` +gfid_baz=$(get_gfid_string $M0/baz) # Ensure owner and group are root on the block-1 shard. EXPECT "root" echo `find $B0 -name $gfid_baz.1 | xargs stat -c %U` |
