Skip to content

Resolve "unstable unit tests"

Andrei Pavel requested to merge 3163-unstable-unit-tests into master

Closes #3163 (closed).

  • 8d326813 add EXPECT_EQ_MARGIN and EXPECT_IN_RANGE

  • 8172cafa relax time-senstitive tests in dhcpsrv

  • 84e4be1a relax time-senstitive tests in dhcp[46]

  • b6a62510 fix warnings on modified files

    • ctrl_dhcp4_srv_unittest.cc:145:6: warning: extra ‘;’ after in-class function definition [-Wextra-semi]
    • ctrl_dhcp4_srv_unittest.cc:2172:28: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
    • ctrl_dhcp4_srv_unittest.cc:2191:33: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
    • ctrl_dhcp4_srv_unittest.cc:2295:33: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
    • ctrl_dhcp4_srv_unittest.cc:2352:28: warning: declaration of ‘timeout’ shadows a previous local [-Wshadow]
    • ctrl_dhcp4_srv_unittest.cc:2402:28: warning: declaration of ‘timeout’ shadows a previous local [-Wshadow]
    • ctrl_dhcp6_srv_unittest.cc:116:6: warning: extra ‘;’ after in-class function definition [-Wextra-semi]
    • ctrl_dhcp6_srv_unittest.cc:181:6: warning: extra ‘;’ after in-class function definition [-Wextra-semi]
    • ctrl_dhcp6_srv_unittest.cc:264:10: warning: ‘virtual void {anonymous}::CtrlChannelDhcpv6SrvTest::reset()’ can be marked override [-Wsuggest-override]
    • ctrl_dhcp6_srv_unittest.cc:2210:28: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
    • ctrl_dhcp6_srv_unittest.cc:2229:33: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
    • ctrl_dhcp6_srv_unittest.cc:2333:33: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
    • ctrl_dhcp6_srv_unittest.cc:2390:28: warning: declaration of ‘timeout’ shadows a previous local [-Wshadow]
    • ctrl_dhcp6_srv_unittest.cc:2440:28: warning: declaration of ‘timeout’ shadows a previous local [-Wshadow]
    • dhcp6_srv_unittest.cc:2420:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
    • dhcp6_srv_unittest.cc:2440:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
    • dhcp6_srv_unittest.cc:2932:28: warning: useless cast to type ‘const uint8_t*’ {aka ‘const unsigned char*’} [-Wuseless-cast]
    • dhcp6_srv_unittest.cc:2964:26: warning: useless cast to type ‘const uint8_t*’ {aka ‘const unsigned char*’} [-Wuseless-cast]

Ran https://jenkins.aws.isc.org/view/Kea-manual/job/kea-manual/job/ut-extended/294/. No unit test failures.

  • ccbb66cb EXPECT_EQ_MARGIN -> EXPECT_NEAR

  • fa9bf66c remove EXPECT_EQ_MARGIN, EXPECT_IN_RANGE

    They're longer used. Replaced with the official EXPECT_NEAR.

Ran again: https://jenkins.aws.isc.org/view/Kea-manual/job/kea-manual/job/ut-extended/295/

Edited by Andrei Pavel

Merge request reports