Opened 8 years ago

Closed 6 years ago

#2077 closed enhancement (wontfix)


Reported by: fdupont Owned by:
Priority: medium Milestone: Remaining BIND10 tickets
Component: Unclassified Version: bind10-old
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 3 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


I suggest to add a NO_EXPECT_DEATH C++ compilation flag in order to handle systems where runtime checks are configuration dependent. For instance WIN32 with its Release and Debug versions, here with NO_EXPECT_DEATH for Release only the EXPECT_DEATH() macro of gtest works as expected.

PS: the change is:
#if defined(EXPECT_DEATH) && !defined(NO_EXPECT_DEATH)


Change History (7)

comment:1 Changed 8 years ago by shane

Francis, can you explain more? This doesn't make any sense to me.

comment:2 Changed 8 years ago by fdupont

The idea of EXPECT_DEATH is to handle unittests where a runtime check raises a fatal (so "death") error. The EXPECT_DEATH flag can be in includes (e.g., in the Google test local setup) or in a compilation flag (i.e., part of CXXFLAGS).
My issue is the two ways are not compatible, i.e., when the flag is defined in gtest includes there is no way to disable it at C++ compiler invocation. Usually it doesn't matter because the system is compiled once with the proper environment but it is not the case of Visual Studio which in standard compiles two versions named "Release" and "Debug". Of course it is possible to get the corresponding flags (they are documented) but I prefer to not dig into the Google test stuff. And the Microsoft runtime check system is GREAT: it already caught a lot of bugs, i.e., it is very different from the g++ STL... so I'd like to keep it!
My proposal is to use two flags so it is easily possible to disable the EXPECT_DEATH tests for instance in defining in "Release" configuration only the NO_EXPECT_DEATH flag. BTW it works well and the change is trivial (i.e., as soon as you'll catch the idea you should adopt it :-).

comment:3 follow-up: Changed 8 years ago by vorner

Shouldn't we disable tests completely for the release, then?

comment:4 in reply to: ↑ 3 Changed 8 years ago by fdupont

Replying to vorner:

Shouldn't we disable tests completely for the release, then?

=> if release == the Release|Win32 the answer is yes, if release == the distrib then IMHO it is fine to have this kind of tests...

comment:5 Changed 8 years ago by shane

  • Milestone New Tasks deleted

comment:6 Changed 6 years ago by tomek

  • Milestone set to Remaining BIND10 tickets

comment:7 Changed 6 years ago by tomek

  • Resolution set to wontfix
  • Status changed from new to closed
  • Version set to old-bind10

This issue is related to bind10 code that is no longer part of Kea.

If you are interested in BIND10/Bundy framework or its DNS components,
please check

Closing ticket.

Note: See TracTickets for help on using tickets.