lseek() expects (fd, offset, whence). The test passed (fd, SEEK_SET, 0), which does not conform to the function signature. It should be corrected to (fd, 0, SEEK_SET).