From 064bd3f5ca15c58945a2c0e6fcb33eda06bc0f7a Mon Sep 17 00:00:00 2001 From: Zhilong Liu Date: Fri, 2 Feb 2018 14:10:47 +0800 Subject: mdadm/test: add do_clean to ensure each case only catch its own testlog Signed-off-by: Zhilong Liu Signed-off-by: Jes Sorensen --- tests/func.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/func.sh') diff --git a/tests/func.sh b/tests/func.sh index 39580907..a6995f1b 100644 --- a/tests/func.sh +++ b/tests/func.sh @@ -88,6 +88,13 @@ cleanup() { esac } +do_clean() +{ + mdadm -Ss > /dev/null + mdadm --zero $devlist 2> /dev/null + dmesg -c > /dev/null +} + check_env() { user=$(id -un) [ "X$user" != "Xroot" ] && { @@ -141,7 +148,6 @@ do_setup() { check_env [ -d $logdir ] || mkdir -p $logdir - dmesg -c > /dev/null devlist= if [ "$DEVTYPE" == "loop" ] -- cgit v1.2.3