From: Rob Browning Date: Thu, 19 Dec 2013 02:19:19 +0000 (-0600) Subject: Stop testing negative timestamps -- they're not necessarily valid. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=19970cd8edb9762b3e6a83ed77637cdda700f96d;p=packages%2Fb%2Fbup.git Stop testing negative timestamps -- they're not necessarily valid. 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 for reporting the problem. Signed-off-by: Rob Browning --- diff --git a/lib/bup/t/txstat.py b/lib/bup/t/txstat.py index e378c75..d732636 100644 --- a/lib/bup/t/txstat.py +++ b/lib/bup/t/txstat.py @@ -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])