Task #2418
closed
Improve ValidatorConfig test suite
Added by Alex Afanasyev almost 10 years ago.
Updated almost 8 years ago.
Description
In ValidatorConfig
test suite:
Ensure certificates written to filesystem are properly cleaned up even in the case the test case is terminated due to a fatal error.
Use UnitTestTimeFixture instead of sleep
.
Ensure SQLite PIB/TPM are clean before executing any test case.
Maybe related:
shijunxiao@m0213:~/ndn-cxx$ rm -rf ~/.ndn
shijunxiao@m0213:~/ndn-cxx$ build/unit-tests
Running 448 test cases...
../tests/unit-tests/security/test-validator-config.cpp(949): error in "MaxKeyTest2": check false failed
unknown location(0): fatal error in "Nrd": std::runtime_error: public key exists
../tests/unit-tests/security/test-validator-config.cpp(1257): last checkpoint
*** 2 failures detected in test suite "ndn-cxx Unit Tests"
The failure in "Nrd" is consistent. The failure in "MaxKeyTest2" only occurred once during the five tests I did.
Ubuntu 12.04 64-bit, ndn-cxx commit:ea71967f812be196a43c7704bf7fcf053f8533a7.
- Blocked by Task #2948: Define new abstraction of Tpm added
- Target version changed from v0.3 to v0.4
At 20150803 conference call, Yingdi says the root cause of this Bug is that test cases are using a SQLite PIB/TPM that may or may not be clean.
After #2926 and #2948, most test cases should be converted to use in-memory PIB/TPM, which would finally solve this Bug.
- Tracker changed from Bug to Task
- Subject changed from Unit test TestValidatorConfig/Nrd intermittently fails to Improve ValidatorConfig test suite
- Description updated (diff)
- Assignee deleted (
Yingdi Yu)
- Target version changed from v0.4 to v0.5
- Estimated time set to 3.00 h
Original title: Unit test TestValidatorConfig/Nrd intermittently fails
Original description:
The test case intermittently fails:
[Exception] - std::runtime_error: Key name already exists: /TestValidatorConfig/Nrd-1/Nrd-2/ksk-1415684132200
== [File] - ../tests/unit-tests/security/test-validator-config.cpp
== [Line] - 1257
The origin of problem is not exactly known (if it is time related, then with UnitTestTimeFixture this error should be persistent, not intermittent).
The solution of this problem is already part of http://gerrit.named-data.net/#/c/1630/, but I'm proposing to make this fix explicit (as a separate commit).
- Blocked by deleted (Task #2926: Refactor KeyChain)
- Blocked by Bug #3645: Checkers in ValidatorConfig directly invoke ValidationFailureCallback added
https://gerrit.named-data.net/3033 patchset3 adds IdentityManagementFixture::saveIdentityCertificate
, which can be used to "ensure certificates written to filesystem are properly cleaned up".
- Status changed from New to Closed
- % Done changed from 0 to 100
This task has been implemented as part of commit:70244f401829bdacbf7f46b9ddc425f596398a6d
Also available in: Atom
PDF