perf tests: Allow reuse of test_file function