summaryrefslogtreecommitdiffstats
path: root/tests/basic/posix/zero-fill-enospace.t
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2018-06-13 12:17:28 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2018-06-25 13:43:51 +0000
commite60d337201854e391fe32ceb86c72a4cb7f23467 (patch)
treef842386f8ca7952479f9e885879746a6cff9b8d7 /tests/basic/posix/zero-fill-enospace.t
parent6d19297f5bc09a6eb9d90aab5836fb099fe32783 (diff)
downloadglusterfs-e60d337201854e391fe32ceb86c72a4cb7f23467.tar.gz
glusterfs-e60d337201854e391fe32ceb86c72a4cb7f23467.tar.xz
glusterfs-e60d337201854e391fe32ceb86c72a4cb7f23467.zip
storage/posix: Handle ENOSPC correctly in zero_fill
Change-Id: Icc521d86cc510f88b67d334b346095713899087a BUG: 1591187 fixes: bz#1591187 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'tests/basic/posix/zero-fill-enospace.t')
-rw-r--r--tests/basic/posix/zero-fill-enospace.t35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/basic/posix/zero-fill-enospace.t b/tests/basic/posix/zero-fill-enospace.t
new file mode 100644
index 0000000000..ac2e61b10c
--- /dev/null
+++ b/tests/basic/posix/zero-fill-enospace.t
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+. $(dirname $0)/../../dht.rc
+
+cleanup;
+
+TEST glusterd;
+TEST pidof glusterd;
+
+TEST truncate -s 100M $B0/brick1
+
+TEST L1=`SETUP_LOOP $B0/brick1`
+TEST MKFS_LOOP $L1
+
+TEST mkdir -p $B0/${V0}1
+
+TEST MOUNT_LOOP $L1 $B0/${V0}1
+
+TEST $CLI volume create $V0 $H0:$B0/${V0}1
+
+TEST $CLI volume start $V0;
+
+TEST glusterfs -s $H0 --volfile-id=$V0 $M0
+TEST touch $M0/foo
+TEST build_tester $(dirname $0)/zero-fill-enospace.c -lgfapi -Wall -O2
+TEST ! $(dirname $0)/zero-fill-enospace $H0 $V0 /foo `gluster --print-logdir`/glfs-$V0.log 104857600
+
+TEST force_umount $M0
+TEST $CLI volume stop $V0
+UMOUNT_LOOP ${B0}/${V0}1
+rm -f ${B0}/brick1
+
+cleanup