master - tests: slow down devs for raid more
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b92a9c3e1ab9972b059ef797136c7e04b4b9368f Commit: b92a9c3e1ab9972b059ef797136c7e04b4b9368f Parent: c64f4447d92c4c8bc72d33a9615ef62fcef41168 Author: Zdenek Kabelac <[email protected]> AuthorDate: Wed Jan 4 16:02:08 2017 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Jan 5 15:54:14 2017 +0100
tests: slow down devs for raid more
Since we still experience occasiaonal test failure - slow things down even more to avoid race.
Add support for 'quick' table changes between normal & delayed tables.
--- test/lib/aux.sh | 25 +++++++++++++ test/shell/lvchange-rebuild-raid.sh | 68 ++++++++++++++++------------------ 2 files changed, 57 insertions(+), 36 deletions(-)
test/lib/aux.sh +25 -0
@@ -975,6 +975,31 @@ enable_dev() { done } +# Once there is $name.devtable +# this is a quick way to restore to this table entry +restore_from_devtable() { + local dev + local silent + + if test "$1" = "--silent"; then + silent=1 + shift + fi + + rm -f debug.log strace.log + init_udev_transaction + for dev in "$@"; do + local name=$(echo "$dev" | sed -e 's,.*/,,') + dmsetup load "$name" "$name.devtable" + dmsetup resume "$name" + done + finish_udev_transaction + + test -n "$silent" || for dev in "$@"; do + notify_lvmetad "$dev" + done +} + # # Convert device to device with errors # Takes the list of pairs of error segment from:len
test/shell/lvchange-rebuild-raid.sh +32 -36
157 lines not on this page · raw message