sanity checks: v6 unit tests tweaks on macOS
macOS 11.2.3 Xcode 12.4 I got twice on three attempts this error:
[ RUN ] RunScriptTest.lease6Recover
../../../../../../../src/hooks/dhcp/run_script/tests/run_script_unittests.cc:731: Failure
Expected: (time(__null)) < (now + 3), actual: 1619475859 vs 1619475859
timeout
[ FAILED ] RunScriptTest.lease6Recover (2355 ms)
and
[ RUN ] RunScriptTest.lease6Decline
../../../../../../../src/hooks/dhcp/run_script/tests/run_script_unittests.cc:731: Failure
Expected: (time(__null)) < (now + 3), actual: 1619520686 vs 1619520686
timeout
[ FAILED ] RunScriptTest.lease6Decline (2127 ms)
Two comments:
- NULL does not exist in C++: please change time(NULL) by time(0)
- the checkScriptResult code obviously requires some rewrites