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
This commit is contained in:
Steven Dake 2004-10-05 20:20:12 +00:00
parent 865d4fd47c
commit a212b03fa1

View File

@ -291,50 +291,23 @@ int main (int argc, char **argv) {
saAmfSelectionObjectGet (&handleproxy, &select_fd);
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);
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);
#ifdef COMPILEOUT
result = saAmfProtectionGroupTrackStop (&handle, &csiName);
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);
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 {
select (select_fd + 1, &read_fds, 0, 0, 0);
saAmfDispatch (&handle, SA_DISPATCH_ALL);
// printf ("dispatching handleproxy\n");
saAmfDispatch (&handleproxy, SA_DISPATCH_ALL);
} while (result);
result = saAmfProtectionGroupTrackStop (&handle, &csiName);
saAmfFinalize (&handle);
return (0);