tests/cpsv/test_cpa.c       |  33 +++++++++++++++++++++++++++++++++
 tests/cpsv/test_cpa_util.c  |   4 ++++
 tests/cpsv/test_cpsv.h      |   1 +
 tests/cpsv/test_cpsv_conf.h |   2 ++
 4 files changed, 40 insertions(+), 0 deletions(-)


diff --git a/tests/cpsv/test_cpa.c b/tests/cpsv/test_cpa.c
--- a/tests/cpsv/test_cpa.c
+++ b/tests/cpsv/test_cpa.c
@@ -303,6 +303,9 @@ void fill_testcase_data()
    tcd.invalidSection.idLen = 3;
    tcd.invalidSection.id = tcd.sec_id4;
 
+   tcd.long_section_id.idLen = 30;
+   tcd.long_section_id.id = (SaUint8T *)"long_section_id_size=30_00000";
+
    fill_sec_attri(&tcd.general_attr,&tcd.section1,SA_TIME_ONE_DAY);
    fill_sec_attri(&tcd.expiration_attr,&tcd.section2,SA_TIME_END);
    fill_sec_attri(&tcd.section_attr,&tcd.section3,SA_TIME_ONE_DAY);
@@ -311,6 +314,7 @@ void fill_testcase_data()
    fill_sec_attri(&tcd.special_attr2,&tcd.section6,SA_TIME_END);
    fill_sec_attri(&tcd.special_attr3,&tcd.section7,SA_TIME_END);
    fill_sec_attri(&tcd.invalid_attr,&tcd.invalid_sec,SA_TIME_END);
+   fill_sec_attri(&tcd.section_attr_with_long_id, &tcd.long_section_id, 
SA_TIME_END);
 
    strcpy(tcd.data1,"This is data1");
    strcpy(tcd.data2,"This is data2");
@@ -3646,6 +3650,34 @@ final1:
   test_validate(result, TEST_PASS);
 }
  
+void cpsv_it_seccreate_19() 
+{
+  int result;
+  printHead("To verify section create with long section id");
+  result = test_ckptInitialize(CKPT_INIT_SUCCESS_T,TEST_CONFIG_MODE);
+  if(result != TEST_PASS)
+     goto final1;
+
+  tcd.all_replicas.maxSectionIdSize = 50;
+  result = test_ckptOpen(CKPT_OPEN_ALL_CREATE_SUCCESS_T,TEST_CONFIG_MODE);
+  if(result != TEST_PASS)
+     goto final2;
+
+  result = test_ckptOpen(CKPT_OPEN_ALL_WRITE_SUCCESS_T,TEST_CONFIG_MODE);
+  if(result != TEST_PASS)
+     goto final3;
+
+  result = 
test_ckptSectionCreate(CKPT_SECTION_CREATE_LONG_SECION_ID_SUCCESS_T, 
TEST_NONCONFIG_MODE);
+
+final3:
+  test_ckpt_cleanup(CPSV_CLEAN_ALL_REPLICAS_CKPT);
+final2:
+  test_cpsv_cleanup(CPSV_CLEAN_INIT_SUCCESS_T);
+final1:
+  tcd.invalid_sec.idLen = 8;
+  printResult(result);
+  test_validate(result, TEST_PASS);
+}
 
 /******* saCkptSectionDelete ******/
 
@@ -6899,6 +6931,7 @@ final1:
   test_case_add(11, cpsv_it_seccreate_16, "To verify section create with 
section idLen greater than maxsec id size");
   test_case_add(11, cpsv_it_seccreate_17, "To verify section create with 
section idSize zero");
   test_case_add(11, cpsv_it_seccreate_18, "To verify free of section create 
with generated sectionId");
+  test_case_add(11, cpsv_it_seccreate_19, "To verify section create with long 
section id");
 
   test_suite_add(12, "CKPT API saCkptSectionDelete()");
   test_case_add(12, cpsv_it_secdel_01, "To verify section delete with 
arbitrary handle");
diff --git a/tests/cpsv/test_cpa_util.c b/tests/cpsv/test_cpa_util.c
--- a/tests/cpsv/test_cpa_util.c
+++ b/tests/cpsv/test_cpa_util.c
@@ -670,6 +670,10 @@ struct SafCheckpointSectionCreate API_Se
 
     [CKPT_SECTION_CREATE_INVALID_PARAM3_T]   = {&tcd.all_replicas_Writehdl 
,&tcd.invalid_attr,tcd.data1,&tcd.size,
                                            SA_AIS_ERR_INVALID_PARAM,"idsize is 
zero"},
+
+    [CKPT_SECTION_CREATE_LONG_SECION_ID_SUCCESS_T]    = 
{&tcd.all_replicas_Writehdl ,&tcd.section_attr_with_long_id,tcd.data1,&tcd.size,
+                                           SA_AIS_OK,"Section id long_id 
Created in all replicas ckpt"},    
+
 };
 
 
diff --git a/tests/cpsv/test_cpsv.h b/tests/cpsv/test_cpsv.h
--- a/tests/cpsv/test_cpsv.h
+++ b/tests/cpsv/test_cpsv.h
@@ -371,6 +371,7 @@ typedef enum {
     CKPT_SECTION_CREATE_GEN_EXIST_T,
     CKPT_SECTION_CREATE_GEN2_T,
     CKPT_SECTION_CREATE_INVALID_PARAM3_T,
+    CKPT_SECTION_CREATE_LONG_SECION_ID_SUCCESS_T,
 }CKPT_SECTION_CREATE_TC_TYPE;
                                                                                
                                                                                
      
                                                                                
                                                                                
      
diff --git a/tests/cpsv/test_cpsv_conf.h b/tests/cpsv/test_cpsv_conf.h
--- a/tests/cpsv/test_cpsv_conf.h
+++ b/tests/cpsv/test_cpsv_conf.h
@@ -67,7 +67,9 @@ struct cpsv_testcase_data
   SaNameT 
all_replicas_ckpt_large,active_replica_ckpt_large,weak_replica_ckpt_large,collocated_ckpt_large;
 
   SaCkptSectionIdT 
section1,section2,section3,section4,section5,section6,section7,invalid_sec,invalidsection,gen_sec,invalidSection,gen_sec_del;
+  SaCkptSectionIdT long_section_id;
   SaCkptSectionCreationAttributesT 
general_attr,expiration_attr,section_attr,special_attr,special_attr2,special_attr3,invalid_attr,multi_attr;
+  SaCkptSectionCreationAttributesT section_attr_with_long_id;
   char data1[14],data2[14],data3[14];
   SaSizeT size,size_zero;
 

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to