Open
Description
#8516 verifies that tmpdir and tmp_path etc. are owned by the user. This fails on filesystems that do not track ownership.
In my use case, I am using Buildbarn's FUSE storage on Linux where ownership is always reported as 0. This has the benefit that actions reading the ownership, e.g. tar
, will be deterministic.
My workaround is to use the following in my test file:
if __name__ == "__main__":
sys.exit(pytest.main([
"--basetemp",
Path(os.environ["TEST_TMPDIR"]),
__file__,
]))
Would it make sense to allow rootdir_stat.st_uid == 0
in src/_pytest/tmpdir.py? An alternative is to disable the check with an environment variable.