Implement tests for close_nowrite, close_write and delete_self.