tests: Fix error reporting on prlimit() call failure