--- src/ckpt/apitest/test_cpa.c | 26 ++++++++++++++++++++++++++ src/ckpt/apitest/test_cpa_util.c | 4 +++- src/ckpt/apitest/test_cpsv.h | 1 + 3 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/src/ckpt/apitest/test_cpa.c b/src/ckpt/apitest/test_cpa.c index 5852c10..36e9d29 100644 --- a/src/ckpt/apitest/test_cpa.c +++ b/src/ckpt/apitest/test_cpa.c @@ -3925,6 +3925,30 @@ final1: test_validate(result, TEST_PASS); } +void cpsv_it_status_07() +{ + int result; + printHead("To test Status get for active replica ckpt"); + result = test_ckptInitialize(CKPT_INIT_SYNC_NULL_CBK_T, TEST_NONCONFIG_MODE); + if (result != TEST_PASS) + goto final1; + + result = + test_ckptOpen(CKPT_OPEN_ACTIVE_CREATE_SUCCESS1_T, TEST_CONFIG_MODE); + if (result != TEST_PASS) + goto final2; + + result = test_ckptStatusGet(CKPT_STATUS_SUCCESS8_T, + TEST_NONCONFIG_MODE); + test_ckpt_cleanup(CPSV_CLEAN_ACTIVE_REPLICAS_CKPT); + +final2: + test_cpsv_cleanup(CKPT_INIT_SYNC_NULL_CBK_T); +final1: + printResult(result); + test_validate(result, TEST_PASS); +} + /******* saCkptSectionCreate ********/ void cpsv_it_seccreate_01() @@ -8393,6 +8417,8 @@ __attribute__((constructor)) static void ckpt_cpa_test_constructor(void) "To test status get when there is no active replica"); test_case_add(10, cpsv_it_status_06, "To test status get when invalid param is passed"); + test_case_add(10, cpsv_it_status_07, + "To test Status get for active replica ckpt"); test_suite_add(11, "CKPT API saCkptSectionCreate()"); test_case_add(11, cpsv_it_seccreate_01, diff --git a/src/ckpt/apitest/test_cpa_util.c b/src/ckpt/apitest/test_cpa_util.c index 1336eae..8ac5a23 100644 --- a/src/ckpt/apitest/test_cpa_util.c +++ b/src/ckpt/apitest/test_cpa_util.c @@ -2137,7 +2137,9 @@ struct SafCheckpointStatusGet API_StatusGet[] = { [CKPT_STATUS_ERR_NOT_EXIST2_T] = {&tcd.active_colloc_Writehdl, &tcd.status, SA_AIS_ERR_NOT_EXIST, "Status get active replica not exist"}, - + [CKPT_STATUS_SUCCESS8_T] = {&tcd.active_replica_Createhdl, &tcd.status, + SA_AIS_OK, + "Status get for active replica ckpt"}, }; int test_ckptStatusGet(int i, CONFIG_FLAG cfg_flg) diff --git a/src/ckpt/apitest/test_cpsv.h b/src/ckpt/apitest/test_cpsv.h index 3e2e88d..918df57 100644 --- a/src/ckpt/apitest/test_cpsv.h +++ b/src/ckpt/apitest/test_cpsv.h @@ -531,6 +531,7 @@ typedef enum { CKPT_STATUS_SUCCESS7_T, CKPT_STATUS_ERR_NOT_EXIST_T, CKPT_STATUS_ERR_NOT_EXIST2_T, + CKPT_STATUS_SUCCESS8_T, } CKPT_STATUS_TC_TYPE; typedef enum { -- 2.7.4 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel