summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2015-03-17 20:40:58 +0100
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-03-18 03:46:46 -0700
commitdde946f72a758410a80e05bf5f8447426db0b4a4 (patch)
treebf2fe02ee29d2d391c7081224c566e49f6235e58 /tests
parent89cb6bcc7335a9b5e12febcacc27f762bdcda595 (diff)
Tests: ls portability regarding dot-files
When run as root, BSD ls(1) lists dot-files, which includes .glusterfs in split-brain-healing.t's usage. This leads to failure. gfid-self-heal.t suffers the same problem. Fix by filtering out dot-files in ls(1) output NB: split-brain-healing.t also requires http://review.gluster.org/9831 to pass on NetBSD. BUG: 1129939 Change-Id: Ic572d3abf685e9b43f32ddee8a13b5f5c4ae641f Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/9885 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/afr/gfid-self-heal.t2
-rw-r--r--tests/basic/afr/split-brain-healing.t4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/basic/afr/gfid-self-heal.t b/tests/basic/afr/gfid-self-heal.t
index f9d88c5d21a..0bc53de8a6f 100644
--- a/tests/basic/afr/gfid-self-heal.t
+++ b/tests/basic/afr/gfid-self-heal.t
@@ -17,7 +17,7 @@ TEST $CLI volume start $V0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0
#Test that readdir returns entries even when no gfids are present
-EXPECT 4 echo $(ls -l $M0 | grep -vi total | wc -l)
+EXPECT 4 echo $(ls $M0 | grep -v '^\.' | wc -l)
sleep 2;
#stat the files and check that the files have same gfids on the bricks now
TEST stat $M0/1
diff --git a/tests/basic/afr/split-brain-healing.t b/tests/basic/afr/split-brain-healing.t
index bed33727a22..4132d327511 100644
--- a/tests/basic/afr/split-brain-healing.t
+++ b/tests/basic/afr/split-brain-healing.t
@@ -40,8 +40,8 @@ do
echo "Initial content">>file$i
done
-replica_0_files_list=(`ls $B0/${V0}1`)
-replica_1_files_list=(`ls $B0/${V0}3`)
+replica_0_files_list=(`ls $B0/${V0}1|grep -v '^\.'`)
+replica_1_files_list=(`ls $B0/${V0}3|grep -v '^\.'`)
############ Create data split-brain in the files. ###########################
TEST kill_brick $V0 $H0 $B0/${V0}1