Просмотр исходного кода

Auto merged

2004/10/04 16:09:33-07:00 mvista.com!sdake
Change testamf to just test protection group tracking
and componentcapabilitymodelget.

(Logical change 1.90)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@323 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 21 лет назад
Родитель
Сommit
a212b03fa1
1 измененных файлов с 6 добавлено и 33 удалено
  1. 6 33
      test/testamf.c

+ 6 - 33
test/testamf.c

@@ -291,50 +291,23 @@ int main (int argc, char **argv) {
 	saAmfSelectionObjectGet (&handleproxy, &select_fd);
 	saAmfSelectionObjectGet (&handleproxy, &select_fd);
 	FD_SET (select_fd, &read_fds);
 	FD_SET (select_fd, &read_fds);
 
 
-	setSanameT (&compName, "raidupdate1");
-	setSanameT (&proxyCompName, "raidhotswap1");
-	setSanameT (&csiName, "raidupdate");
-
-	result = saAmfComponentRegister (&handleproxy, &proxyCompName, NULL);
-	printf ("register result is %d (should be 1)\n", result);
-	result = saAmfComponentRegister (&handle, &compName, &proxyCompName);
-	printf ("register result is %d (should be 1)\n", result);
+	setSanameT (&compName, "comp_a_in_su_x");
+	setSanameT (&csiName, "pgA");
 	result = saAmfComponentCapabilityModelGet (&compName, &componentCapabilityModel);
 	result = saAmfComponentCapabilityModelGet (&compName, &componentCapabilityModel);
 	printf ("component capability model get is %d (should be 1)\n", result);
 	printf ("component capability model get is %d (should be 1)\n", result);
-	result = saAmfProtectionGroupTrackStart (&handle, &csiName, SA_TRACK_CURRENT | SA_TRACK_CHANGES_ONLY, protectionGroupNotificationBuffer, 64);
+
+	result = saAmfProtectionGroupTrackStart (&handle, &csiName, SA_TRACK_CURRENT | SA_TRACK_CHANGES, protectionGroupNotificationBuffer, 64);
 	printf ("track start result is %d (should be 1)\n", result);
 	printf ("track start result is %d (should be 1)\n", result);
-#ifdef COMPILEOUT
+
 	result = saAmfProtectionGroupTrackStop (&handle, &csiName);
 	result = saAmfProtectionGroupTrackStop (&handle, &csiName);
 	printf ("track stop result is %d (should be 1)\n", result);
 	printf ("track stop result is %d (should be 1)\n", result);
-	result = saAmfComponentUnregister (&handle, &compName, &compName);
-	printf ("unregister result is %d (should be 21)\n", result);
-	result = saAmfComponentRegister (&handle, &compName, &proxyCompName);
-	printf ("register result is %d (should be 14)\n", result);
-	result = saAmfComponentUnregister (&handle, &compName, &proxyCompName);
-	printf ("unregister result is %d (should be 1)\n", result);
-	result = saAmfComponentRegister (&handle, &compName, NULL);
-	printf ("register result is %d (should be 1)\n", result);
-	result = saAmfComponentUnregister (&handle, &compName, NULL);
-	printf ("unregister result is %d (should be 1)\n", result);
-	result = saAmfCompNameGet (&handle, &newCompName);
-	printf ("compNameGet result is %d (should be 12)\n", result);
-	result = saAmfComponentRegister (&handle, &compName, NULL);
-	printf ("register result is %d (should be 1)\n", result);
-	result = saAmfCompNameGet (&handle, &newCompName);
-	printf ("compNameGet result is %d (should be 1)\n", result);
 	result = saAmfReadinessStateGet (&compName, &readinessState);
 	result = saAmfReadinessStateGet (&compName, &readinessState);
-	printf ("readinessStateGet result is %d (should be 1) state %d (should be 1)\n", result, readinessState);
-	proxyCompName.value[0] = 'a';
-#endif
-	result = saAmfReadinessStateGet (&proxyCompName, &readinessState);
-	printf ("readinessStateGet result is %d (should be 12)\n", result);
 	do {
 	do {
 		select (select_fd + 1, &read_fds, 0, 0, 0);
 		select (select_fd + 1, &read_fds, 0, 0, 0);
 		saAmfDispatch (&handle, SA_DISPATCH_ALL);
 		saAmfDispatch (&handle, SA_DISPATCH_ALL);
-//		printf ("dispatching handleproxy\n");
-		saAmfDispatch (&handleproxy, SA_DISPATCH_ALL);
 	} while (result);
 	} while (result);
 
 
+	result = saAmfProtectionGroupTrackStop (&handle, &csiName);
 	saAmfFinalize (&handle);
 	saAmfFinalize (&handle);
 
 
 	return (0);
 	return (0);