---
 src/ckpt/apitest/test_cpa.c       | 60 +++++++++++++++++++++++++++++++++++++++
 src/ckpt/apitest/test_cpa_util.c  |  3 ++
 src/ckpt/apitest/test_cpsv.h      |  1 +
 src/ckpt/apitest/test_cpsv_conf.h |  3 ++
 4 files changed, 67 insertions(+)

diff --git a/src/ckpt/apitest/test_cpa.c b/src/ckpt/apitest/test_cpa.c
index 51f3c99..6c37e91 100644
--- a/src/ckpt/apitest/test_cpa.c
+++ b/src/ckpt/apitest/test_cpa.c
@@ -537,6 +537,21 @@ void test_cpsv_cleanup(CPSV_CLEANUP_TC_TYPE tc)
                    test_ckptFinalize(CKPT_FIN_SUCCESS2_T, TEST_CONFIG_MODE);
                cpsv_clean_clbk_params();
                break;
+       case CKPT_CLEAN_INIT_NULL_CBKS_NULL_T:
+               error =
+                   test_ckptFinalize(CKPT_FIN_NULL_HANDLE_T, TEST_CONFIG_MODE);
+               cpsv_clean_clbk_params();
+               break;
+       case CKPT_CLEAN_INIT_NULL_ver_NULL_T:
+               error =
+                   test_ckptFinalize(CKPT_FIN_NULL_HANDLE_T, TEST_CONFIG_MODE);
+               cpsv_clean_clbk_params();
+               break;
+       case CKPT_CLEAN_INIT_NULL_ver_NULL_CBK_NULL_T:
+               error =
+                   test_ckptFinalize(CKPT_FIN_NULL_HANDLE_T, TEST_CONFIG_MODE);
+               cpsv_clean_clbk_params();
+               break;
        }
 
        if (error != TEST_PASS)
@@ -758,6 +773,44 @@ void cpsv_it_init_11()
        test_validate(result, TEST_PASS);
 }
 
+void cpsv_it_init_12()
+{
+       int result;
+       printHead("To verify saCkptInitialize with null handles and null 
pointer to  clbk");
+
+       result =
+               test_ckptInitialize(CKPT_INIT_NULL_CBKS_NULL_T, 
TEST_CONFIG_MODE);
+       test_cpsv_cleanup(CKPT_CLEAN_INIT_NULL_CBKS_NULL_T);
+       printResult(result);
+
+       test_validate(result, TEST_PASS);
+}
+
+void cpsv_it_init_13()
+{
+       int result;
+       printHead("To verify saCkptInitialize with null handle and null 
version");
+
+       result =
+               test_ckptInitialize(CKPT_INIT_HDL_VER_NULL_T, TEST_CONFIG_MODE);
+       test_cpsv_cleanup(CKPT_CLEAN_INIT_NULL_ver_NULL_T);
+       printResult(result);
+
+       test_validate(result, TEST_PASS);
+}
+void cpsv_it_init_14()
+{
+       int result;
+       printHead("To verify saCkptInitialize with null handle and null version 
and cbk null");
+
+       result =
+               test_ckptInitialize(CKPT_INIT_NULL_PARAMS_T, TEST_CONFIG_MODE);
+       test_cpsv_cleanup(CKPT_CLEAN_INIT_NULL_ver_NULL_CBK_NULL_T);
+       printResult(result);
+
+       test_validate(result, TEST_PASS);
+}
+
 /****** saCkptSelectionObjectGet *****/
 
 void cpsv_it_sel_01()
@@ -7953,6 +8006,13 @@ __attribute__((constructor)) static void 
ckpt_cpa_test_constructor(void)
                      "To verify saCkptInitialize with one NULL clbk");
        test_case_add(1, cpsv_it_init_11,
                "To verify saCkptInitialize with one SYNC clbk and NULL clbk");
+       test_case_add(1, cpsv_it_init_12,
+               "To verify saCkptInitialize with null handle and null pointer 
to clbks");
+       test_case_add(1, cpsv_it_init_13,
+               "To verify saCkptInitialize with null handle and null version");
+       test_case_add(1, cpsv_it_init_14,
+               "To verify saCkptInitialize with null handle and null version 
and cbk null");
+
 
        test_suite_add(2, "CKPT API saCkptSelectObjectGet()");
        test_case_add(
diff --git a/src/ckpt/apitest/test_cpa_util.c b/src/ckpt/apitest/test_cpa_util.c
index bc52ff9..474e76f 100644
--- a/src/ckpt/apitest/test_cpa_util.c
+++ b/src/ckpt/apitest/test_cpa_util.c
@@ -181,6 +181,9 @@ struct SafCkptInitialize API_Initialize[] = {
                                      &tcd.general_callbks, SA_AIS_OK,
                                      "ckptHandle2 init with gen. calbks"},
 
+       [CKPT_INIT_NULL_CBKS_NULL_T] = {NULL, &tcd.version_supported, NULL, 
SA_AIS_ERR_INVALID_PARAM,
+                                       "Init with all params NULL"},
+
 };
 
 int test_ckptInitialize(int i, CONFIG_FLAG cfg_flg)
diff --git a/src/ckpt/apitest/test_cpsv.h b/src/ckpt/apitest/test_cpsv.h
index 7acb622..2aee8cf 100644
--- a/src/ckpt/apitest/test_cpsv.h
+++ b/src/ckpt/apitest/test_cpsv.h
@@ -270,6 +270,7 @@ typedef enum {
   CKPT_INIT_NULL_PARAMS_T,
   CKPT_INIT_HDL_VER_NULL_T,
   CKPT_INIT_SUCCESS_HDL2_T,
+  CKPT_INIT_NULL_CBKS_NULL_T,
 } CKPT_INIT_TC_TYPE;
 
 typedef enum {
diff --git a/src/ckpt/apitest/test_cpsv_conf.h 
b/src/ckpt/apitest/test_cpsv_conf.h
index 55f268d..d33be67 100644
--- a/src/ckpt/apitest/test_cpsv_conf.h
+++ b/src/ckpt/apitest/test_cpsv_conf.h
@@ -39,7 +39,10 @@ typedef enum {
   CPSV_CLEAN_INIT_NULL_CBKS_T,
   CPSV_CLEAN_INIT_OPEN_NULL_CBK_T,
   CPSV_CLEAN_INIT_SYNC_NULL_CBK_T,
+  CKPT_CLEAN_INIT_NULL_CBKS_NULL_T,
+  CKPT_CLEAN_INIT_NULL_ver_NULL_T,
   CPSV_CLEAN_INIT_NULL_CBKS2_T,
+  CKPT_CLEAN_INIT_NULL_ver_NULL_CBK_NULL_T,
   CPSV_CLEAN_INIT_SUCCESS_HDL2_T,
 } CPSV_CLEANUP_TC_TYPE;
 
-- 
2.7.4



_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to