Przeglądaj źródła

defect 993
ckpt-rd.c and ckpt-wr.c in the test directory don't run with the latest code.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@866 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 20 lat temu
rodzic
commit
58841ee8d5
2 zmienionych plików z 9 dodań i 19 usunięć
  1. 2 11
      test/ckpt-rd.c
  2. 7 8
      test/ckpt-wr.c

+ 2 - 11
test/ckpt-rd.c

@@ -63,15 +63,6 @@ SaVersionT version = { 'B', 1, 1 };
 
 SaNameT checkpointName = { 16, "checkpoint-sync\0" };
 
-SaCkptCheckpointCreationAttributesT checkpointCreationAttributes = {
-	SA_CKPT_WR_ALL_REPLICAS,
-	100000,
-	5000000000LL,
-	5,
-	2000,
-	10
-};
-
 char readBuffer1[1025];
 
 
@@ -108,8 +99,8 @@ int main (void) {
 	
 	error = saCkptCheckpointOpen (ckptHandle,
 		&checkpointName,
-		&checkpointCreationAttributes,
-		SA_CKPT_CHECKPOINT_READ|SA_CKPT_CHECKPOINT_WRITE,
+		0,
+		SA_CKPT_CHECKPOINT_READ,
 		0,
 		&checkpointHandle);
 	printf ("%s: initial open of checkpoint\n",

+ 7 - 8
test/ckpt-wr.c

@@ -63,12 +63,12 @@ SaVersionT version = { 'B', 1, 1 };
 SaNameT checkpointName = { 16, "checkpoint-sync\0" };
 
 SaCkptCheckpointCreationAttributesT checkpointCreationAttributes = {
-	SA_CKPT_WR_ALL_REPLICAS,
-	100000,
-	2000,
-	5,
-	20000,
-	10
+	.creationFlags =        SA_CKPT_WR_ALL_REPLICAS,
+	.checkpointSize =       250000,
+	.retentionDuration =    SA_TIME_ONE_SECOND * 60,
+	.maxSections =          5,
+	.maxSectionSize =       250000,
+	.maxSectionIdSize =     10
 };
 
 char readBuffer1[1025];
@@ -121,7 +121,7 @@ int main (void) {
 	error = saCkptCheckpointOpen (ckptHandle,
 			&checkpointName,
 			&checkpointCreationAttributes,
-			SA_CKPT_CHECKPOINT_READ|SA_CKPT_CHECKPOINT_WRITE,
+			SA_CKPT_CHECKPOINT_CREATE|SA_CKPT_CHECKPOINT_READ|SA_CKPT_CHECKPOINT_WRITE,
 			0,
 			&checkpointHandle);
 	printf ("%s: initial open of checkpoint\n",
@@ -164,7 +164,6 @@ int main (void) {
 							get_test_output (error, SA_AIS_OK), (char*)data);
 			}while (error == SA_AIS_ERR_TRY_AGAIN);
 
-
 			nanosleep(&delay,&delay2);
 	}while (1);