diff options
author | hari gowtham <hgowtham@redhat.com> | 2017-02-10 13:00:16 +0530 |
---|---|---|
committer | Raghavendra Talur <rtalur@redhat.com> | 2017-04-10 05:30:44 -0400 |
commit | 44b1a68bc9bc1605d208d50fbafae85967085e58 (patch) | |
tree | 01fc330bdc0ec6355c6fadcfa75caf725f563d04 | |
parent | 788def7912c68616849748678574c60a52021e3c (diff) |
TIER/TESTS: improving regression test for tier
The test files that were marked as bad test were checked and
updated for centos. The tests that had issue were fixed.
Tests that aren't needed anymore are removed.
REASON:
tests/basic/tier/tier-file-create.t
This test checks one line after creating a tiered volume (which
is done in every tier test). So this line is moved along with
other test in tier and the file is deleted.
tests/bugs/tier/bug-1286974.t
This bug checks for the tier as a task and tier has been moved
from a task to service as a part of the tier as a service patch
https://review.gluster.org/#/c/13365/
So it is removed from bad tests.
tests/basic/tier/record-metadata-heat.t
This test had a bug and has been fixed.
tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t
tests/basic/tier/fops-during-migration.t
tests/basic/tier/tier-snapshot.t
tests/basic/tier/tier_lookup_heal.t
These test seem to work fine on centos now.
Change-Id: I05537f4bbb91584410177ce43543897eff8761a1
BUG: 1421600
Signed-off-by: hari gowtham <hgowtham@redhat.com>
Reviewed-on: https://review.gluster.org/16605
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: hari gowtham <hari.gowtham005@gmail.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
-rwxr-xr-x | tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t | 4 | ||||
-rwxr-xr-x | tests/basic/tier/fops-during-migration.t | 5 | ||||
-rwxr-xr-x | tests/basic/tier/record-metadata-heat.t | 12 | ||||
-rw-r--r-- | tests/basic/tier/tier-file-create.t | 61 | ||||
-rw-r--r-- | tests/basic/tier/tier-snapshot.t | 3 | ||||
-rwxr-xr-x | tests/basic/tier/tier_lookup_heal.t | 5 | ||||
-rw-r--r-- | tests/bugs/tier/bug-1286974.t | 73 |
7 files changed, 12 insertions, 151 deletions
diff --git a/tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t b/tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t index f1715364e36..7ab8ac3e8f2 100755 --- a/tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t +++ b/tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t @@ -20,7 +20,6 @@ cleanup TEST glusterd -TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0..$LAST_BRICK} TEST $CLI volume start $V0 @@ -57,7 +56,6 @@ EXPECT "0" confirm_tier_removed ${V0}${CACHE_BRICK_FIRST} EXPECT_WITHIN $REBALANCE_TIMEOUT "0" confirm_vol_stopped $V0 +cleanup; -cleanup #G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000 -#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000 diff --git a/tests/basic/tier/fops-during-migration.t b/tests/basic/tier/fops-during-migration.t index 4be05acb357..cd3109f0888 100755 --- a/tests/basic/tier/fops-during-migration.t +++ b/tests/basic/tier/fops-during-migration.t @@ -51,9 +51,6 @@ cleanup; #Basic checks TEST glusterd -TEST pidof glusterd -TEST $CLI volume info - #Create and start a tiered volume create_dist_tier_vol $NUM_BRICKS @@ -103,5 +100,5 @@ EXPECT "1" check_file_content $M0/dir1/FILE1 "$TEST_STR" TEST getfattr -n "user.test_xattr" $M0/dir1/FILE1 cleanup; + #G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000 -#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000 diff --git a/tests/basic/tier/record-metadata-heat.t b/tests/basic/tier/record-metadata-heat.t index d4481371f68..44dda56a038 100755 --- a/tests/basic/tier/record-metadata-heat.t +++ b/tests/basic/tier/record-metadata-heat.t @@ -24,6 +24,7 @@ function create_dist_tier_vol () { TEST $CLI volume set $V0 features.ctr-enabled on TEST $CLI volume start $V0 TEST $CLI volume attach-tier $V0 $H0:$B0/hot/${V0}{0..$1} + TEST $CLI volume set $V0 cluster.tier-mode test TEST $CLI volume set $V0 cluster.tier-demote-frequency $DEMOTE_FREQ TEST $CLI volume set $V0 cluster.tier-promote-frequency $PROMOTE_FREQ TEST $CLI volume set $V0 cluster.read-freq-threshold 4 @@ -35,9 +36,6 @@ cleanup; #Basic checks TEST glusterd -TEST pidof glusterd -TEST $CLI volume info - #Create and start a tiered volume create_dist_tier_vol $NUM_BRICKS @@ -53,6 +51,12 @@ touch "$M0/$FILE" HPATH=`find $B0/hot/ -name "$FILE"` echo "File path on hot tier: "$HPATH +############################################ +# as per the changes on b8b050c3 +# To test the xttr set by EC +TEST ! getfattr -n "trusted.ec.size" $HPATH +############################################ + # Expecting the file to be on the hot tier EXPECT "yes" exists_and_regular_file $HPATH @@ -98,5 +102,5 @@ echo "File path on hot tier: "$HPATH EXPECT "yes" exists_and_regular_file $HPATH cleanup; + #G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000 -#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000 diff --git a/tests/basic/tier/tier-file-create.t b/tests/basic/tier/tier-file-create.t deleted file mode 100644 index 06f0e241502..00000000000 --- a/tests/basic/tier/tier-file-create.t +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc -. $(dirname $0)/../../tier.rc - - -NUM_BRICKS=3 -DEMOTE_FREQ=5 -PROMOTE_FREQ=5 - - - -# Creates a tiered volume with pure distribute hot and cold tiers -# Both hot and cold tiers will have an equal number of bricks. - -function create_dist_tier_vol () { - mkdir $B0/cold - mkdir $B0/hot - TEST $CLI volume create $V0 disperse 6 disperse-data 4 $H0:$B0/cold/${V0}{1..12} - TEST $CLI volume set $V0 performance.quick-read off - TEST $CLI volume set $V0 performance.io-cache off - TEST $CLI volume set $V0 features.ctr-enabled on - TEST $CLI volume start $V0 - TEST $CLI volume attach-tier $V0 replica 2 $H0:$B0/hot/${V0}{0..$1} - TEST $CLI volume set $V0 cluster.tier-demote-frequency $DEMOTE_FREQ - TEST $CLI volume set $V0 cluster.tier-promote-frequency $PROMOTE_FREQ - TEST $CLI volume set $V0 cluster.read-freq-threshold 0 - TEST $CLI volume set $V0 cluster.write-freq-threshold 0 - TEST $CLI volume set $V0 cluster.tier-mode test -} - - -cleanup; - -#Basic checks -TEST glusterd -TEST pidof glusterd -TEST $CLI volume info - - -#Create and start a tiered volume -create_dist_tier_vol $NUM_BRICKS - -# Mount FUSE -TEST glusterfs -s $H0 --volfile-id $V0 $M0 - -cd $M0 - -touch FILE1 - -HPATH=`find $B0/hot/ -name FILE1 | cut -d " " -f1` -echo $HPATH - -TEST ! getfattr -n "trusted.ec.size" $HPATH -cd - -cleanup; - -#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000 -#G_TESTDEF_TEST_STATUS_CENTOS6=KNOWN_ISSUE,BUG=1315560 diff --git a/tests/basic/tier/tier-snapshot.t b/tests/basic/tier/tier-snapshot.t index 6e7951d1963..6d040d711c8 100644 --- a/tests/basic/tier/tier-snapshot.t +++ b/tests/basic/tier/tier-snapshot.t @@ -10,8 +10,6 @@ TEST setup_lvm 4; TEST glusterd; -TEST pidof glusterd; - TEST $CLI volume create $V0 replica 2 $H0:$L1 $H0:$L2 ; TEST $CLI volume start $V0; @@ -47,4 +45,3 @@ TEST $CLI snapshot delete all; cleanup; #G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000 -#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000 diff --git a/tests/basic/tier/tier_lookup_heal.t b/tests/basic/tier/tier_lookup_heal.t index 825f81db392..7dac1fdf1ec 100755 --- a/tests/basic/tier/tier_lookup_heal.t +++ b/tests/basic/tier/tier_lookup_heal.t @@ -25,7 +25,6 @@ cleanup TEST glusterd -TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0..$LAST_BRICK} TEST $CLI volume start $V0 @@ -71,6 +70,6 @@ EXPECT_WITHIN $PROMOTE_TIMEOUT "0" file_on_fast_tier file1 cd; -cleanup +cleanup; + #G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000 -#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000 diff --git a/tests/bugs/tier/bug-1286974.t b/tests/bugs/tier/bug-1286974.t deleted file mode 100644 index 1df837c9d83..00000000000 --- a/tests/bugs/tier/bug-1286974.t +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc -. $(dirname $0)/../../tier.rc - - -NUM_BRICKS=3 -DEMOTE_FREQ=5 -PROMOTE_FREQ=5 - - - -# Creates a tiered volume with pure distribute hot and cold tiers -# Both hot and cold tiers will have an equal number of bricks. - -function create_dist_tier_vol () { - mkdir $B0/cold - mkdir $B0/hot - TEST $CLI volume create $V0 disperse 6 disperse-data 4 $H0:$B0/cold/${V0}{1..12} - TEST $CLI volume set $V0 performance.quick-read off - TEST $CLI volume set $V0 performance.io-cache off - TEST $CLI volume set $V0 features.ctr-enabled on - TEST $CLI volume start $V0 - TEST $CLI volume attach-tier $V0 replica 2 $H0:$B0/hot/${V0}{0..$1} - TEST $CLI volume set $V0 cluster.tier-demote-frequency $DEMOTE_FREQ - TEST $CLI volume set $V0 cluster.tier-promote-frequency $PROMOTE_FREQ - TEST $CLI volume set $V0 cluster.read-freq-threshold 0 - TEST $CLI volume set $V0 cluster.write-freq-threshold 0 - TEST $CLI volume set $V0 cluster.tier-mode test -} - -function tier_task_name () { - local task_name=$1; - $CLI volume status $V0 task | grep "$task_name"; - echo $?; -} - -cleanup; - -#Basic checks -TEST glusterd -TEST pidof glusterd -TEST $CLI volume info - - -#Create and start a tiered volume -create_dist_tier_vol $NUM_BRICKS - -# Mount FUSE -TEST glusterfs -s $H0 --volfile-id $V0 $M0 - -TEST touch /mnt/glusterfs/0/file{1..100}; - -EXPECT "0" tier_task_name "Tier migration"; - -TEST $CLI volume tier $V0 detach start - -EXPECT "0" tier_task_name "Detach tier"; - -TEST $CLI volume stop $V0 force; - -TEST $CLI volume start $V0 force; - -EXPECT "0" tier_task_name "Detach tier"; - -TEST $CLI volume tier $V0 detach stop - -EXPECT "0" tier_task_name "Tier migration"; - -cleanup; -#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000 -#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000 |