Rencache unit test can fail on very slow system
The test uses a time in the "future" that is the maximum acceptable skew clock plus 10 seconds:
static const int TIME_IN_THE_FUTURE = REND_CACHE_MAX_SKEW + 10;
When using this time for a descriptor and trying to store it in the cache, we should have an error (expected) since it's too far away in the future thus rejected. However, on very slow system such as armel
, we've sometime noticed test failure because it would take more than 10 seconds to reach the check in rendcache.c
using the store function:
if (parsed->timestamp > now + REND_CACHE_MAX_SKEW) {
[...]
goto err
}
Which results in a success if we take more than 10 seconds to get there.
This has been reported by weasel and he tested a patch to increase that extra time to 60 seconds which seems to fix the issue:
OK: 1122; FAIL: 0
Branch coming up.