See the discussion in PR https://github.com/llvm/llvm-project/pull/131650 on why we need to clear the errno at the beginning of some tests, and outlining the various solutions. Introduce ErrnoCheckingTest base class and use it for unlink_test as an example.