--- src/ckpt/apitest/test_cpa.c | 53 ++++++++++++++++++++++++++++++++++++++- src/ckpt/apitest/test_cpa_util.c | 18 +++++++++++++ src/ckpt/apitest/test_cpsv.h | 4 +++ src/ckpt/apitest/test_cpsv_conf.h | 2 ++ 4 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/src/ckpt/apitest/test_cpa.c b/src/ckpt/apitest/test_cpa.c index 51f3c99..c2f40d4 100644 --- a/src/ckpt/apitest/test_cpa.c +++ b/src/ckpt/apitest/test_cpa.c @@ -598,7 +598,15 @@ void test_ckpt_cleanup(CPSV_CLEANUP_CKPT_TC_TYPE tc) CKPT_UNLINK_ALL_REPLICAS_EXTENDED_NAME_SUCCESS_T, TEST_CONFIG_MODE); break; - } + case CPSV_CLEAN_ALL_REPLICAS_CKPT_1: + error = + test_ckptUnlink(CKPT_UNLINK_SUCCESS11_T, TEST_CONFIG_MODE); + break; + case CPSV_CLEAN_ACTIVE_REPLICAS_CKPT_1: + error = + test_ckptUnlink(CKPT_UNLINK_SUCCESS12_T, TEST_CONFIG_MODE); + break; +} if (error != TEST_PASS) m_TEST_CPSV_PRINTF("\n Unlink failed ckpt not cleanedup\n"); @@ -2775,6 +2783,43 @@ final1: test_validate(result, TEST_PASS); } +void cpsv_it_open_59() +{ + int result; + printHead("To verify opening a ckpt with synchronous update option with syc cbk handle"); + + result = test_ckptInitialize(CKPT_INIT_SYNC_NULL_CBK_T, TEST_NONCONFIG_MODE); + if (result != TEST_PASS) + goto final; + + result = + test_ckptOpen(CKPT_OPEN_ALL_CREATE_SUCCESS1_T, TEST_NONCONFIG_MODE); + test_ckpt_cleanup(CPSV_CLEAN_ALL_REPLICAS_CKPT_1); + test_cpsv_cleanup(CKPT_INIT_SYNC_NULL_CBK_T); + +final: + printResult(result); + test_validate(result, TEST_PASS); +} + +void cpsv_it_open_60() +{ + int result; + printHead("To verify opening a ckpt with asynchronous update option with syc cbk handle"); + result = test_ckptInitialize(CKPT_INIT_SYNC_NULL_CBK_T, TEST_NONCONFIG_MODE); + if (result != TEST_PASS) + goto final; + + result = test_ckptOpen(CKPT_OPEN_ACTIVE_CREATE_SUCCESS1_T, + TEST_NONCONFIG_MODE); + test_ckpt_cleanup(CPSV_CLEAN_ACTIVE_REPLICAS_CKPT_1); + test_cpsv_cleanup(CKPT_INIT_SYNC_NULL_CBK_T); + +final: + printResult(result); + test_validate(result, TEST_PASS); +} + /****** saCkptCheckpointClose *******/ void cpsv_it_close_01() @@ -8166,6 +8211,12 @@ __attribute__((constructor)) static void ckpt_cpa_test_constructor(void) test_case_add( 5, cpsv_it_open_58, "To verify openAsync a ckpt with invalid extended name length"); + test_case_add( + 5, cpsv_it_open_59, + "To verify opening a ckpt with synchronous update option with syc cbk handle"); + test_case_add( + 5, cpsv_it_open_60, + "To verify opening a ckpt with asynchronous update option with syc cbk handle"); test_suite_add(6, "CKPT API saCkptCheckpointClose()"); test_case_add( diff --git a/src/ckpt/apitest/test_cpa_util.c b/src/ckpt/apitest/test_cpa_util.c index bc52ff9..1336eae 100644 --- a/src/ckpt/apitest/test_cpa_util.c +++ b/src/ckpt/apitest/test_cpa_util.c @@ -571,6 +571,17 @@ struct SafCheckpointOpen API_Open[] = { &tcd.all_replicas_Createhdl, SA_AIS_ERR_TOO_BIG, "ckpt with ALL_REPLICAS and invalid extended name created"}, + [CKPT_OPEN_ALL_CREATE_SUCCESS1_T] = + {&tcd.ckptHandle4, &tcd.all_replicas_ckpt, &tcd.all_replicas, + SA_CKPT_CHECKPOINT_CREATE, APP_TIMEOUT, + &tcd.all_replicas_Createhdl, SA_AIS_OK, + "ckpt with ALL_REPLICAS created"}, + [CKPT_OPEN_ACTIVE_CREATE_SUCCESS1_T] = + {&tcd.ckptHandle4, &tcd.active_replica_ckpt, &tcd.active_replica, + (SA_CKPT_CHECKPOINT_CREATE | SA_CKPT_CHECKPOINT_READ), APP_TIMEOUT, + &tcd.active_replica_Createhdl, SA_AIS_OK, + "ckpt with ACTIVE REPLICA created"}, + /* NULL ckptHandle, */ }; @@ -2636,6 +2647,13 @@ struct SafCheckpointUnlink API_Unlink[] = { &tcd.all_replicas_ckpt_with_invalid_extended_name_length, SA_AIS_ERR_TOO_BIG, "Unlinked ckpt all replicas with invalid extended name length"}, + [CKPT_UNLINK_SUCCESS11_T] = + {&tcd.ckptHandle4, &tcd.all_replicas_ckpt, + SA_AIS_OK, + "Unlinked ckpt all replicas option"}, + [CKPT_UNLINK_SUCCESS12_T] = {&tcd.ckptHandle4, &tcd.active_replica_ckpt, + SA_AIS_OK, + "Unlinked ckpt active replicas option"}, #if 0 [CKPT_UNLINK_NOT_EXIST4_T] = {&tcd.ckptHandle,&tcd.collocated_ckpt,SA_AIS_OK,"Unlinked ckpt collcated replicas"}, diff --git a/src/ckpt/apitest/test_cpsv.h b/src/ckpt/apitest/test_cpsv.h index 7acb622..3e2e88d 100644 --- a/src/ckpt/apitest/test_cpsv.h +++ b/src/ckpt/apitest/test_cpsv.h @@ -327,6 +327,8 @@ typedef enum { CKPT_OPEN_WEAK_CREATE_READ_SUCCESS_T, CKPT_OPEN_ACTIVE_WRITE_READ_SUCCESS_T, CKPT_OPEN_ALL_CREATE_EXTENDED_NAME_SUCCESS_T, + CKPT_OPEN_ALL_CREATE_SUCCESS1_T, + CKPT_OPEN_ACTIVE_CREATE_SUCCESS1_T, CKPT_OPEN_ALL_CREATE_EXTENDED_NAME_INVALID_PARAM_T } CKPT_OPEN_TC_TYPE; @@ -596,6 +598,8 @@ typedef enum { CKPT_UNLINK_NOT_EXIST3_T, CKPT_UNLINK_ALL_REPLICAS_EXTENDED_NAME_SUCCESS_T, CKPT_UNLINK_ALL_REPLICAS_EXTENDED_NAME_INVALID_PARAM_T, + CKPT_UNLINK_SUCCESS11_T, + CKPT_UNLINK_SUCCESS12_T, } CKPT_UNLINK_TC_TYPE; typedef enum { diff --git a/src/ckpt/apitest/test_cpsv_conf.h b/src/ckpt/apitest/test_cpsv_conf.h index 55f268d..f008883 100644 --- a/src/ckpt/apitest/test_cpsv_conf.h +++ b/src/ckpt/apitest/test_cpsv_conf.h @@ -54,6 +54,8 @@ typedef enum { CPSV_CLEAN_ASYNC_ACTIVE_REPLICAS_CKPT, CPSV_CLEAN_WEAK_REPLICAS_CKPT, CPSV_CLEAN_MULTI_VECTOR_CKPT, + CPSV_CLEAN_ALL_REPLICAS_CKPT_1, + CPSV_CLEAN_ACTIVE_REPLICAS_CKPT_1, CPSV_CLEAN_ASYNC_ALL_REPLICAS_CKPT_EXTENDED_NAME, } CPSV_CLEANUP_CKPT_TC_TYPE; -- 2.7.4 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel