add functional test on exit code
add functional test on failure reporting