test errors of system call