Open Bug 1243238 Opened 9 years ago Updated 1 year ago

Deal with gtest death tests vs. NSS test core dump detection

Categories

(NSS :: Test, defect, P5)

Tracking

(firefox47 affected)

Tracking Status
firefox47 --- affected

People

(Reporter: jld, Unassigned)

References

Details

Something I'm working around in bug 1222665 is that NSS's test running scripts will enable core dumps if possible and detect them and count them as failures (all of which is good; having that as the only way crashes are detected is not so good, but is beyond the scope of this bug). GTest allows “death tests”, which run code and assert that it causes a particular kind of crash or exit (in a forked process or equivalent, so the test can continue). These can be useful to ensure that a particular programming error is caught by assertions, for example. But they cause core dumps, which are flagged as an error. My workaround should be generalized and put into a common location. This will probably wind up meaning NSS_{ASSERT,EXPECT}_DEATH (etc.) macros that insert a RAII guard. It might also be a good place to have a macro for code that's expected to fail an assertion ifdef DEBUG, or have some deterministic non-crashing effect (or, as a special case, no effect) ifndef DEBUG.
Depends on: 1260342
No longer depends on: 1222665

(Belated mass unassign; I no longer work on NSS.)

Assignee: jld → nobody
See Also: → 1751475
Severity: normal → S3
Severity: S3 → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.