---
 src/plm/apitest/test_saPlmReadinessTrack.c | 72 ++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/src/plm/apitest/test_saPlmReadinessTrack.c 
b/src/plm/apitest/test_saPlmReadinessTrack.c
index bebb941..f767785 100644
--- a/src/plm/apitest/test_saPlmReadinessTrack.c
+++ b/src/plm/apitest/test_saPlmReadinessTrack.c
@@ -2077,6 +2077,71 @@ void saPlmReadinessTrack_44(void)
        safassert(saPlmFinalize(plmHandle), SA_AIS_OK);
 }
 
+void saPlmReadinessTrack_45(void)
+{
+        SaPlmCallbacksT plms_cbks;
+        SaPlmReadinessTrackedEntitiesT ents;
+        SaPlmReadinessTrackedEntityT entity_list[2];
+        plms_cbks.saPlmReadinessTrackCallback = &TrackCallback_01;
+        safassert(saPlmInitialize(&plmHandle, &plms_cbks, &PlmVersion),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupCreate(plmHandle, &entityGroupHandle),
+                  SA_AIS_OK);
+        getDn(1);
+        safassert(saPlmEntityGroupAdd(entityGroupHandle, &entarr[0].testDnptr,
+                                      no_of_trk_elements,
+                                      SA_PLM_GROUP_SINGLE_ENTITY),
+                  SA_AIS_OK);
+        entityGrpHandle = entityGroupHandle;
+        memset(&ents, 0, sizeof(SaPlmReadinessTrackedEntitiesT));
+        memset(&entity_list[0], 0, sizeof(SaPlmReadinessTrackedEntityT));
+        ents.numberOfEntities = 1;
+        ents.entities = NULL;
+        safassert(saPlmReadinessTrack(entityGroupHandle, SA_TRACK_CURRENT, 121,
+                                      &ents),
+                          SA_AIS_OK);
+        rc_from_test = saPlmReadinessNotificationFree(entityGroupHandle, 0);
+        test_validate(rc_from_test, SA_AIS_ERR_INVALID_PARAM);
+        safassert(
+            saPlmReadinessNotificationFree(entityGroupHandle, ents.entities),
+            SA_AIS_OK);
+        safassert(saPlmEntityGroupDelete(entityGroupHandle), SA_AIS_OK);
+        safassert(saPlmFinalize(plmHandle), SA_AIS_OK);
+}
+
+void saPlmReadinessTrack_46(void)
+{
+        SaPlmCallbacksT plms_cbks;
+        SaPlmReadinessTrackedEntitiesT ents;
+        SaPlmReadinessTrackedEntityT entity_list[2];
+        plms_cbks.saPlmReadinessTrackCallback = &TrackCallback_01;
+        safassert(saPlmInitialize(&plmHandle, &plms_cbks, &PlmVersion),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupCreate(plmHandle, &entityGroupHandle),
+                  SA_AIS_OK);
+        getDn(1);
+        safassert(saPlmEntityGroupAdd(entityGroupHandle, &entarr[0].testDnptr,
+                                      no_of_trk_elements,
+                                      SA_PLM_GROUP_SINGLE_ENTITY),
+                  SA_AIS_OK);
+        entityGrpHandle = entityGroupHandle;
+        memset(&ents, 0, sizeof(SaPlmReadinessTrackedEntitiesT));
+        memset(&entity_list[0], 0, sizeof(SaPlmReadinessTrackedEntityT));
+        ents.numberOfEntities = 1;
+        ents.entities = NULL;
+        safassert(saPlmReadinessTrack(entityGroupHandle, SA_TRACK_CURRENT, 121,
+                                      &ents),
+                          SA_AIS_OK);
+        rc_from_test = saPlmReadinessNotificationFree(0, 0);
+        test_validate(rc_from_test, SA_AIS_ERR_BAD_HANDLE);
+        safassert(
+            saPlmReadinessNotificationFree(entityGroupHandle, ents.entities),
+            SA_AIS_OK);
+        safassert(saPlmEntityGroupDelete(entityGroupHandle), SA_AIS_OK);
+        safassert(saPlmFinalize(plmHandle), SA_AIS_OK);
+}
+
+
 __attribute__((constructor)) static void
 saPlmReadinessTrackCurrent_constructor(void)
 {
@@ -2213,4 +2278,11 @@ saPlmReadinessTrackCurrent_constructor(void)
        test_case_add(
            3, saPlmReadinessTrack_44,
            "\nsaPlmReadinessTrack SA_TRACK_CHANGES_ONLY with group add and 
group remove  of single entity  after the entity with subtree option already 
added in the group - SA-AIS_OK");
+        test_case_add(
+            3, saPlmReadinessTrack_45,
+            "\nsaPlmReadinessNotificationFree with invalid param - 
SA_AIS_ERR_INVALID_PARAM");
+        test_case_add(
+            3, saPlmReadinessTrack_46,
+            "\nsaPlmReadinessNotificationFree with bad handle - 
SA_AIS_ERR_BAD_HANDLE");
+
 }
-- 
2.7.4



_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to