syscalls_test.c: check return value of write