From 0dc6ba8309300b576f56e28dc71fba760b3e52df Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 29 Nov 2012 17:39:36 +0100 Subject: [PATCH] tests: resume devices on background Since some devices may need correct order of their resuming, resume then all on background and wait for finish. --- test/lib/aux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/lib/aux.sh b/test/lib/aux.sh index 7c0c1891d..e3dfdd978 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -98,9 +98,11 @@ teardown_devs_prefixed() { # Resume suspended devices first for dm in $(dm_info suspended,name | grep "^Suspended:.*$prefix"); do echo "dmsetup resume \"${dm#Suspended:}\"" - dmsetup resume "${dm#Suspended:}" || true + dmsetup resume "${dm#Suspended:}" & done + wait + local mounts=( $(grep "$prefix" /proc/mounts | cut -d' ' -f1) ) if test ${#mounts[@]} -gt 0; then test "$stray" -eq 0 || echo "Removing stray mounted devices containing $prefix: ${mounts[@]}"