This commit uses the newly created _file_hash_and_stat master function.
This is especially useful if your master and minion servers are in another datacenter (in my case the ping latency between them is 10ms, which somehow makes it around 40ms to access full file metadata)
This time is now cut in half. Yay!
This prevents git_pillar certificate errors. Additionally, sometimes
/dev/rtc becomes unresponsive which leads the ``hwclock --compare``
command to spin indefinitely, ultimately causing the entire test run to
fail. This changeset uses a SIGALRM handler to abort the hwclock command
if no output is seen within 3 seconds and try a second time. If it times
out the second time as well, then an error will be logged but it will
not be fatal to the test (or hang it indefinitely).
bef5e66 sought to make a PY3 compatibility change, but the attribute
from Python2's cStringIO module is not available via the "fake"
cStringIO which six exposes, as six's cStringIO is just the
cStringIO.StringIO function. The other cStringIO class attributes are
not available via six.
This commit adds a new module with a few functions to get information on
StringIO objects both in Python2 and 3, and modifies the files edited in
bef5e66 to use this new module to determine if the object is a readable
StringIO.
Fixes#39334.
In #39060, some tests were added to check for the hardware clock
getting reset when possible. The test attempted to gate the test
when access to the hardware clock was impossible, but the check
wasn't quite right and caused problems with the resulting tests.
This change makes the `has_settable_hwclock()` function public
in order to make the test gate work correctly. This function
could also be useful at the CLI level.
When running `self.run_function('status._has_settable_hwclock()')`
from the test suite, the return is a string noting that the
function is unavailable. This change allows for the `if not` check
to evaluate the return of the function.