selftest: Print reason when a test fails unexpectedly