[sheepdog] [PATCH v3 2/2] test: add test case for data path with slash
Liu Yuan
namei.unix at gmail.com
Tue Jun 17 07:51:28 CEST 2014
On Tue, Jun 17, 2014 at 01:37:30PM +0800, Robin Dong wrote:
> From: Robin Dong <sanbai at taobao.com>
>
> Signed-off-by: Robin Dong <sanbai at taobao.com>
> ---
> v1-->v2:
> 1. remove wrong 'exit' code from test case
> 2. add 095.out
>
> v2-->v3:
> 1. use _make_device() instead of doing dd and mount
>
> tests/functional/095 | 39 +++++++++++++++++++++++++++++++++++++++
> tests/functional/095.out | 2 ++
> tests/functional/group | 1 +
> 3 files changed, 42 insertions(+)
> create mode 100755 tests/functional/095
> create mode 100644 tests/functional/095.out
>
> diff --git a/tests/functional/095 b/tests/functional/095
> new file mode 100755
> index 0000000..7a479a0
> --- /dev/null
> +++ b/tests/functional/095
> @@ -0,0 +1,39 @@
> +#!/bin/bash
> +
> +# Test disk error handling with full path name
> +
> +. ./common
> +
> +# make different size of devices
> +for i in `seq 0 2`; do
> + _make_device $i $((100 * 1024 ** 2))
> + _make_device $i/d0 $((100 * 1024 ** 2))
> + _make_device $i/d1 $((100 * 1024 ** 2))
> +done
> +
> +for i in `seq 0 2`; do
> + $SHEEP $STORE/$i/,$STORE/$i/d0/,$STORE/$i/d1/ -z $i -p $((7000+$i)) -c $DRIVER $SHEEP_OPTIONS
> +done
> +
> +_wait_for_sheep 3
> +
> +_cluster_format -c 2:1
> +
> +_vdi_create test 99M
> +
> +_random | $DOG vdi write test
> +
> +$DOG vdi read test | md5sum > $STORE/csum.1
> +
> +# remove obj directory to occut EIO
> +umount $STORE/0/d0
> +rm -rf $STORE/0/d0
> +
> +$DOG vdi read test | md5sum > $STORE/csum.2
> +
> +diff -u $STORE/csum.1 $STORE/csum.2
> +
> +for i in `seq 0 2`; do
> + umount $STORE/$i/d0 &> /dev/null
> + umount $STORE/$i/d1 &> /dev/null
> +done
you _make_device $i but don't umount it.
Thanks
Yuan
More information about the sheepdog
mailing list