diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/bugs/bug-765230.t | 61 | ||||
-rwxr-xr-x | tests/bugs/bug-770655.t | 168 | ||||
-rwxr-xr-x | tests/bugs/bug-782095.t | 48 | ||||
-rwxr-xr-x | tests/bugs/bug-896431.t | 124 |
4 files changed, 401 insertions, 0 deletions
diff --git a/tests/bugs/bug-765230.t b/tests/bugs/bug-765230.t new file mode 100755 index 00000000000..3f6074741f6 --- /dev/null +++ b/tests/bugs/bug-765230.t @@ -0,0 +1,61 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +## Start and create a volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 replica 2 stripe 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting quota-timeout as 20 +TEST ! $CLI volume set $V0 features.quota-timeout 20 +EXPECT '' volinfo_field $V0 'features.quota-timeout'; + +#### quota-deem-statfs is not available in v3.4, disabling tests involving that for now. +## Enabling features.quota-deem-statfs +#TEST ! $CLI volume set $V0 features.quota-deem-statfs on +#EXPECT '' volinfo_field $V0 'features.quota-deem-statfs' + +## Enabling quota +TEST $CLI volume quota $V0 enable +EXPECT 'on' volinfo_field $V0 'features.quota' + +## Setting quota-timeout as 20 +TEST $CLI volume set $V0 features.quota-timeout 20 +EXPECT '20' volinfo_field $V0 'features.quota-timeout'; + +## Enabling features.quota-deem-statfs +#TEST $CLI volume set $V0 features.quota-deem-statfs on +#EXPECT 'on' volinfo_field $V0 'features.quota-deem-statfs' + +## Disabling quota +TEST $CLI volume quota $V0 disable +EXPECT 'off' volinfo_field $V0 'features.quota' + +## Setting quota-timeout as 30 +TEST ! $CLI volume set $V0 features.quota-timeout 30 +EXPECT '20' volinfo_field $V0 'features.quota-timeout'; + +## Disabling features.quota-deem-statfs +#TEST ! $CLI volume set $V0 features.quota-deem-statfs off +#EXPECT 'on' volinfo_field $V0 'features.quota-deem-statfs' + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; diff --git a/tests/bugs/bug-770655.t b/tests/bugs/bug-770655.t new file mode 100755 index 00000000000..945e323bbc8 --- /dev/null +++ b/tests/bugs/bug-770655.t @@ -0,0 +1,168 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +## Start and create a distribute-replicate volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; +EXPECT 'Distributed-Replicate' volinfo_field $V0 'Type'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting stripe-block-size as 10MB +TEST ! $CLI volume set $V0 stripe-block-size 10MB +EXPECT '' volinfo_field $V0 'cluster.stripe-block-size'; + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; + +## Start and create a replicate volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 replica 8 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; +EXPECT 'Replicate' volinfo_field $V0 'Type'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting stripe-block-size as 10MB +TEST ! $CLI volume set $V0 stripe-block-size 10MB +EXPECT '' volinfo_field $V0 'cluster.stripe-block-size'; + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; + +## Start and create a distribute volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; +EXPECT 'Distribute' volinfo_field $V0 'Type'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting stripe-block-size as 10MB +TEST ! $CLI volume set $V0 stripe-block-size 10MB +EXPECT '' volinfo_field $V0 'cluster.stripe-block-size'; + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; + +## Start and create a stripe volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 stripe 8 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; +EXPECT 'Stripe' volinfo_field $V0 'Type'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting stripe-block-size as 10MB +TEST $CLI volume set $V0 stripe-block-size 10MB +EXPECT '10MB' volinfo_field $V0 'cluster.stripe-block-size'; + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; + +## Start and create a distributed stripe volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 stripe 4 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; +EXPECT 'Distributed-Stripe' volinfo_field $V0 'Type'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting stripe-block-size as 10MB +TEST $CLI volume set $V0 stripe-block-size 10MB +EXPECT '10MB' volinfo_field $V0 'cluster.stripe-block-size'; + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; + +## Start and create a distributed stripe replicate volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 stripe 2 replica 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; +EXPECT 'Distributed-Striped-Replicate' volinfo_field $V0 'Type'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting stripe-block-size as 10MB +TEST $CLI volume set $V0 stripe-block-size 10MB +EXPECT '10MB' volinfo_field $V0 'cluster.stripe-block-size'; + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; diff --git a/tests/bugs/bug-782095.t b/tests/bugs/bug-782095.t new file mode 100755 index 00000000000..a0cea14ee86 --- /dev/null +++ b/tests/bugs/bug-782095.t @@ -0,0 +1,48 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +## Start and create a volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 replica 2 stripe 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting performance cache min size as 2MB +TEST $CLI volume set $V0 performance.cache-min-file-size 2MB +EXPECT '2MB' volinfo_field $V0 'performance.cache-min-file-size'; + +## Setting performance cache max size as 20MB +TEST $CLI volume set $V0 performance.cache-max-file-size 20MB +EXPECT '20MB' volinfo_field $V0 'performance.cache-max-file-size'; + +## Trying to set performance cache min size as 25MB +TEST ! $CLI volume set $V0 performance.cache-min-file-size 25MB +EXPECT '2MB' volinfo_field $V0 'performance.cache-min-file-size'; + +## Able to set performance cache min size as long as its lesser than max size +TEST $CLI volume set $V0 performance.cache-min-file-size 15MB +EXPECT '15MB' volinfo_field $V0 'performance.cache-min-file-size'; + +## Trying it out with only cache-max-file-size in CLI as 10MB +TEST ! $CLI volume set $V0 cache-max-file-size 10MB +EXPECT '20MB' volinfo_field $V0 'performance.cache-max-file-size'; + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; diff --git a/tests/bugs/bug-896431.t b/tests/bugs/bug-896431.t new file mode 100755 index 00000000000..f968e59c1b3 --- /dev/null +++ b/tests/bugs/bug-896431.t @@ -0,0 +1,124 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +## Start and create a volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 replica 2 stripe 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting cluster.subvols-per-directory as -5 +TEST ! $CLI volume set $V0 cluster.subvols-per-directory -5 +EXPECT '' volinfo_field $V0 'cluster.subvols-per-directory'; +TEST ! $CLI volume set $V0 subvols-per-directory -5 +EXPECT '' volinfo_field $V0 'cluster.subvols-per-directory'; + +## Setting cluster.subvols-per-directory as 0 +TEST ! $CLI volume set $V0 cluster.subvols-per-directory 0 +EXPECT '' volinfo_field $V0 'cluster.subvols-per-directory'; +TEST ! $CLI volume set $V0 subvols-per-directory 0 +EXPECT '' volinfo_field $V0 'cluster.subvols-per-directory'; + +## Setting cluster.subvols-per-directory as 4 (the total number of bricks) +TEST ! $CLI volume set $V0 cluster.subvols-per-directory 4 +EXPECT '' volinfo_field $V0 'cluster.subvols-per-directory'; +TEST ! $CLI volume set $V0 subvols-per-directory 4 +EXPECT '' volinfo_field $V0 'cluster.subvols-per-directory'; + +## Setting cluster.subvols-per-directory as 2 (the total number of subvolumes) +TEST $CLI volume set $V0 cluster.subvols-per-directory 2 +EXPECT '2' volinfo_field $V0 'cluster.subvols-per-directory'; + +## Setting cluster.subvols-per-directory as 1 +TEST $CLI volume set $V0 subvols-per-directory 1 +EXPECT '1' volinfo_field $V0 'cluster.subvols-per-directory'; + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; + +## Start and create a pure replicate volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 replica 8 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; +EXPECT 'Replicate' volinfo_field $V0 'Type'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting cluster.subvols-per-directory as 8 for a replicate volume +TEST ! $CLI volume set $V0 cluster.subvols-per-directory 8 +EXPECT '' volinfo_field $V0 'cluster.subvols-per-directory'; +TEST ! $CLI volume set $V0 subvols-per-directory 8 +EXPECT '' volinfo_field $V0 'cluster.subvols-per-directory'; + +## Setting cluster.subvols-per-directory as 1 for a replicate volume +TEST $CLI volume set $V0 cluster.subvols-per-directory 1 +EXPECT '1' volinfo_field $V0 'cluster.subvols-per-directory'; +TEST $CLI volume set $V0 subvols-per-directory 1 +EXPECT '1' volinfo_field $V0 'cluster.subvols-per-directory'; + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; + +## Start and create a pure stripe volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume create $V0 stripe 8 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; + +## Verify volume is created +EXPECT "$V0" volinfo_field $V0 'Volume Name'; +EXPECT 'Created' volinfo_field $V0 'Status'; +EXPECT 'Stripe' volinfo_field $V0 'Type'; + +## Start volume and verify +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +## Setting cluster.subvols-per-directory as 8 for a stripe volume +TEST ! $CLI volume set $V0 cluster.subvols-per-directory 8 +EXPECT '' volinfo_field $V0 'cluster.subvols-per-directory'; +TEST ! $CLI volume set $V0 subvols-per-directory 8 +EXPECT '' volinfo_field $V0 'cluster.subvols-per-directory'; + +## Setting cluster.subvols-per-directory as 1 for a stripe volume +TEST $CLI volume set $V0 cluster.subvols-per-directory 1 +EXPECT '1' volinfo_field $V0 'cluster.subvols-per-directory'; +TEST $CLI volume set $V0 subvols-per-directory 1 +EXPECT '1' volinfo_field $V0 'cluster.subvols-per-directory'; + +## Finish up +TEST $CLI volume stop $V0; +EXPECT 'Stopped' volinfo_field $V0 'Status'; + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; |