Fix test_printf build errors (#801)

* Fix test_printf build errors

* Return error code in case of function failure
1 file changed