--- src/ckpt/apitest/test_cpa.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+)
diff --git a/src/ckpt/apitest/test_cpa.c b/src/ckpt/apitest/test_cpa.c index 9813bc2..02cb8e4 100644 --- a/src/ckpt/apitest/test_cpa.c +++ b/src/ckpt/apitest/test_cpa.c @@ -7538,6 +7538,49 @@ final1: test_validate(result, TEST_PASS); } +void cpsv_it_overwrite_14() +{ + int result; + printHead("To verify overwrite after close"); + result = test_ckptInitialize(CKPT_INIT_SUCCESS_T, TEST_CONFIG_MODE); + if (result != TEST_PASS) + goto final1; + + result = + test_ckptOpen(CKPT_OPEN_ACTIVE_CREATE_SUCCESS_T, TEST_CONFIG_MODE); + if (result != TEST_PASS) + goto final2; + + result = + test_ckptOpen(CKPT_OPEN_ACTIVE_WRITE_SUCCESS_T, TEST_CONFIG_MODE); + if (result != TEST_PASS) + goto final3; + + result = test_ckptSectionCreate(CKPT_SECTION_CREATE_SUCCESS4_T, + TEST_CONFIG_MODE); + if (result != TEST_PASS) + goto final3; + + result = test_ckptClose(CKPT_CLOSE_SUCCESS9_T, TEST_CONFIG_MODE); + if (result != TEST_PASS) + goto final2; + + result = test_ckptClose(CKPT_CLOSE_SUCCESS11_T, TEST_CONFIG_MODE); + if (result != TEST_PASS) + goto final2; + + result = test_ckptOverwrite(CKPT_OVERWRITE_FIN_HANDLE_T, + TEST_NONCONFIG_MODE); + +final3: + test_ckpt_cleanup(CPSV_CLEAN_ACTIVE_REPLICAS_CKPT); +final2: + test_cpsv_cleanup(CPSV_CLEAN_INIT_SUCCESS_T); +final1: + printResult(result); + test_validate(result, TEST_PASS); +} + /******** OpenCallback *******/ void cpsv_it_openclbk_01() @@ -8752,6 +8795,8 @@ __attribute__((constructor)) static void ckpt_cpa_test_constructor(void) test_case_add(20, cpsv_it_overwrite_13, "To verify that overwrite writes into a section with" " large dataBuffer"); + test_case_add(20, cpsv_it_overwrite_14, + "To verify overwrite after close"); test_suite_add(21, "CKPT OpenCallBack"); test_case_add( -- 2.7.4 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel