[PATCH v2 01/19] test: Restore test behaviour on failure