summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bugs/bug-808400-dist.t23
-rwxr-xr-xtests/bugs/bug-808400-repl.t24
-rwxr-xr-xtests/bugs/bug-808400-stripe.t23
-rwxr-xr-xtests/bugs/bug-808400.t23
-rwxr-xr-xtests/bugs/bug-834465.t16
-rwxr-xr-xtests/bugs/bug-858242.t23
-rw-r--r--tests/bugs/bug-869724.t24
-rw-r--r--tests/include.rc22
8 files changed, 22 insertions, 156 deletions
diff --git a/tests/bugs/bug-808400-dist.t b/tests/bugs/bug-808400-dist.t
index a404cdba9..6a29eb626 100755
--- a/tests/bugs/bug-808400-dist.t
+++ b/tests/bugs/bug-808400-dist.t
@@ -8,14 +8,6 @@ TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
-function volinfo_field()
-{
- local vol=$1;
- local field=$2;
-
- $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
-}
-
TEST $CLI volume create $V0 $H0:$B0/brick1 $H0:$B0/brick2;
EXPECT 'Created' volinfo_field $V0 'Status';
@@ -25,21 +17,6 @@ EXPECT 'Started' volinfo_field $V0 'Status';
MOUNTDIR=$M0;
TEST glusterfs --entry-timeout=0 --attribute-timeout=0 --volfile-server=$H0 --volfile-id=$V0 $MOUNTDIR;
-function cleanup_tester ()
-{
- local exe=$1
- rm -f $exe
-}
-
-function build_tester ()
-{
- local cfile=$1
- local fname=$(basename "$cfile")
- local ext="${fname##*.}"
- local execname="${fname%.*}"
- gcc -g -o $(dirname $cfile)/$execname $cfile
-}
-
build_tester $(dirname $0)/bug-808400-flock.c
build_tester $(dirname $0)/bug-808400-fcntl.c
diff --git a/tests/bugs/bug-808400-repl.t b/tests/bugs/bug-808400-repl.t
index d11bd2504..69cd9379b 100755
--- a/tests/bugs/bug-808400-repl.t
+++ b/tests/bugs/bug-808400-repl.t
@@ -7,15 +7,6 @@ cleanup;
TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
-
-function volinfo_field()
-{
- local vol=$1;
- local field=$2;
-
- $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
-}
-
TEST $CLI volume create $V0 replica 2 $H0:$B0/brick1 $H0:$B0/brick2;
EXPECT 'Created' volinfo_field $V0 'Status';
@@ -25,21 +16,6 @@ EXPECT 'Started' volinfo_field $V0 'Status';
MOUNTDIR=$M0;
TEST glusterfs --entry-timeout=0 --attribute-timeout=0 --volfile-server=$H0 --volfile-id=$V0 $MOUNTDIR;
-function cleanup_tester ()
-{
- local exe=$1
- rm -f $exe
-}
-
-function build_tester ()
-{
- local cfile=$1
- local fname=$(basename "$cfile")
- local ext="${fname##*.}"
- local execname="${fname%.*}"
- gcc -g -o $(dirname $cfile)/$execname $cfile
-}
-
build_tester $(dirname $0)/bug-808400-flock.c
build_tester $(dirname $0)/bug-808400-fcntl.c
diff --git a/tests/bugs/bug-808400-stripe.t b/tests/bugs/bug-808400-stripe.t
index 3edf7a1f9..3ab6f738e 100755
--- a/tests/bugs/bug-808400-stripe.t
+++ b/tests/bugs/bug-808400-stripe.t
@@ -8,14 +8,6 @@ TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
-function volinfo_field()
-{
- local vol=$1;
- local field=$2;
-
- $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
-}
-
TEST $CLI volume create $V0 stripe 2 $H0:$B0/brick1 $H0:$B0/brick2;
EXPECT 'Created' volinfo_field $V0 'Status';
@@ -25,21 +17,6 @@ EXPECT 'Started' volinfo_field $V0 'Status';
MOUNTDIR=$M0;
TEST glusterfs --entry-timeout=0 --attribute-timeout=0 --volfile-server=$H0 --volfile-id=$V0 $MOUNTDIR;
-function cleanup_tester ()
-{
- local exe=$1
- rm -f $exe
-}
-
-function build_tester ()
-{
- local cfile=$1
- local fname=$(basename "$cfile")
- local ext="${fname##*.}"
- local execname="${fname%.*}"
- gcc -g -o $(dirname $cfile)/$execname $cfile
-}
-
build_tester $(dirname $0)/bug-808400-flock.c
build_tester $(dirname $0)/bug-808400-fcntl.c
diff --git a/tests/bugs/bug-808400.t b/tests/bugs/bug-808400.t
index de6cb602e..49d88afd6 100755
--- a/tests/bugs/bug-808400.t
+++ b/tests/bugs/bug-808400.t
@@ -8,14 +8,6 @@ TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
-function volinfo_field()
-{
- local vol=$1;
- local field=$2;
-
- $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
-}
-
TEST $CLI volume create $V0 $H0:$B0/brick1;
EXPECT 'Created' volinfo_field $V0 'Status';
@@ -27,21 +19,6 @@ TEST MOUNTDIR="/tmp/$RANDOM"
TEST mkdir $MOUNTDIR
TEST glusterfs --entry-timeout=0 --attribute-timeout=0 --volfile-server=$H0 --volfile-id=$V0 $MOUNTDIR;
-function cleanup_tester ()
-{
- local exe=$1
- rm -f $exe
-}
-
-function build_tester ()
-{
- local cfile=$1
- local fname=$(basename "$cfile")
- local ext="${fname##*.}"
- local execname="${fname%.*}"
- gcc -g -o $(dirname $cfile)/$execname $cfile
-}
-
build_tester $(dirname $0)/bug-808400-flock.c
build_tester $(dirname $0)/bug-808400-fcntl.c
diff --git a/tests/bugs/bug-834465.t b/tests/bugs/bug-834465.t
index d2e5f47a3..af7f4bd12 100755
--- a/tests/bugs/bug-834465.t
+++ b/tests/bugs/bug-834465.t
@@ -9,14 +9,6 @@ TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
-function volinfo_field()
-{
- local vol=$1;
- local field=$2;
-
- $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
-}
-
TEST $CLI volume create $V0 $H0:$B0/brick1 $H0:$B0/brick2;
EXPECT 'Created' volinfo_field $V0 'Status';
@@ -34,14 +26,6 @@ then
nalloc1=`grep -A2 "fuse - usage-type 85" $sdump1 | grep num_allocs | cut -d '=' -f2`
fi
-function build_tester ()
-{
- local cfile=$1
- local fname=$(basename "$cfile")
- local execname=$(basename $fname ".c")
- gcc -g -o $(dirname $cfile)/$execname $cfile
-}
-
build_tester $(dirname $0)/bug-834465.c
TEST $(dirname $0)/bug-834465 $M0/testfile
diff --git a/tests/bugs/bug-858242.t b/tests/bugs/bug-858242.t
index 2009ee7e4..e93c2d244 100755
--- a/tests/bugs/bug-858242.t
+++ b/tests/bugs/bug-858242.t
@@ -8,14 +8,6 @@ TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
-function volinfo_field()
-{
- local vol=$1;
- local field=$2;
-
- $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
-}
-
TEST $CLI volume create $V0 $H0:$B0/brick1;
EXPECT 'Created' volinfo_field $V0 'Status';
@@ -27,21 +19,6 @@ TEST $CLI volume set $V0 performance.quick-read off
#mount on a random dir
TEST glusterfs --entry-timeout=3600 --attribute-timeout=3600 -s $H0 --volfile-id=$V0 $M0 --direct-io-mode=yes
-function cleanup_tester ()
-{
- local exe=$1
- rm -f $exe
-}
-
-function build_tester ()
-{
- local cfile=$1
- local fname=$(basename "$cfile")
- local ext="${fname##*.}"
- local execname="${fname%.*}"
- gcc -g -o $(dirname $cfile)/$execname $cfile
-}
-
build_tester $(dirname $0)/bug-858242.c
TEST $(dirname $0)/bug-858242 $M0/testfile $V0
diff --git a/tests/bugs/bug-869724.t b/tests/bugs/bug-869724.t
index 6dfc4060d..eec5d344c 100644
--- a/tests/bugs/bug-869724.t
+++ b/tests/bugs/bug-869724.t
@@ -11,15 +11,6 @@ TEST pidof glusterd
TEST $CLI volume create $V0 $H0:$B0/${V0}1;
-function volinfo_field()
-{
- local vol=$1;
- local field=$2;
-
- $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
-}
-
-
## Verify volume is is created
EXPECT "$V0" volinfo_field $V0 'Volume Name';
EXPECT 'Created' volinfo_field $V0 'Status';
@@ -36,21 +27,6 @@ TEST $CLI volume set $V0 performance.stat-prefetch off;
## Mount FUSE with caching disabled
TEST glusterfs --entry-timeout=0 --attribute-timeout=0 -s $H0 --volfile-id $V0 $M0;
-function cleanup_tester ()
-{
- local exe=$1
- rm -f $exe
-}
-
-function build_tester ()
-{
- local cfile=$1
- local fname=$(basename "$cfile")
- local ext="${fname##*.}"
- local execname="${fname%.*}"
- gcc -g -o $(dirname $cfile)/$execname $cfile
-}
-
touch $M0/test;
build_tester $(dirname $0)/getlk_owner.c
diff --git a/tests/include.rc b/tests/include.rc
index 938207e58..03c615e5e 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -191,6 +191,28 @@ function cleanup()
umount -l $N1 2>/dev/null || true;
}
+function volinfo_field()
+{
+ local vol=$1;
+ local field=$2;
+
+ $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
+}
+
+function cleanup_tester ()
+{
+ local exe=$1
+ rm -f $exe
+}
+
+function build_tester ()
+{
+ local cfile=$1
+ local fname=$(basename "$cfile")
+ local ext="${fname##*.}"
+ local execname="${fname%.*}"
+ gcc -g -o $(dirname $cfile)/$execname $cfile
+}
alias EXPECT='_EXPECT $LINENO'
alias TEST='_TEST $LINENO'