test: Fix exit code on test failure