test_util_touch_file is racy and *does* fail
Tor's master has a broken test: https://jenkins.torproject.org/job/tor-debian-master-nightly-binaries/630/ARCHITECTURE=i386,SUITE=wily/console ``` 00:30:38 util/get_avail_disk_space: OK 00:30:38 util/touch_file: 00:30:38 FAIL ../src/test/test_util.c:4615: assert(st.st_mtime OP_GE now): 1452299437 vs 1452299438 00:30:38 [touch_file FAILED] 00:30:38 util/pwdb: [forking] OK ``` from test_util.c: ``` const time_t now = time(NULL); struct stat st; write_bytes_to_file(fname, "abc", 3, 1); tt_int_op(0, OP_EQ, stat(fname, &st)); tt_i64_op(st.st_mtime, OP_GE, now); ``` The test is flawed to begin with, there's no guarantee for how much or little time is between the time() call and the write().
issue