selftest: detect whether test fails