On Oct 11, 2023 / 21:15, Shin'ichiro Kawasaki wrote: [...] > _nvme_requires() is called from _run_test() via requires(). This is before > _call_test() which prepares TMPDIR. I think _setup_nvmet() could be the good > place to set def_file_path. All nvme test cases call it in test(), except > nvme/039. I rethought my comment above. Now it does not look good to have the exception for nvme/039. As another idea, I suggest to replace the global variable def_file_path with a helper function so that the TMPDIR reference happens in test() or test_device() context. I posted this idea as a patch (the first patch in the two patches series). Comments on the patch will be welcome.