The goal here is to skip the following test steps if the check fails.
Instead of using catch to turn an exception into value, we can just
use spawn-ts and reap-ts to do that. This pattern is useful when we add
in extra check for save / restore check later.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ wei: write commit message ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
}
proc test-guest-migr {g} {
- if {[catch { run-ts . = ts-migrate-support-check + host $g }]} return
+ set to_reap [spawn-ts . = ts-migrate-support-check + host $g]
+ set can_migrate [reap-ts $to_reap]
+ if {!$can_migrate} return
foreach iteration {{} .2} {
run-ts . =$iteration ts-guest-saverestore + host $g