summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-1037501.t
diff options
context:
space:
mode:
authorVenkatesh Somyajulu <vsomyaju@redhat.com>2013-12-27 16:51:29 +0530
committerVijay Bellur <vbellur@redhat.com>2013-12-27 19:13:17 -0800
commit6b41a0b7dfd9f48e1518430bacba9135bee4fcb4 (patch)
treebf05ed828d4922b63302a5c185073f8212bc4f99 /tests/bugs/bug-1037501.t
parent2909ef3ecb5f331630460d17c56da6291c1f254b (diff)
test: Modified bug-1037501.t script
Change-Id: I3114009681d49249fe292f94a464efc419c944cb BUG: 1037501 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/6596 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/bugs/bug-1037501.t')
-rwxr-xr-xtests/bugs/bug-1037501.t185
1 files changed, 109 insertions, 76 deletions
diff --git a/tests/bugs/bug-1037501.t b/tests/bugs/bug-1037501.t
index 5470d05632c..d11c788a093 100755
--- a/tests/bugs/bug-1037501.t
+++ b/tests/bugs/bug-1037501.t
@@ -65,156 +65,189 @@ function compare()
echo $var
}
+var2="000000000000000000000000"
var1=`getfattr -d -m . $B0/$V0-0/File -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000020000000200000000"
-
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/File -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/File -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/File -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1| cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/File -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/File -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/File -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/File -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/File -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/Dir -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000000000000100000001"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/Dir -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000000000000100000001"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/Dir -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000000000000100000001"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/Dir -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000000000000100000001"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/Dir -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000000000000100000001"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/Dir -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000000000000100000001"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/Dir -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000000000000100000001"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/Dir -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000000000000100000001"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/Dir -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000000000000100000001"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/Link -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000020000000200000000"
-
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/Link -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/Link -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/Link -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/Link -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/Link -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/Link -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/Link -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/Link -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000020000000200000000"
-EXPECT 0 compare $var1 $var2
-
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/FIFO -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000000000000100000000"
-
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/FIFO -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000000000000100000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-0/FIFO -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000000000000100000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/FIFO -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000000000000100000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/FIFO -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000000000000100000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-1/FIFO -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000000000000100000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/FIFO -e hex 2>&1 | grep "client-3"`
-var2="trusted.afr.$V0-client-3=0x000000000000000100000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/FIFO -e hex 2>&1 | grep "client-4"`
-var2="trusted.afr.$V0-client-4=0x000000000000000100000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
var1=`getfattr -d -m . $B0/$V0-2/FIFO -e hex 2>&1 | grep "client-5"`
-var2="trusted.afr.$V0-client-5=0x000000000000000100000000"
-EXPECT 0 compare $var1 $var2
+EXPECT "0" echo $?
+var3=`echo $var1 | cut -d x -f 2`
+EXPECT_NOT $var2 echo $var3
cleanup;