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:
parent
4b22c64059
commit
927c8ff4d8
1 changed files with 2 additions and 0 deletions
|
|
@ -410,8 +410,10 @@ def se(path):
|
||||||
se(f.name)
|
se(f.name)
|
||||||
se(str(s))
|
se(str(s))
|
||||||
os.symlink('/', b/'abssym')
|
os.symlink('/', b/'abssym')
|
||||||
|
os.utime(b/'abssym', (1234.5, 1234.5), follow_symlinks=False)
|
||||||
se(b/'abssym')
|
se(b/'abssym')
|
||||||
os.symlink('sub/reg', b/'sym')
|
os.symlink('sub/reg', b/'sym')
|
||||||
|
os.utime(b/'sym', (6789.1, 6789.1), follow_symlinks=False)
|
||||||
se(b/'sym')
|
se(b/'sym')
|
||||||
|
|
||||||
with self.run_kitten(list(cmd) + [src, dest]) as pty:
|
with self.run_kitten(list(cmd) + [src, dest]) as pty:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue