check script supports -md option to enable multi disk for functional test. But it seems some test suites are not compatible with it. This patch fixes the problem.
Test suites 010, 027, 032, 033 and 042 are involved. Signed-off-by: Ruoyu <lian...@ucweb.com> --- v3: - rebase on the lastest master v2: - add 027 to patch Signed-off-by: Ruoyu <lian...@ucweb.com> --- tests/functional/010 | 6 ++++-- tests/functional/027 | 2 +- tests/functional/032 | 9 ++++++--- tests/functional/032.out | 6 ------ tests/functional/033 | 9 ++++++--- tests/functional/033.out | 6 ------ tests/functional/042 | 3 ++- tests/functional/common.filter | 5 +++++ 8 files changed, 24 insertions(+), 22 deletions(-) diff --git a/tests/functional/010 b/tests/functional/010 index 580140c..ea2ec82 100755 --- a/tests/functional/010 +++ b/tests/functional/010 @@ -34,7 +34,8 @@ done $DOG cluster recover enable _wait_for_sheep_recovery 0 $DOG cluster info | head -6 | _filter_cluster_info -ls $STORE/*/obj/* | _filter_store | sort +ls $STORE/*/{obj,d[0-9]*}/* 2> /dev/null | \ + _filter_store | _filter_md_store | sort $DOG cluster recover disable for i in 3 4; do @@ -52,5 +53,6 @@ done $DOG cluster recover enable _wait_for_sheep_recovery 0 $DOG cluster info | head -6 | _filter_cluster_info -ls $STORE/*/obj/* | _filter_store | sort +ls $STORE/*/{obj,d[0-9]*}/* 2> /dev/null | \ + _filter_store | _filter_md_store | sort $DOG vdi read test 0 32m | md5sum diff --git a/tests/functional/027 b/tests/functional/027 index 5fae5a1..c620bca 100755 --- a/tests/functional/027 +++ b/tests/functional/027 @@ -19,4 +19,4 @@ _kill_sheep 1 _wait_for_sheep_recovery 0 -find $STORE -name '80fd32fc00000000' | _filter_store | sort +find $STORE -name '80fd32fc00000000' | _filter_store | _filter_md_store | sort diff --git a/tests/functional/032 b/tests/functional/032 index 4b65c5d..549e866 100755 --- a/tests/functional/032 +++ b/tests/functional/032 @@ -37,10 +37,13 @@ done _wait_for_sheep 8 _wait_for_sheep_recovery 0 -ls $STORE/*/obj/807c2b2500000000 | _filter_store | sort +ls $STORE/*/{obj,d[0-9]*}/807c2b2500000000 2> /dev/null | \ + _filter_store | _filter_md_store | sort for i in `seq 0 24`; do - ls $STORE/*/obj/007c2b25000000`printf "%02x" $i` | _filter_store | sort + ls $STORE/*/{obj,d[0-9]*}/007c2b25000000`printf "%02x" $i` 2> /dev/null | \ + _filter_store | _filter_md_store | sort done -ls $STORE/*/obj/.stale | _filter_store | sort +ls $STORE/*/{obj,d[0-9]*}/.stale 2> /dev/null | \ + _filter_store | _filter_md_store | sort -u $DOG vdi read test | md5sum diff --git a/tests/functional/032.out b/tests/functional/032.out index 29a47e1..34a312e 100644 --- a/tests/functional/032.out +++ b/tests/functional/032.out @@ -158,12 +158,6 @@ STORE/5/obj/007c2b2500000018 STORE/6/obj/007c2b2500000018 STORE/7/obj/007c2b2500000018 - - - - - - STORE/0/obj/.stale: STORE/1/obj/.stale: STORE/2/obj/.stale: diff --git a/tests/functional/033 b/tests/functional/033 index c352370..a35081e 100755 --- a/tests/functional/033 +++ b/tests/functional/033 @@ -47,10 +47,13 @@ done _wait_for_sheep_recovery 0 -ls $STORE/*/obj/807c2b2500000000 | _filter_store | sort +ls $STORE/*/{obj,d[0-9]*}/807c2b2500000000 2> /dev/null | \ + _filter_store | _filter_md_store | sort for i in `seq 0 24`; do - ls $STORE/*/obj/007c2b25000000`printf "%02x" $i` | _filter_store | sort + ls $STORE/*/{obj,d[0-9]*}/007c2b25000000`printf "%02x" $i` 2> /dev/null | \ + _filter_store | _filter_md_store | sort done -ls $STORE/*/obj/.stale | _filter_store | sort +ls $STORE/*/{obj,d[0-9]*}/.stale 2> /dev/null | \ + _filter_store | _filter_md_store | sort -u $DOG vdi read test | md5sum diff --git a/tests/functional/033.out b/tests/functional/033.out index 88b6c7c..ceae3a4 100644 --- a/tests/functional/033.out +++ b/tests/functional/033.out @@ -80,12 +80,6 @@ STORE/1/obj/007c2b2500000018 STORE/5/obj/007c2b2500000018 STORE/6/obj/007c2b2500000018 - - - - - - STORE/0/obj/.stale: STORE/1/obj/.stale: STORE/2/obj/.stale: diff --git a/tests/functional/042 b/tests/functional/042 index ceb30a6..23431f8 100755 --- a/tests/functional/042 +++ b/tests/functional/042 @@ -46,4 +46,5 @@ for i in `seq 0 3`; do $DOG node list -p 700$i done _node_info -ls $STORE/*/obj/* | _filter_store | sort +ls $STORE/*/{obj,d[0-9]*}/* 2> /dev/null | \ + _filter_store | _filter_md_store | sort diff --git a/tests/functional/common.filter b/tests/functional/common.filter index 83061d7..ae9096f 100644 --- a/tests/functional/common.filter +++ b/tests/functional/common.filter @@ -168,6 +168,11 @@ _filter_store() sed -e "s|$STORE|STORE|g" } +_filter_md_store() +{ + sed -e "s|/d[0-9]*/|/obj/|g" +} + _filter_info() { awk '{if ($2 ~ /^[0-9.]+$/) {$2="MASKED";$6="MASKED";$8="MASTERD"};print $0}' -- 1.8.3.2 -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog