[sheepdog] [PATCH 2/2] tests/func: add 080 to test strict mode
Robin Dong
robin.k.dong at gmail.com
Wed Dec 11 04:32:58 CET 2013
Reviewed-by: Robin Dong <sanbai at taobao.com>
2013/12/10 Liu Yuan <namei.unix at gmail.com>
> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> ---
> tests/functional/080 | 37 +++++++++++++++++++++++++++++++++++++
> tests/functional/080.out | 14 ++++++++++++++
> tests/functional/group | 1 +
> 3 files changed, 52 insertions(+)
> create mode 100755 tests/functional/080
> create mode 100644 tests/functional/080.out
>
> diff --git a/tests/functional/080 b/tests/functional/080
> new file mode 100755
> index 0000000..cf416b5
> --- /dev/null
> +++ b/tests/functional/080
> @@ -0,0 +1,37 @@
> +#!/bin/bash
> +
> +# Test sheep strict mode for write
> +
> +. ./common
> +
> +for i in `seq 0 5`; do
> + _start_sheep $i
> +done
> +
> +_wait_for_sheep 6
> +
> +_cluster_format -c 4:2 -t
> +
> +$DOG vdi create test 10M
> +$DOG node kill 3
> +echo hello | $DOG vdi write test 0 512
> +_vdi_list
> +
> +# Should fail
> +$DOG vdi create test1 10M
> +echo world | $DOG vdi write test 0 512
> +
> +$DOG cluster shutdown
> +sleep 1
> +
> +for i in 0 1 2 4 5; do
> + _start_sheep $i
> +done
> +
> +_wait_for_sheep 5
> +
> +# Should fail
> +$DOG vdi create test1 10M
> +echo world | $DOG vdi write test 0 512
> +
> +_vdi_list
> diff --git a/tests/functional/080.out b/tests/functional/080.out
> new file mode 100644
> index 0000000..01c116b
> --- /dev/null
> +++ b/tests/functional/080.out
> @@ -0,0 +1,14 @@
> +QA output created by 080
> +using backend plain store
> +Failed to write object 7c2b2500000000: IO has halted as there are not
> enough living nodes
> +Failed to write VDI
> + Name Id Size Used Shared Creation time VDI id
> Copies Tag
> + test 0 10 MB 0.0 MB 0.0 MB DATE 7c2b25 6
> +Failed to create VDI test1: Failed to write to requested VDI
> +Failed to write object 7c2b2500000000: IO has halted as there are not
> enough living nodes
> +Failed to write VDI
> +Failed to create VDI test1: Failed to write to requested VDI
> +Failed to write object 7c2b2500000000: IO has halted as there are not
> enough living nodes
> +Failed to write VDI
> + Name Id Size Used Shared Creation time VDI id
> Copies Tag
> + test 0 10 MB 0.0 MB 0.0 MB DATE 7c2b25 6
> diff --git a/tests/functional/group b/tests/functional/group
> index 4de1f73..e999b6f 100644
> --- a/tests/functional/group
> +++ b/tests/functional/group
> @@ -94,3 +94,4 @@
> 077 auto quick vdi
> 078 auto quick vdi md
> 079 auto quick vdi md
> +080 auto quick vdi md
> --
> 1.7.9.5
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
>
--
--
Best Regard
Robin Dong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20131211/1d2c454f/attachment-0004.html>
More information about the sheepdog
mailing list