[PATCH 05/15] tests: Fix mocking of open()