summaryrefslogtreecommitdiffstats
path: root/tests/bugs/shard/zero-flag.t
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2016-03-08 15:44:04 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-03-11 11:10:30 -0800
commit0e048b309b64e574039fc1ebedb971791d43b5e1 (patch)
tree0b9adb61d7872a09113283f42b5e46e913efa559 /tests/bugs/shard/zero-flag.t
parentdf7390c9d7db40dcd68cf1020b6248f5105ab8eb (diff)
downloadglusterfs-0e048b309b64e574039fc1ebedb971791d43b5e1.tar.gz
glusterfs-0e048b309b64e574039fc1ebedb971791d43b5e1.tar.xz
glusterfs-0e048b309b64e574039fc1ebedb971791d43b5e1.zip
features/shard: Implement discard fop
Change-Id: Ia5bd8d36b21a586df6556fbec3474892d5871229 BUG: 1261841 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13657 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/bugs/shard/zero-flag.t')
-rw-r--r--tests/bugs/shard/zero-flag.t12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/bugs/shard/zero-flag.t b/tests/bugs/shard/zero-flag.t
index dc88ae1c1c..fabf83040f 100644
--- a/tests/bugs/shard/zero-flag.t
+++ b/tests/bugs/shard/zero-flag.t
@@ -4,10 +4,6 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../fallocate.rc
-function file_all_zeroes {
- < $1 tr -d '\0' | read -n 1 || echo 1
-}
-
cleanup
require_fallocate -l 1m $M0/file
@@ -31,7 +27,7 @@ TEST touch $M0/file1
gfid_file1=$(get_gfid_string $M0/file1)
-TEST $(dirname $0)/zero-flag $H0 $V0 "0" "0" "6291456" /file1
+TEST $(dirname $0)/zero-flag $H0 $V0 "0" "0" "6291456" /file1 `gluster --print-logdir`/glfs-$V0.log
EXPECT '6291456' stat -c %s $M0/file1
@@ -51,7 +47,7 @@ TEST truncate -s 6M $M0/file2
TEST dd if=$M0/tmp of=$M0/file2 bs=1 seek=3145728 count=26 conv=notrunc
md5sum_file2=$(md5sum $M0/file2 | awk '{print $1}')
-TEST $(dirname $0)/zero-flag $H0 $V0 "0" "3145728" "26" /file2
+TEST $(dirname $0)/zero-flag $H0 $V0 "0" "3145728" "26" /file2 `gluster --print-logdir`/glfs-$V0.log
EXPECT '6291456' stat -c %s $M0/file2
EXPECT "$md5sum_file2" echo `md5sum $M0/file2 | awk '{print $1}'`
@@ -69,10 +65,10 @@ TEST stat $B0/$V0*/.shard/$gfid_file3.2
md5sum_file3=$(md5sum $M0/file3 | awk '{print $1}')
EXPECT "1048602" echo `find $B0 -name $gfid_file3.2 | xargs stat -c %s`
-TEST $(dirname $0)/zero-flag $H0 $V0 "0" "5242880" "1048576" /file3
+TEST $(dirname $0)/zero-flag $H0 $V0 "0" "5242880" "1048576" /file3 `gluster --print-logdir`/glfs-$V0.log
EXPECT "$md5sum_file3" echo `md5sum $M0/file3 | awk '{print $1}'`
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
rm -f $(dirname $0)/zero-flag