[sheepdog] [PATCH v2 2/2] test: add test case for data path with slash

Liu Yuan namei.unix at gmail.com
Mon Jun 16 12:33:04 CEST 2014


On Mon, Jun 16, 2014 at 06:12:47PM +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
> 
>  tests/functional/095     | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/functional/095.out |  2 ++
>  tests/functional/group   |  1 +
>  3 files changed, 52 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..4965ed2
> --- /dev/null
> +++ b/tests/functional/095
> @@ -0,0 +1,49 @@
> +#!/bin/bash
> +
> +# Test disk error handling with full path name
> +
> +. ./common
> +
> +# make different size of devices
> +for i in `seq 0 2`; do
> +	dd if=/dev/zero of=$STORE/big$i.img seek=1048576 bs=1M count=1 &> /dev/null
> +	dd if=/dev/zero of=$STORE/small$i.img seek=512 bs=1M count=1 &> /dev/null
> +
> +	mkops="-t ext4 -q -F -O ^has_journal -I 128 -N 100"
> +	mntops="-o user_xattr"
> +
> +	mkfs $mkops $STORE/big$i.img 2>&1
> +	mkdir -p $STORE/$i/d0
> +	mount -o loop $mntops $STORE/big$i.img $STORE/$i/d0
> +
> +	mkfs $mkops $STORE/small$i.img 2>&1
> +	mkdir -p $STORE/$i/d1
> +	mount -o loop $mntops $STORE/small$i.img $STORE/$i/d1
> +done

use _make_device() to set up loop deivce.

Thanks
Yuan



More information about the sheepdog mailing list