void saNtfStateChangeNotificationAllocate_01(void) { SaNtfStateChangeNotificationT myNotification; saNotificationAllocationParamsT myNotificationAllocationParams; saNotificationFilterAllocationParamsT myNotificationFilterAllocationParams; saNotificationParamsT myNotificationParams; fillInDefaultValues(&myNotificationAllocationParams, &myNotificationFilterAllocationParams, &myNotificationParams); safassert(saNtfInitialize(&ntfHandle, &ntfSendCallbacks, &ntfVersion), SA_AIS_OK); rc = saNtfStateChangeNotificationAllocate( ntfHandle, /* handle to Notification Service instance */ &myNotification, /* number of correlated notifications */ myNotificationAllocationParams.numCorrelatedNotifications, /* length of additional text */ myNotificationAllocationParams.lengthAdditionalText, /* number of additional info items*/ myNotificationAllocationParams.numAdditionalInfo, /* number of state changes */ myNotificationAllocationParams.numAttributes, /* use default allocation size */ myNotificationAllocationParams.variableDataSize); safassert(saNtfNotificationFree(myNotification.notificationHandle) , SA_AIS_OK); safassert(saNtfFinalize(ntfHandle) , SA_AIS_OK); test_validate(rc, SA_AIS_OK); }
void saImmOiFinalize_02(void) { safassert(saImmOiInitialize_2(&immOiHandle, &immOiCallbacks, &immVersion), SA_AIS_OK); rc = saImmOiFinalize(-1); test_validate(rc, SA_AIS_ERR_BAD_HANDLE); safassert(saImmOiFinalize(immOiHandle), SA_AIS_OK); }
/** * Provoke a SA_AIS_ERR_INVALID_PARAM reply */ void saNtfArrayAllocateTest_05(void) { SaStringT *arrayPtr; SaNtfAlarmNotificationT myAlarmNotification; safassert(saNtfInitialize(&ntfHandle, &ntfSendCallbacks, &ntfVersion) , SA_AIS_OK); safassert(saNtfAlarmNotificationAllocate( ntfHandle, &myAlarmNotification, 0, 0, 0, 0, 0, 2, SA_NTF_ALLOC_SYSTEM_LIMIT), SA_AIS_OK); myAlarmNotification.proposedRepairActions[0].actionValueType = SA_NTF_VALUE_ARRAY; rc = saNtfArrayValAllocate( myAlarmNotification.notificationHandle, (SaUint16T)5, (SaUint16T)(strlen(DEFAULT_ADDITIONAL_TEXT) + 1), (void**) &arrayPtr, NULL); safassert(saNtfNotificationFree(myAlarmNotification.notificationHandle) , SA_AIS_OK); safassert(saNtfFinalize(ntfHandle), SA_AIS_OK); test_validate(rc, SA_AIS_ERR_INVALID_PARAM); }
/** * Provoke a SA_AIS_ERR_BAD_HANDLE reply */ void saNtfPtrAllocateTest_03(void) { SaStringT *destPtr; SaNtfAlarmNotificationT myAlarmNotification; safassert(saNtfInitialize(&ntfHandle, &ntfSendCallbacks, &ntfVersion) , SA_AIS_OK); safassert(saNtfAlarmNotificationAllocate( ntfHandle, &myAlarmNotification, 0, 0, 0, 0, 0, 2, SA_NTF_ALLOC_SYSTEM_LIMIT), SA_AIS_OK); myAlarmNotification.proposedRepairActions[0].actionValueType = SA_NTF_VALUE_STRING; safassert(saNtfNotificationFree(myAlarmNotification.notificationHandle) , SA_AIS_OK); rc = saNtfPtrValAllocate( myAlarmNotification.notificationHandle, (SaUint16T)(strlen(DEFAULT_ADDITIONAL_TEXT) + 1), (void**) &destPtr, &(myAlarmNotification.proposedRepairActions[0].actionValue)); safassert(saNtfFinalize(ntfHandle), SA_AIS_OK); test_validate(rc, SA_AIS_ERR_BAD_HANDLE); }
void saImmOmSearchInitialize_2_10(void) { SaImmSearchHandleT searchHandle; char *value; char *env; int i; env = value = getenv("IMMA_MAX_OPEN_SEARCHES_PER_HANDLE"); if(!value) value = "100"; setenv("IMMA_MAX_OPEN_SEARCHES_PER_HANDLE", "200", 1); /* Increase number of open search handles to 200 */ safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK); setenv("IMMA_MAX_OPEN_SEARCHES_PER_HANDLE", value, 1); /* Reset to default value */ if(!env) unsetenv("IMMA_MAX_OPEN_SEARCHES_PER_HANDLE"); for(i=0; i<200; i++) safassert(saImmOmSearchInitialize_2(immOmHandle, NULL, SA_IMM_SUBTREE, SA_IMM_SEARCH_ONE_ATTR | SA_IMM_SEARCH_GET_NO_ATTR, NULL, NULL, &searchHandle), SA_AIS_OK); rc = saImmOmSearchInitialize_2(immOmHandle, NULL, SA_IMM_SUBTREE, /* Test maxSearchHandle + 1 */ SA_IMM_SEARCH_ONE_ATTR | SA_IMM_SEARCH_GET_NO_ATTR, NULL, NULL, &searchHandle); test_validate(rc, SA_AIS_ERR_NO_RESOURCES); safassert(saImmOmSearchFinalize(searchHandle), SA_AIS_OK); safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); }
void saLogWriteLogAsync_03(void) { SaInvocationT invocation = 0; SaLogRecordT ntfLogRecord; SaNtfIdentifierT notificationId = random(); SaNtfClassIdT notificationClassId; ntfLogRecord.logBuffer = ¬ificationStreamBuffer; strcpy((char*)ntfLogRecord.logBuffer->logBuf, __FUNCTION__); ntfLogRecord.logBuffer->logBufSize = strlen(__FUNCTION__); notificationClassId.vendorId = 193; notificationClassId.majorId = 1; notificationClassId.minorId = 2; ntfLogRecord.logTimeStamp = getSaTimeT(); ntfLogRecord.logHdrType = SA_LOG_NTF_HEADER; ntfLogRecord.logHeader.ntfHdr.notificationId = notificationId; ntfLogRecord.logHeader.ntfHdr.eventType = SA_NTF_ALARM_QOS; ntfLogRecord.logHeader.ntfHdr.notificationObject = ¬ificationObject; ntfLogRecord.logHeader.ntfHdr.notifyingObject = ¬ifyingObject; ntfLogRecord.logHeader.ntfHdr.notificationClassId = ¬ificationClassId; ntfLogRecord.logHeader.ntfHdr.eventTime = getSaTimeT(); safassert(saLogInitialize(&logHandle, &logCallbacks, &logVersion), SA_AIS_OK); safassert(saLogStreamOpen_2(logHandle, ¬ificationStreamName, NULL, 0, SA_TIME_ONE_SECOND, &logStreamHandle), SA_AIS_OK); rc = saLogWriteLogAsync(logStreamHandle, invocation, 0, &ntfLogRecord); safassert(saLogFinalize(logHandle), SA_AIS_OK); test_validate(rc, SA_AIS_OK); }
void saImmOiSelectionObjectGet_01(void) { safassert(saImmOiInitialize_2(&immOiHandle, &immOiCallbacks, &immVersion), SA_AIS_OK); rc = saImmOiSelectionObjectGet(immOiHandle, &selectionObject); test_validate(rc, SA_AIS_OK); safassert(saImmOiFinalize(immOiHandle), SA_AIS_OK); }
void saImmOmCcbObjectModify_2_02(void) { const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__; SaImmAdminOwnerHandleT ownerHandle; SaImmCcbHandleT ccbHandle; const SaNameT *objectNames[] = {&rootObj, NULL}; SaUint32T int1Value1 = __LINE__; SaUint32T* int1Values[] = {&int1Value1}; SaImmAttrValuesT_2 v1 = {"attr1", SA_IMM_ATTR_SAUINT32T, 1, (void**)int1Values}; SaImmAttrModificationT_2 attrMod = {SA_IMM_ATTR_VALUES_REPLACE, v1}; const SaImmAttrModificationT_2 *attrMods[] = {&attrMod, NULL}; safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK); safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK); safassert(saImmOmAdminOwnerSet(ownerHandle, objectNames, SA_IMM_ONE), SA_AIS_OK); safassert(config_object_create(immOmHandle, ownerHandle, &rootObj), SA_AIS_OK); safassert(saImmOmAdminOwnerSet(ownerHandle, dnObjs, SA_IMM_ONE), SA_AIS_OK); /* invalid handle */ if ((rc = saImmOmCcbObjectModify_2(-1, &dnObj1, attrMods)) != SA_AIS_ERR_BAD_HANDLE) goto done; /* already finalized handle */ safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK); safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK); rc = saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods); done: safassert(config_object_delete(immOmHandle, ownerHandle), SA_AIS_OK); safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK); safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); test_validate(rc, SA_AIS_ERR_BAD_HANDLE); }
/** * Test that the return value SA_AIS_ERR_INVALID_PARAM works * * Strategy: */ void saNtfObjectCreateDeleteNotificationAllocate_03(void) { saNotificationAllocationParamsT myNotificationAllocationParams; saNotificationFilterAllocationParamsT myNotificationFilterAllocationParams; saNotificationParamsT myNotificationParams; fillInDefaultValues(&myNotificationAllocationParams, &myNotificationFilterAllocationParams, &myNotificationParams); safassert(saNtfInitialize(&ntfHandle, &ntfCallbacks, &ntfVersion), SA_AIS_OK); rc = saNtfObjectCreateDeleteNotificationAllocate( ntfHandle, /* handle to Notification Service instance */ NULL, /* number of correlated notifications */ myNotificationAllocationParams.numCorrelatedNotifications, /* length of additional text */ myNotificationAllocationParams.lengthAdditionalText, /* number of additional info items*/ myNotificationAllocationParams.numAdditionalInfo, /* number of state changes */ myNotificationAllocationParams.numObjectAttributes, /* use default allocation size */ myNotificationAllocationParams.variableDataSize); free(myNotificationParams.additionalText); safassert(saNtfFinalize(ntfHandle), SA_AIS_OK); test_validate(rc, SA_AIS_ERR_INVALID_PARAM); }
void saImmOmCcbObjectModify_2_09(void) { const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__; SaImmAdminOwnerHandleT ownerHandle; SaImmCcbHandleT ccbHandle; const SaNameT *objectNames[] = {&rootObj, NULL}; SaStringT strValue = "Sch\366ne"; SaStringT* strValues[] = {&strValue}; SaImmAttrValuesT_2 v1 = {"attr4", SA_IMM_ATTR_SASTRINGT, 1, (void**)strValues}; SaImmAttrModificationT_2 attrMod = {SA_IMM_ATTR_VALUES_REPLACE, v1}; const SaImmAttrModificationT_2 *attrMods[] = {&attrMod, NULL}; safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK); safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK); safassert(saImmOmAdminOwnerSet(ownerHandle, objectNames, SA_IMM_ONE), SA_AIS_OK); safassert(config_object_create(immOmHandle, ownerHandle, &rootObj), SA_AIS_OK); safassert(saImmOmAdminOwnerSet(ownerHandle, dnObjs, SA_IMM_ONE), SA_AIS_OK); safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK); test_validate(saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods), SA_AIS_ERR_INVALID_PARAM); safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK); safassert(config_object_delete(immOmHandle, ownerHandle), SA_AIS_OK); safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK); safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); }
/* Test all filter handles set to NULL */ void saNtfNotificationSubscribe_03(void) { SaNtfHandleT ntfHandle; SaNtfNotificationTypeFilterHandlesT myNotificationFilterHandles; saNotificationAllocationParamsT myNotificationAllocationParams; saNotificationFilterAllocationParamsT myNotificationFilterAllocationParams; saNotificationParamsT myNotificationParams; fillInDefaultValues(&myNotificationAllocationParams, &myNotificationFilterAllocationParams, &myNotificationParams); safassert(saNtfInitialize(&ntfHandle, &ntfCallbacks, &ntfVersion), SA_AIS_OK); /* Initialize filter handles */ myNotificationFilterHandles.alarmFilterHandle = 0; myNotificationFilterHandles.attributeChangeFilterHandle = 0; myNotificationFilterHandles.objectCreateDeleteFilterHandle = 0; myNotificationFilterHandles.securityAlarmFilterHandle = 0; myNotificationFilterHandles.stateChangeFilterHandle = 0; rc = saNtfNotificationSubscribe(&myNotificationFilterHandles, 4); safassert(saNtfNotificationUnsubscribe(4), SA_AIS_ERR_NOT_EXIST); safassert(saNtfFinalize(ntfHandle), SA_AIS_OK); free(myNotificationParams.additionalText); /* allocated in fillInDefaultValues */ test_validate(rc, SA_AIS_ERR_INVALID_PARAM); }
void saNtfNotificationReadInitialize_04(void) { SaNtfHandleT ntfHandle; SaNtfSearchCriteriaT searchCriteria; SaNtfAlarmNotificationFilterT myAlarmFilter; SaNtfObjectCreateDeleteNotificationFilterT myObjCrDeFilter; SaNtfNotificationTypeFilterHandlesT myNotificationFilterHandles; SaNtfReadHandleT readHandle; searchCriteria.searchMode = SA_NTF_SEARCH_AT_OR_AFTER_TIME; fillInDefaultValues(&myNotificationAllocationParams, &myNotificationFilterAllocationParams, &myNotificationParams); safassert(saNtfInitialize(&ntfHandle, &ntfCallbacks, &ntfVersion),SA_AIS_OK); safassert(saNtfAlarmNotificationFilterAllocate( ntfHandle, /* handle to Notification Service instance */ &myAlarmFilter, /* put filter here */ /* number of event types */ myNotificationFilterAllocationParams.numEventTypes, /* number of notification objects */ myNotificationFilterAllocationParams.numNotificationObjects, /* number of notifying objects */ myNotificationFilterAllocationParams.numNotifyingObjects, /* number of notification class ids */ myNotificationFilterAllocationParams.numNotificationClassIds, /* number of probable causes */ myNotificationFilterAllocationParams.numProbableCauses, /* number of perceived severities */ myNotificationFilterAllocationParams.numPerceivedSeverities, /* number of trend indications */ myNotificationFilterAllocationParams.numTrends), SA_AIS_OK); safassert(saNtfObjectCreateDeleteNotificationFilterAllocate( ntfHandle, /* handle to Notification Service instance */ &myObjCrDeFilter, /* put filter here */ /* number of event types */ myNotificationFilterAllocationParams.numEventTypes, /* number of notification objects */ myNotificationFilterAllocationParams.numNotificationObjects, /* number of notifying objects */ myNotificationFilterAllocationParams.numNotifyingObjects, /* number of notification class ids */ myNotificationFilterAllocationParams.numNotificationClassIds, /* number of source indicators */ 0), SA_AIS_OK); myNotificationFilterHandles.alarmFilterHandle = myAlarmFilter.notificationFilterHandle; myNotificationFilterHandles.alarmFilterHandle = myObjCrDeFilter.notificationFilterHandle; rc = saNtfNotificationReadInitialize(searchCriteria, &myNotificationFilterHandles, &readHandle); safassert(saNtfFinalize(ntfHandle), SA_AIS_OK); free(myNotificationParams.additionalText); test_validate(rc, SA_AIS_OK); }
void saClmFinalize_03(void) { safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1), SA_AIS_OK); safassert(saClmFinalize(clmHandle), SA_AIS_OK); rc = saClmFinalize(clmHandle); test_validate(rc, SA_AIS_ERR_BAD_HANDLE); }
void saLogStreamOpen_2_04(void) { safassert(saLogInitialize(&logHandle, &logCallbacks, &logVersion), SA_AIS_OK); rc = saLogStreamOpen_2(logHandle, &app1StreamName, &appStream1LogFileCreateAttributes, SA_LOG_STREAM_CREATE, SA_TIME_ONE_SECOND, &logStreamHandle); safassert(saLogFinalize(logHandle), SA_AIS_OK); test_validate(rc, SA_AIS_OK); }
void saLogStreamOpen_2_03(void) { safassert(saLogInitialize(&logHandle, &logCallbacks, &logVersion), SA_AIS_OK); rc = saLogStreamOpen_2(logHandle, &alarmStreamName, NULL, 0, SA_TIME_ONE_SECOND, &logStreamHandle); safassert(saLogFinalize(logHandle), SA_AIS_OK); test_validate(rc, SA_AIS_OK); }
void saLogStreamOpen_2_06(void) { safassert(saLogInitialize(&logHandle, &logCallbacks, &logVersion), SA_AIS_OK); rc = saLogStreamOpen_2(logHandle, &systemStreamName, NULL, 0, SA_TIME_ONE_SECOND, NULL); safassert(saLogFinalize(logHandle), SA_AIS_OK); test_validate(rc, SA_AIS_ERR_INVALID_PARAM); }
void saLogStreamOpen_2_22(void) { init_file_create_attributes(); safassert(saLogInitialize(&logHandle, &logCallbacks, &logVersion), SA_AIS_OK); rc = saLogStreamOpen_2(logHandle, &app1StreamName, NULL, 0, SA_TIME_ONE_SECOND, &logStreamHandle); safassert(saLogFinalize(logHandle), SA_AIS_OK); test_validate(rc, SA_AIS_ERR_NOT_EXIST); }
void saPlmEntityGroupCreate_04(void) { SaPlmCallbacksT plms_cbks; plms_cbks.saPlmReadinessTrackCallback = &TrackCallbackT; safassert(saPlmInitialize(&plmHandle, &plms_cbks, &PlmVersion), SA_AIS_OK); rc = saPlmEntityGroupCreate(plmHandle,NULL); test_validate(rc, SA_AIS_ERR_INVALID_PARAM); safassert(saPlmFinalize(plmHandle), SA_AIS_OK); }
void saPlmSelectionObjectGet_01(void) { SaPlmCallbacksT plms_cbks; plms_cbks.saPlmReadinessTrackCallback = &TrackCallbackT; safassert(saPlmInitialize(&plmHandle, NULL, &PlmVersion), SA_AIS_OK); rc = saPlmSelectionObjectGet(plmHandle, &selectionObject); test_validate(rc, SA_AIS_OK); safassert(saPlmFinalize(plmHandle), SA_AIS_OK); }
void saImmOmClassDelete_2_04(void) { const SaImmClassNameT className = (SaImmClassNameT) ""; /* The empty classname */ safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK); rc = saImmOmClassDelete(immOmHandle, className); test_validate(rc, SA_AIS_ERR_INVALID_PARAM); safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); }
void saImmOmClassDelete_2_03(void) { const SaImmClassNameT className = (SaImmClassNameT) __FUNCTION__; safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK); rc = saImmOmClassDelete(immOmHandle, className); test_validate(rc, SA_AIS_ERR_NOT_EXIST); safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); }
void saClmFinalize_01(void) { safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1), SA_AIS_OK); rc = saClmFinalize(clmHandle); test_validate(rc, SA_AIS_OK); safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4), SA_AIS_OK); rc = saClmFinalize(clmHandle); test_validate(rc, SA_AIS_OK); }
/** * Test that return value SA_AIS_ERR_BAD_HANDLE works * * Strategy: Set the handle to zero or invalid number * Create a handle and then destroy it. */ void saNtfObjectCreateDeleteNotificationAllocate_02(void) { int errors = 0; SaNtfObjectCreateDeleteNotificationT myNotification; saNotificationAllocationParamsT myNotificationAllocationParams; saNotificationFilterAllocationParamsT myNotificationFilterAllocationParams; saNotificationParamsT myNotificationParams; fillInDefaultValues(&myNotificationAllocationParams, &myNotificationFilterAllocationParams, &myNotificationParams); ntfHandle = 0; rc = saNtfObjectCreateDeleteNotificationAllocate( ntfHandle, /* handle to Notification Service instance */ &myNotification, /* number of correlated notifications */ myNotificationAllocationParams.numCorrelatedNotifications, /* length of additional text */ myNotificationAllocationParams.lengthAdditionalText, /* number of additional info items*/ myNotificationAllocationParams.numAdditionalInfo, /* number of state changes */ myNotificationAllocationParams.numObjectAttributes, /* use default allocation size */ myNotificationAllocationParams.variableDataSize); if(rc != SA_AIS_ERR_BAD_HANDLE) { errors++; } free(myNotificationParams.additionalText); safassert(saNtfInitialize(&ntfHandle, &ntfCallbacks, &ntfVersion), SA_AIS_OK); safassert(saNtfFinalize(ntfHandle), SA_AIS_OK); rc = saNtfObjectCreateDeleteNotificationAllocate( ntfHandle, /* handle to Notification Service instance */ &myNotification, /* number of correlated notifications */ myNotificationAllocationParams.numCorrelatedNotifications, /* length of additional text */ myNotificationAllocationParams.lengthAdditionalText, /* number of additional info items*/ myNotificationAllocationParams.numAdditionalInfo, /* number of state changes */ myNotificationAllocationParams.numObjectAttributes, /* use default allocation size */ myNotificationAllocationParams.variableDataSize); if(rc != SA_AIS_ERR_BAD_HANDLE) { errors++; } rc = (errors == 0)? SA_AIS_OK: SA_AIS_ERR_BAD_HANDLE; test_validate(rc, SA_AIS_OK); }
void saLogWriteLog_01(void) { safassert(saLogInitialize(&logHandle, &logCallbacks, &logVersion), SA_AIS_OK); safassert(saLogStreamOpen_2(logHandle, &systemStreamName, NULL, 0, SA_TIME_ONE_SECOND, &logStreamHandle), SA_AIS_OK); rc = saLogWriteLog(logStreamHandle, SA_TIME_ONE_SECOND, &genLogRecord); safassert(saLogFinalize(logHandle), SA_AIS_OK); test_validate(rc, SA_AIS_OK); }
void saLogLimitGet_01(void) { SaLimitValueT limitValue; safassert(saLogInitialize(&logHandle, &logCallbacks, &logVersion), SA_AIS_OK); rc = saLogLimitGet(logHandle, SA_LOG_MAX_NUM_CLUSTER_APP_LOG_STREAMS_ID, &limitValue); safassert(saLogFinalize(logHandle), SA_AIS_OK); test_validate(rc, SA_AIS_OK); }
void saImmOiRtObjectCreate_2_04(void) { safassert(saImmOiInitialize_2(&immOiHandle, &immOiCallbacks, &immVersion), SA_AIS_OK); rc = saImmOiRtObjectCreate_2(immOiHandle, className, &rootObj, attrValues); test_validate(rc, SA_AIS_ERR_BAD_OPERATION); safassert(saImmOiFinalize(immOiHandle), SA_AIS_OK); }
void saNtfNotificationUnsubscribe_03(void) { SaNtfHandleT ntfHandle; safassert(saNtfInitialize(&ntfHandle, &ntfCallbacks, &ntfVersion), SA_AIS_OK); rc = saNtfNotificationUnsubscribe(44); safassert(saNtfFinalize(ntfHandle), SA_AIS_OK); test_validate(rc, SA_AIS_ERR_NOT_EXIST); }
void saPlmEntityGroupCreate_03(void) { SaPlmCallbacksT plms_cbks; plms_cbks.saPlmReadinessTrackCallback = &TrackCallbackT; safassert(saPlmInitialize(&plmHandle, &plms_cbks, &PlmVersion), SA_AIS_OK); rc = saPlmEntityGroupCreate( -1 ,&entityGroupHandle); test_validate(rc, SA_AIS_ERR_BAD_HANDLE); safassert(saPlmFinalize(plmHandle), SA_AIS_OK); }
void saImmOmSearchInitialize_2_02(void) { SaImmSearchHandleT searchHandle; safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK); rc = saImmOmSearchInitialize_2(-1, NULL, SA_IMM_SUBTREE, SA_IMM_SEARCH_ONE_ATTR | SA_IMM_SEARCH_GET_NO_ATTR, NULL, NULL, &searchHandle); test_validate(rc, SA_AIS_ERR_BAD_HANDLE); safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); }
void saImmOmSearchInitialize_2_04(void) { SaImmSearchHandleT searchHandle; safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK); rc = saImmOmSearchInitialize_2(immOmHandle, NULL, SA_IMM_ONE, SA_IMM_SEARCH_ONE_ATTR | SA_IMM_SEARCH_GET_NO_ATTR, NULL, NULL, &searchHandle); test_validate(rc, SA_AIS_ERR_INVALID_PARAM); safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); }