-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guard Google UT update and correction #21
base: main
Are you sure you want to change the base?
Conversation
The Google Unit Test cases for guard repo has been updated and corrected to latest ***************** TEST RESULTS ***************** [==========] Running 15 tests from 1 test suite. [----------] Global test environment set-up. [----------] 15 tests from TestGuardRecord [ RUN ] TestGuardRecord.CreateGuardRecord [ OK ] TestGuardRecord.CreateGuardRecord (0 ms) [ RUN ] TestGuardRecord.ClearGuardGoodPathTest [ OK ] TestGuardRecord.ClearGuardGoodPathTest (0 ms) [ RUN ] TestGuardRecord.DeleteGuardGoodPathTest [ OK ] TestGuardRecord.DeleteGuardGoodPathTest (1 ms) [ RUN ] TestGuardRecord.NegTestCaseEP [ OK ] TestGuardRecord.NegTestCaseEP (0 ms) [ RUN ] TestGuardRecord.NegTestCaseFullGuardFile Guard file size is 656b (in bytes) and space remaining in the GUARD file is 0b but, required 128b to create a record. Total records: 5 [ OK ] TestGuardRecord.NegTestCaseFullGuardFile (1 ms) [ RUN ] TestGuardRecord.AlreadyGuardedTC Failed to overwrite since record is already exist and that does not meet the condition to overwrite [ OK ] TestGuardRecord.AlreadyGuardedTC (0 ms) [ RUN ] TestGuardRecord.GetCreatedGuardRecordTC [ OK ] TestGuardRecord.GetCreatedGuardRecordTC (0 ms) [ RUN ] TestGuardRecord.DeleteByEntityPath [ OK ] TestGuardRecord.DeleteByEntityPath (0 ms) [ RUN ] TestGuardRecord.DeleteWithNotExistentEntity Guard record not found [ OK ] TestGuardRecord.DeleteWithNotExistentEntity (0 ms) [ RUN ] TestGuardRecord.DeleteByRecordId [ OK ] TestGuardRecord.DeleteByRecordId (0 ms) [ RUN ] TestGuardRecord.DeleteWithNotExistentRecordId Guard record not found [ OK ] TestGuardRecord.DeleteWithNotExistentRecordId (0 ms) [ RUN ] TestGuardRecord.GetGuardFilePathTC [ OK ] TestGuardRecord.GetGuardFilePathTC (0 ms) [ RUN ] TestGuardRecord.GetGuardFilePathWhenLibguradDidNotInitTC Guard file is not initialised. [ OK ] TestGuardRecord.GetGuardFilePathWhenLibguradDidNotInitTC (0 ms) [ RUN ] TestGuardRecord.ClearGuardInvalidateAllPathTest [ OK ] TestGuardRecord.ClearGuardInvalidateAllPathTest (0 ms) [ RUN ] TestGuardRecord.ClearResolvedGuardRecord [ OK ] TestGuardRecord.ClearResolvedGuardRecord (1 ms) [----------] 15 tests from TestGuardRecord (8 ms total) [----------] Global test environment tear-down [==========] 15 tests from 1 test suite ran. (8 ms total) [ PASSED ] 15 tests. ============================================================================== Ok: 1 Expected Fail: 0 Fail: 0 Unexpected Pass: 0 Skipped: 0 Timeout: 0 Signed-off-by: [email protected]
phyPath = "/sys-0/node-0/proc-0/eq-0/fc-0/core-1"; | ||
entityPath = openpower::guard::getEntityPath(phyPath); | ||
openpower::guard::create(*entityPath); | ||
LibGuardInit("/sys-0/node-0/proc-1/eq-0/fc-0/core-0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the libguard Init gets called 4 times whereas it was only called once earlier. Better to avoid it
phyPath = "/sys-0/node-0/dimm-1"; | ||
entityPath = openpower::guard::getEntityPath(phyPath); | ||
EXPECT_THROW({ openpower::guard::create(*entityPath); }, | ||
LibGuardInit("/sys-0/node-0/proc-1/eq-0/fc-0/core-0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as earlier comment
phyPath = "/sys-0/node-0/dimm-3"; | ||
entityPath = openpower::guard::getEntityPath(phyPath); | ||
openpower::guard::create(*entityPath); | ||
LibGuardInit("/sys-0/node-0/dimm-0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here also.
The Google Unit Test cases for guard repo has been updated and corrected to latest
TEST RESULTS
[==========] Running 15 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 15 tests from TestGuardRecord
[ RUN ] TestGuardRecord.CreateGuardRecord
[ OK ] TestGuardRecord.CreateGuardRecord (0 ms)
[ RUN ] TestGuardRecord.ClearGuardGoodPathTest
[ OK ] TestGuardRecord.ClearGuardGoodPathTest (0 ms)
[ RUN ] TestGuardRecord.DeleteGuardGoodPathTest
[ OK ] TestGuardRecord.DeleteGuardGoodPathTest (1 ms)
[ RUN ] TestGuardRecord.NegTestCaseEP
[ OK ] TestGuardRecord.NegTestCaseEP (0 ms)
[ RUN ] TestGuardRecord.NegTestCaseFullGuardFile
Guard file size is 656b (in bytes) and space remaining in the GUARD file is 0b but, required 128b to create a record. Total records: 5
[ OK ] TestGuardRecord.NegTestCaseFullGuardFile (1 ms)
[ RUN ] TestGuardRecord.AlreadyGuardedTC
Failed to overwrite since record is already exist and that does not meet the condition to overwrite
[ OK ] TestGuardRecord.AlreadyGuardedTC (0 ms)
[ RUN ] TestGuardRecord.GetCreatedGuardRecordTC
[ OK ] TestGuardRecord.GetCreatedGuardRecordTC (0 ms)
[ RUN ] TestGuardRecord.DeleteByEntityPath
[ OK ] TestGuardRecord.DeleteByEntityPath (0 ms)
[ RUN ] TestGuardRecord.DeleteWithNotExistentEntity
Guard record not found
[ OK ] TestGuardRecord.DeleteWithNotExistentEntity (0 ms)
[ RUN ] TestGuardRecord.DeleteByRecordId
[ OK ] TestGuardRecord.DeleteByRecordId (0 ms)
[ RUN ] TestGuardRecord.DeleteWithNotExistentRecordId
Guard record not found
[ OK ] TestGuardRecord.DeleteWithNotExistentRecordId (0 ms)
[ RUN ] TestGuardRecord.GetGuardFilePathTC
[ OK ] TestGuardRecord.GetGuardFilePathTC (0 ms)
[ RUN ] TestGuardRecord.GetGuardFilePathWhenLibguradDidNotInitTC
Guard file is not initialised.
[ OK ] TestGuardRecord.GetGuardFilePathWhenLibguradDidNotInitTC (0 ms)
[ RUN ] TestGuardRecord.ClearGuardInvalidateAllPathTest
[ OK ] TestGuardRecord.ClearGuardInvalidateAllPathTest (0 ms)
[ RUN ] TestGuardRecord.ClearResolvedGuardRecord
[ OK ] TestGuardRecord.ClearResolvedGuardRecord (1 ms)
[----------] 15 tests from TestGuardRecord (8 ms total)
[----------] Global test environment tear-down
[==========] 15 tests from 1 test suite ran. (8 ms total) [ PASSED ] 15 tests.
Ok: 1
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Signed-off-by: [email protected]