summaryrefslogtreecommitdiffstats
path: root/tests/basic/afr
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2014-07-10 05:45:52 +0200
committerVijay Bellur <vbellur@redhat.com>2014-07-14 06:29:15 -0700
commit210a59e48a52515615e440e2a6e1b650063c370b (patch)
treed7b6c13f342fc7ca01c17216720cf52990bd70aa /tests/basic/afr
parentf637f2f101b13388187f8a6852d3ae6f1d9c2ad5 (diff)
Regression test portability: dd usage
NetBSD, FreeBSD, and MacOS X dd(1) bs argument uses m for megabyte, while Linux uses M. Use bs=1024k instead of bs=1M for better compatibility. BUG: 764655 Change-Id: I603f57adbc9b31f6d634b918726437fbfce42e03 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8278 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Justin Clift <justin@gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/basic/afr')
-rw-r--r--tests/basic/afr/read-subvol-data.t4
-rw-r--r--tests/basic/afr/self-heal.t14
-rw-r--r--tests/basic/afr/sparse-file-self-heal.t12
3 files changed, 15 insertions, 15 deletions
diff --git a/tests/basic/afr/read-subvol-data.t b/tests/basic/afr/read-subvol-data.t
index 2fa20a2c181..0c4b366331d 100644
--- a/tests/basic/afr/read-subvol-data.t
+++ b/tests/basic/afr/read-subvol-data.t
@@ -20,9 +20,9 @@ TEST $CLI volume set $V0 cluster.read-subvolume $V0-client-1
TEST $CLI volume set $V0 cluster.data-self-heal off
TEST $CLI volume set $V0 cluster.metadata-self-heal off
TEST $CLI volume set $V0 cluster.entry-self-heal off
-TEST dd if=/dev/urandom of=$M0/afr_success_5.txt bs=1M count=1
+TEST dd if=/dev/urandom of=$M0/afr_success_5.txt bs=1024k count=1
TEST kill_brick $V0 $H0 $B0/brick0
-TEST dd if=/dev/urandom of=$M0/afr_success_5.txt bs=1M count=10
+TEST dd if=/dev/urandom of=$M0/afr_success_5.txt bs=1024k count=10
TEST $CLI volume start $V0 force
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "10485760" echo `ls -l $M0/afr_success_5.txt | awk '{ print $5}'`
diff --git a/tests/basic/afr/self-heal.t b/tests/basic/afr/self-heal.t
index 575ed4c4f72..60e953b9996 100644
--- a/tests/basic/afr/self-heal.t
+++ b/tests/basic/afr/self-heal.t
@@ -21,10 +21,10 @@ TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0 --entry-timeout=0 --att
#Test
TEST mkdir -p $M0/abc/def $M0/abc/ghi
-TEST dd if=/dev/urandom of=$M0/abc/file_abc.txt bs=1M count=2 2>/dev/null
-TEST dd if=/dev/urandom of=$M0/abc/def/file_abc_def_1.txt bs=1M count=2 2>/dev/null
-TEST dd if=/dev/urandom of=$M0/abc/def/file_abc_def_2.txt bs=1M count=3 2>/dev/null
-TEST dd if=/dev/urandom of=$M0/abc/ghi/file_abc_ghi.txt bs=1M count=4 2>/dev/null
+TEST dd if=/dev/urandom of=$M0/abc/file_abc.txt bs=1024k count=2 2>/dev/null
+TEST dd if=/dev/urandom of=$M0/abc/def/file_abc_def_1.txt bs=1024k count=2 2>/dev/null
+TEST dd if=/dev/urandom of=$M0/abc/def/file_abc_def_2.txt bs=1024k count=3 2>/dev/null
+TEST dd if=/dev/urandom of=$M0/abc/ghi/file_abc_ghi.txt bs=1024k count=4 2>/dev/null
TEST kill_brick $V0 $H0 $B0/brick0
TEST truncate -s 0 $M0/abc/def/file_abc_def_1.txt
@@ -33,9 +33,9 @@ NEW_GID=36
TEST chown $NEW_UID:$NEW_GID $M0/abc/def/file_abc_def_2.txt
TEST rm -rf $M0/abc/ghi
TEST mkdir -p $M0/def/ghi $M0/jkl/mno
-TEST dd if=/dev/urandom of=$M0/def/ghi/file1.txt bs=1M count=2 2>/dev/null
-TEST dd if=/dev/urandom of=$M0/def/ghi/file2.txt bs=1M count=3 2>/dev/null
-TEST dd if=/dev/urandom of=$M0/jkl/mno/file.txt bs=1M count=4 2>/dev/null
+TEST dd if=/dev/urandom of=$M0/def/ghi/file1.txt bs=1024k count=2 2>/dev/null
+TEST dd if=/dev/urandom of=$M0/def/ghi/file2.txt bs=1024k count=3 2>/dev/null
+TEST dd if=/dev/urandom of=$M0/jkl/mno/file.txt bs=1024k count=4 2>/dev/null
TEST chown $NEW_UID:$NEW_GID $M0/def/ghi/file2.txt
TEST $CLI volume start $V0 force
diff --git a/tests/basic/afr/sparse-file-self-heal.t b/tests/basic/afr/sparse-file-self-heal.t
index 01b676ea900..fa8375b1c8d 100644
--- a/tests/basic/afr/sparse-file-self-heal.t
+++ b/tests/basic/afr/sparse-file-self-heal.t
@@ -14,9 +14,9 @@ TEST $CLI volume set $V0 data-self-heal-algorithm full
TEST $CLI volume start $V0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0
-TEST dd if=/dev/urandom of=$M0/small count=1 bs=1M
-TEST dd if=/dev/urandom of=$M0/bigger2big count=1 bs=2M
-TEST dd if=/dev/urandom of=$M0/big2bigger count=1 bs=1M
+TEST dd if=/dev/urandom of=$M0/small count=1 bs=1024k
+TEST dd if=/dev/urandom of=$M0/bigger2big count=1 bs=2048k
+TEST dd if=/dev/urandom of=$M0/big2bigger count=1 bs=1024k
TEST kill_brick $V0 $H0 $B0/${V0}0
@@ -71,9 +71,9 @@ TEST rm -f $M0/*
#check the same tests with diff self-heal
TEST $CLI volume set $V0 data-self-heal-algorithm diff
-TEST dd if=/dev/urandom of=$M0/small count=1 bs=1M
-TEST dd if=/dev/urandom of=$M0/big2bigger count=1 bs=1M
-TEST dd if=/dev/urandom of=$M0/bigger2big count=1 bs=2M
+TEST dd if=/dev/urandom of=$M0/small count=1 bs=1024k
+TEST dd if=/dev/urandom of=$M0/big2bigger count=1 bs=1024k
+TEST dd if=/dev/urandom of=$M0/bigger2big count=1 bs=2048k
TEST kill_brick $V0 $H0 $B0/${V0}0