Implement some sandbox unit tests

Compiler error: ignoring return value of ‘ssize_t write(int, const void*, size_t)’