pytest runner convenience symlinks may collide and cause test setup error
Running dnstap
system test with xdist may cause an ERROR
due to a race condition:
__________________________________________ ERROR at setup of test_dnstap_dispatch_socket_addresses __________________________________________
[gw2] linux -- Python 3.11.5 /usr/bin/python
conftest.py:421: in system_test_dir
symlink_dst.symlink_to(os.path.relpath(testdir, start=system_test_root))
/usr/lib/python3.11/pathlib.py:1198: in symlink_to
os.symlink(target, self, target_is_directory)
E FileExistsError: [Errno 17] File exists: 'dnstap_tmp_wtfssttj' -> '/home/tkrizek/git/bind9/bin/tests/system/dnstap_dnstap'
This happens because tests_sh_dnstap.py
and tests_dnstap.py
modules attempted to both create dnstap_dnstap
symlink to the temporary directory at the same time. The python module name should be adjusted to avoid the name clash. This may affect other system tests as well and should be fixed if that's the case.
This is a followup for #4252 (closed)
Edited by Nicki Křížek