tests: Fix printf compiler warning for an error case.