Fix test refactoring issues for Linux.