Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libguard: Adding function to erase guardrecords
Changes: -Adding new function to erase/wipout all guard records present in GUARD file. -Adding -e option in tool, which will call the new API to erase the data from GUARD file. -Adding UT for the newly introduced function. -Updating the README.md with new option details. Test Results: Running main() from ../googletest/src/gtest_main.cc [==========] 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 (0 ms) [ RUN ] TestGuardRecord.NegTestCaseEP [ OK ] TestGuardRecord.NegTestCaseEP (0 ms) [ RUN ] TestGuardRecord.NegTestCaseFullGuardFile No resolved Guard record found Size left in GUARD file is 0 [ OK ] TestGuardRecord.NegTestCaseFullGuardFile (0 ms) [ RUN ] TestGuardRecord.AlreadyGuardedTC Already guard record is available in the GUARD partition [ 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.ClearResolvedGuardRecord [ OK ] TestGuardRecord.ClearResolvedGuardRecord (0 ms) [ RUN ] TestGuardRecord.EraseAllRecordsTest [ OK ] TestGuardRecord.EraseAllRecordsTest (0 ms) [----------] 15 tests from TestGuardRecord (7 ms total) [----------] Global test environment tear-down [==========] 15 tests from 1 test suite ran. (7 ms total) [ PASSED ] 15 tests. ------------------------------------------------------------------------------ Ok: 1 Expected Fail: 0 Fail: 0 Unexpected Pass: 0 Skipped: 0 Timeout: 0 Signed-off-by: Chirag Sharma <[email protected]>
- Loading branch information