]> arthur.barton.de Git - bup.git/commitdiff
Stop testing negative timestamps -- they're not necessarily valid.
authorRob Browning <rlb@defaultvalue.org>
Thu, 19 Dec 2013 02:19:19 +0000 (20:19 -0600)
committerRob Browning <rlb@defaultvalue.org>
Thu, 19 Dec 2013 18:24:42 +0000 (12:24 -0600)
Both timevals and timespecs use a time_t for the seconds which POSIX
requires to be an "integer or real-floating type", so unsigned integer
types are perfectly valid.  (See FUSE for example -- though it's not
even using a time_t; at the moment it's just using uint64_t...).

Thanks to Tim Riemenschneider <t.riemenschneider@detco.de> for
reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/t/txstat.py

index e378c75b6180986bc251a33d5ff3ffefe07c276f..d732636a2a9cd7ca7daa25990bf0df4718e1550d 100644 (file)
@@ -61,14 +61,5 @@ def test_timespec_behavior():
         WVPASS(atime_ts[1] == 0 or atime_ts[1] == frac_ts[1])
         WVPASSEQ(mtime_ts[0], 0)
         WVPASS(mtime_ts[1] == 0 or mtime_ts[1] == frac_ts[1])
-        if(mtime_ts[1] == frac_ts[1]):
-            # Sub-second resolution -- check behavior of negative timespecs.
-            neg_ts = (-43, 10**9 / 2)
-            _helpers.bup_utime_ns(path, (neg_ts, neg_ts))
-            st = _helpers.stat(path)
-            atime_ts = st[8]
-            mtime_ts = st[9]
-            WVPASSEQ(atime_ts, neg_ts)
-            WVPASSEQ(mtime_ts, neg_ts)
     finally:
         subprocess.call(['rm', '-rf', tmpdir])