[sheepdog] [PATCH v2 2/4] tests/functional: use _requirements to control md tests
Liu Yuan
namei.unix at gmail.com
Wed Aug 14 11:15:48 CEST 2013
On Tue, Aug 13, 2013 at 01:37:38PM +0900, MORITA Kazutaka wrote:
> From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
>
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
> tests/functional/010 | 2 +
> tests/functional/027 | 2 +
> tests/functional/032 | 2 +
> tests/functional/033 | 2 +
> tests/functional/042 | 2 +-
> tests/functional/043 | 2 +
> tests/functional/048 | 2 +
> tests/functional/055 | 2 +-
> tests/functional/056 | 2 +-
> tests/functional/057 | 2 +-
> tests/functional/063 | 2 +-
> tests/functional/064 | 2 +-
> tests/functional/067 | 2 +
> tests/functional/068 | 2 +
> tests/functional/072 | 2 +-
> tests/functional/common.rc | 5 ++
> tests/functional/group | 123 ++++++++++++++++++++++----------------------
> 17 files changed, 89 insertions(+), 69 deletions(-)
>
> diff --git a/tests/functional/010 b/tests/functional/010
> index d050941..4e98545 100755
> --- a/tests/functional/010
> +++ b/tests/functional/010
> @@ -4,6 +4,8 @@
>
> . ./common
>
> +_requirement not_md
> +
> for i in `seq 0 4`; do
> _start_sheep $i
> done
> diff --git a/tests/functional/027 b/tests/functional/027
> index e851e69..d9eb14a 100755
> --- a/tests/functional/027
> +++ b/tests/functional/027
> @@ -4,6 +4,8 @@
>
> . ./common
>
> +_requirement not_md
> +
> for i in `seq 0 3`; do
> _start_sheep $i
> done
> diff --git a/tests/functional/032 b/tests/functional/032
> index 467a402..5fcda38 100755
> --- a/tests/functional/032
> +++ b/tests/functional/032
> @@ -4,6 +4,8 @@
>
> . ./common
>
> +_requirement not_md
> +
> for i in `seq 0 7`; do
> _start_sheep $i
> done
> diff --git a/tests/functional/033 b/tests/functional/033
> index d752c5d..88a5960 100755
> --- a/tests/functional/033
> +++ b/tests/functional/033
> @@ -4,6 +4,8 @@
>
> . ./common
>
> +_requirement not_md
> +
> for i in `seq 0 7`; do
> _start_sheep $i
> done
> diff --git a/tests/functional/042 b/tests/functional/042
> index 6ceb5f1..571c501 100755
> --- a/tests/functional/042
> +++ b/tests/functional/042
> @@ -4,7 +4,7 @@
>
> . ./common
>
> -_requirement root
> +_requirement root not_md
>
> _make_device 0 $((1024 ** 3))
> _make_device 1 $((1024 ** 3))
> diff --git a/tests/functional/043 b/tests/functional/043
> index d336cf5..a593bce 100755
> --- a/tests/functional/043
> +++ b/tests/functional/043
> @@ -4,6 +4,8 @@
>
> . ./common
>
> +_requirement not_md
> +
> for i in `seq 0 4`; do
> _start_sheep $i
> done
> diff --git a/tests/functional/048 b/tests/functional/048
> index c487704..7565a9a 100755
> --- a/tests/functional/048
> +++ b/tests/functional/048
> @@ -4,6 +4,8 @@
>
> . ./common
>
> +_requirement not_md
> +
> for i in 0 1 2; do
> _start_sheep $i
> done
> diff --git a/tests/functional/055 b/tests/functional/055
> index ac54011..d293a37 100755
> --- a/tests/functional/055
> +++ b/tests/functional/055
> @@ -4,7 +4,7 @@
>
> . ./common
>
> -MD=true
> +_requirement md
>
> for i in 0 1 2; do
> _start_sheep $i
> diff --git a/tests/functional/056 b/tests/functional/056
> index 9530a6d..70ceb4e 100755
> --- a/tests/functional/056
> +++ b/tests/functional/056
> @@ -4,7 +4,7 @@
>
> . ./common
>
> -MD=true
> +_requirement md
>
> for i in 0 1 2; do
> _start_sheep $i
> diff --git a/tests/functional/057 b/tests/functional/057
> index d1c95f5..7085d56 100755
> --- a/tests/functional/057
> +++ b/tests/functional/057
> @@ -4,7 +4,7 @@
>
> . ./common
>
> -MD=true
> +_requirement md
>
> if [ "$STORE" != "/tmp/sheepdog/057" ]; then
> _notrun "This test cannot be run when WD is manually set"
> diff --git a/tests/functional/063 b/tests/functional/063
> index 2f817e4..d2cddd8 100755
> --- a/tests/functional/063
> +++ b/tests/functional/063
> @@ -3,7 +3,7 @@
> # Test reweight
> . ./common
>
> -_requirement root
> +_requirement root not_md
>
> _make_device 0 $((100 * 1024 ** 2))
> _make_device 1 $((100 * 1024 ** 2))
> diff --git a/tests/functional/064 b/tests/functional/064
> index d712d62..7af2300 100755
> --- a/tests/functional/064
> +++ b/tests/functional/064
> @@ -3,7 +3,7 @@
> # Test node failure while reweighting
> . ./common
>
> -_requirement root
> +_requirement root not_md
>
> _make_device 0 $((200 * 1024 ** 2)) # 200 MB
> _make_device 1 $((200 * 1024 ** 2)) # 200 MB
> diff --git a/tests/functional/067 b/tests/functional/067
> index 8b309ef..8ae6c63 100755
> --- a/tests/functional/067
> +++ b/tests/functional/067
> @@ -4,6 +4,8 @@
>
> . ./common
>
> +_requirement not_md
> +
> for i in 0 1 2; do
> _start_sheep $i
> done
> diff --git a/tests/functional/068 b/tests/functional/068
> index 7d53d63..40cb15d 100755
> --- a/tests/functional/068
> +++ b/tests/functional/068
> @@ -4,6 +4,8 @@
>
> . ./common
>
> +_requirement not_md
> +
> for i in 0 1 2; do
> _start_sheep $i
> done
> diff --git a/tests/functional/072 b/tests/functional/072
> index 4f7a7c3..5b6ba2e 100755
> --- a/tests/functional/072
> +++ b/tests/functional/072
> @@ -4,7 +4,7 @@
>
> . ./common
>
> -MD=false
> +_requirement not_md
>
> for i in 0 1; do
> _start_sheep $i
> diff --git a/tests/functional/common.rc b/tests/functional/common.rc
> index ae279e5..52aae79 100644
> --- a/tests/functional/common.rc
> +++ b/tests/functional/common.rc
> @@ -36,6 +36,11 @@ _check_root()
> [ "$id" -eq 0 ]
> }
>
> +_check_md()
> +{
> + $MD
> +}
> +
> _requirement()
> {
> local arg
> diff --git a/tests/functional/group b/tests/functional/group
> index 1749e13..36f06b2 100644
> --- a/tests/functional/group
> +++ b/tests/functional/group
> @@ -11,78 +11,77 @@
> # cluster: cluster drivers tests: join/leave/etc
> # store: basic data integrity
> # vdi: qemu I/O, snapshots, volume creation and deletion
> -# dog: check dog commands
> -# md: multi-disk tests
> +# dog: check dog commands
> #
> -001 auto quick cluster md
> -002 auto quick cluster md
> -003 auto quick cluster md
> -004 auto quick cluster md
> -005 auto quick cluster md
> -006 auto quick cluster md
> -007 auto quick cluster md
> -008 auto store md
> -009 auto quick store md
> +001 auto quick cluster
> +002 auto quick cluster
> +003 auto quick cluster
> +004 auto quick cluster
> +005 auto quick cluster
> +006 auto quick cluster
> +007 auto quick cluster
> +008 auto store
> +009 auto quick store
> 010 auto quick store
> -011 auto quick store md
> -012 auto quick store md
> -013 auto quick vdi md
> -014 auto quick vdi md
> -015 auto quick vdi md
> -016 auto quick vdi md
> -017 auto quick vdi md
> -018 auto quick cache md
> -019 auto quick cache md
> -020 auto quick cache md
> -021 auto quick cluster md
> -022 auto quick cluster md
> -023 auto quick cluster md
> -024 auto quick cluster md
> -025 auto quick cluster md
> -026 auto quick vdi md
> +011 auto quick store
> +012 auto quick store
> +013 auto quick vdi
> +014 auto quick vdi
> +015 auto quick vdi
> +016 auto quick vdi
> +017 auto quick vdi
> +018 auto quick cache
> +019 auto quick cache
> +020 auto quick cache
> +021 auto quick cluster
> +022 auto quick cluster
> +023 auto quick cluster
> +024 auto quick cluster
> +025 auto quick cluster
> +026 auto quick vdi
> 027 auto quick store
> -028 auto quick store md
> -029 auto quick vdi md
> -030 auto quick store md
> -031 auto quick vdi md
> +028 auto quick store
> +029 auto quick vdi
> +030 auto quick store
> +031 auto quick vdi
> 032 auto quick store
> 033 auto quick store
> -034 auto quick store md
> -035 auto quick cluster md
> -036 auto quick cluster md
> -037 auto quick cluster md
> -038 auto quick cluster md
> -039 auto quick vdi md
> -040 auto quick cluste md
> -041 auto quick vdi md
> +034 auto quick store
> +035 auto quick cluster
> +036 auto quick cluster
> +037 auto quick cluster
> +038 auto quick cluster
> +039 auto quick vdi
> +040 auto quick cluste
> +041 auto quick vdi
> 042 auto quick store
> 043 auto quick store
> -044 auto quick vdi md
> -045 auto quick store md
> -046 auto quick vdi md
> -047 auto quick vdi md
> +044 auto quick vdi
> +045 auto quick store
> +046 auto quick vdi
> +047 auto quick vdi
> 048 auto quick dog
> -049 auto quick cache md
> -050 auto quick cluster md
> -051 auto quick cluster md
> -052 auto quick cluster md
> -053 auto quick cluster md
> -054 auto quick cluster md
> -055 auto cluster md
> -056 auto quick cluster md
> -057 auto quick cluster md
> -058 auto quick cluster md
> -059 auto quick vdi md
> -060 auto quick cluster md
> -061 auto quick cluster md
> -062 auto quick cluster md
> +049 auto quick cache
> +050 auto quick cluster
> +051 auto quick cluster
> +052 auto quick cluster
> +053 auto quick cluster
> +054 auto quick cluster
> +055 auto cluster
> +056 auto quick cluster
> +057 auto quick cluster
> +058 auto quick cluster
> +059 auto quick vdi
> +060 auto quick cluster
> +061 auto quick cluster
> +062 auto quick cluster
> 063 auto quick cluster
> 064 auto quick cluster
> -065 auto quick cluster md
> -066 auto quick cluster md
> +065 auto quick cluster
> +066 auto quick cluster
> 067 auto quick cluster
> 068 auto quick cluster
> -069 auto quick cluster md
> -070 auto quick cluster md
> -071 auto quick store md
> +069 auto quick cluster
> +070 auto quick cluster
> +071 auto quick store
> 072 auto quick store
> --
> 1.7.9.5
>
This means we have to pass -md to check to test md test cases, I think current
approach(set md=true in some md-only tests) is better than it.
Thanks
Yuan
More information about the sheepdog
mailing list