tests/qtest: check the return value