From a212b03fa1df26e311cd394d7138f9c9f798c8eb Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Tue, 5 Oct 2004 20:20:12 +0000 Subject: [PATCH] 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 --- test/testamf.c | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/test/testamf.c b/test/testamf.c index e0a2356d..38891f62 100644 --- a/test/testamf.c +++ b/test/testamf.c @@ -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);