diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2014-12-20 08:48:44 +0000 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-12-20 08:48:44 +0000 |
commit | 489bea7ee8e1dbecfa517b8415568044ab57c73a (patch) | |
tree | 44d4878d4c7da3f4908ea9a765ef9b8f9c141756 /tests/check |
mdadm (3.3.2-5) unstable; urgency=medium
* use-tempnode-not-devnode.patch: change udev rules file to use
$tempnode which works both on wheezy and jessie udev, instead
of $devnode which only works in jessie. At this stage it is
better to make rules file compatible with old version instead
of adding versioned dependency. Should be removed for jessie+1.
(Closes: #770883)
* fix Closes: list in previous entry (Closes: #771852)
# imported from the archive
Diffstat (limited to 'tests/check')
-rw-r--r-- | tests/check | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/check b/tests/check new file mode 100644 index 00000000..f4ed6d5b --- /dev/null +++ b/tests/check @@ -0,0 +1,35 @@ + +case $1 in + raid* | linear ) + grep -s "active $1 " /proc/mdstat > /dev/null || { + echo >&2 "ERROR active $1 not found" ; cat /proc/mdstat ; exit 1;} + ;; + resync | recovery ) + sleep 0.1 + grep -s $1 /proc/mdstat > /dev/null || { + echo >&2 ERROR no $1 happening; cat /proc/mdstat; exit 1; } + ;; + + nosync ) + sleep 0.5 + grep -s 're[synccovery]* =' > /dev/null /proc/mdstat && { + echo >&2 "ERROR resync or recovery is happening!"; cat /proc/mdstat ; exit 1; } + ;; + + wait ) + sleep 0.1 + while grep 're[synccovery]* =' > /dev/null /proc/mdstat + do sleep 2; + done + ;; + + state ) + grep -s "blocks.*\[$2\]\$" /proc/mdstat > /dev/null || { + echo >&2 "ERROR state $2 not found!"; cat /proc/mdstat ; exit 1; } + sleep 0.5 + ;; + + * ) echo >&2 ERROR unknown check $1 ; exit 1; +esac + +exit 0 |