tests: apply os.utime to created symlinks too

Nanosecond precision is not universally available on all platforms. For
example, nixpkgs python is built using Apple SDK 10.12 that does not
have `utimensat`. Because of that, python `os.stat` falls back to
microsecond precision.

This patch applies `os.utime` with zeroed nanoseconds to symlinks
created by the test case, the same way as it is already applied to other
files tested for transfer.
This commit is contained in:
Ihar Hrachyshka 2024-10-03 22:23:12 -04:00
parent 4b22c64059
commit 927c8ff4d8

View file

@ -410,8 +410,10 @@ class TestFileTransmission(BaseTest):
se(f.name)
se(str(s))
os.symlink('/', b/'abssym')
os.utime(b/'abssym', (1234.5, 1234.5), follow_symlinks=False)
se(b/'abssym')
os.symlink('sub/reg', b/'sym')
os.utime(b/'sym', (6789.1, 6789.1), follow_symlinks=False)
se(b/'sym')
with self.run_kitten(list(cmd) + [src, dest]) as pty: