diff options
author | Zhilong Liu <zlliu@suse.com> | 2018-02-02 07:10:47 +0100 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2018-03-08 20:29:50 +0100 |
commit | 064bd3f5ca15c58945a2c0e6fcb33eda06bc0f7a (patch) | |
tree | cab66136e7c2ed8a6d3ce7bd2613a8418fe66ad4 /tests/func.sh | |
parent | mdadm/test: add disk metadata infos in save_log (diff) | |
download | mdadm-064bd3f5ca15c58945a2c0e6fcb33eda06bc0f7a.tar.xz mdadm-064bd3f5ca15c58945a2c0e6fcb33eda06bc0f7a.zip |
mdadm/test: add do_clean to ensure each case only catch its own testlog
Signed-off-by: Zhilong Liu <zlliu@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'tests/func.sh')
-rw-r--r-- | tests/func.sh | 8 |
1 files changed, 7 insertions, 1 deletions
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" ] |