Просмотр исходного кода

tests: work around strange mtime granularity issue on netbsd, fixes #204

not sure where the problem is:
it seems to announce it supports st_mtime_ns, but if one uses it and
has a file with ...123ns, i t gets restored as ...000ns.

Then I tried setting st_mtime_ns_round to -3, but it still failed with +1000ns difference.

Maybe rounding is incorrect and it should be truncating?
Issue with granularity could be in python, in netbsd (netbsd platform code), in ffs filesystem, ...
Thomas Waldmann 10 лет назад
Родитель
Сommit
375717c095
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      borg/testsuite/__init__.py

+ 2 - 0
borg/testsuite/__init__.py

@@ -28,6 +28,8 @@ elif 'HAVE_UTIMES' in sysconfig.get_config_vars():
 else:
     st_mtime_ns_round = -9
 
+if sys.platform.startswith('netbsd'):
+    st_mtime_ns_round = -4  # only >1 microsecond resolution here?
 
 has_mtime_ns = sys.version >= '3.3'
 utime_supports_fd = os.utime in getattr(os, 'supports_fd', {})