Project

General

Profile

Actions

Task #2418

closed

Improve ValidatorConfig test suite

Added by Alex Afanasyev almost 10 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Tests
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
3.00 h

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.


Related issues 2 (0 open2 closed)

Blocked by ndn-cxx - Task #2948: Define new abstraction of TpmClosedYingdi Yu06/24/2015

Actions
Blocked by ndn-cxx - Bug #3645: Checkers in ValidatorConfig directly invoke ValidationFailureCallbackClosedZhiyi Zhang06/08/2016

Actions
Actions #1

Updated by Junxiao Shi almost 10 years ago

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.

Actions #2

Updated by Junxiao Shi over 9 years ago

  • Blocked by Task #2948: Define new abstraction of Tpm added
Actions #3

Updated by Junxiao Shi over 9 years ago

Actions #4

Updated by Junxiao Shi over 9 years ago

  • 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.

Actions #5

Updated by Junxiao Shi over 8 years ago

  • 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).

Actions #6

Updated by Junxiao Shi over 8 years ago

  • Blocked by deleted (Task #2926: Refactor KeyChain)
Actions #7

Updated by Junxiao Shi over 8 years ago

  • Blocked by Bug #3645: Checkers in ValidatorConfig directly invoke ValidationFailureCallback added
Actions #8

Updated by Junxiao Shi over 8 years ago

https://gerrit.named-data.net/3033 patchset3 adds IdentityManagementFixture::saveIdentityCertificate, which can be used to "ensure certificates written to filesystem are properly cleaned up".

Actions #9

Updated by Alex Afanasyev almost 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

This task has been implemented as part of commit:70244f401829bdacbf7f46b9ddc425f596398a6d

Actions

Also available in: Atom PDF