All calls to CLM APIs in clmtest do not handle SA_AIS_ERR_TRY_AGAIN.
Running clmtest sometimes get failed because of this miss.
Create wrappers which handling try again error code inside.
---
src/clm/Makefile.am | 4 +-
src/clm/apitest/clm_util.c | 385 +++++++++++++++++++++
src/clm/apitest/clm_util.h | 114 ++++++
src/clm/apitest/clmtest.h | 1 +
src/clm/apitest/tet_ClmLongRdn.c | 34 +-
src/clm/apitest/tet_saClmClusterNodeGet.c | 113 +++---
src/clm/apitest/tet_saClmClusterNodeGetAsync.c | 105 +++---
src/clm/apitest/tet_saClmClusterNotificationFree.c | 19 +-
src/clm/apitest/tet_saClmClusterTrack.c | 307 ++++++++--------
src/clm/apitest/tet_saClmClusterTrackStop.c | 29 +-
src/clm/apitest/tet_saClmDispatch.c | 29 +-
src/clm/apitest/tet_saClmFinalize.c | 17 +-
src/clm/apitest/tet_saClmInitialize.c | 76 ++--
src/clm/apitest/tet_saClmResponse.c | 59 ++--
src/clm/apitest/tet_saClmSelectionObjectGet.c | 25 +-
15 files changed, 907 insertions(+), 410 deletions(-)
create mode 100644 src/clm/apitest/clm_util.c
create mode 100644 src/clm/apitest/clm_util.h
diff --git a/src/clm/Makefile.am b/src/clm/Makefile.am
index 884e39b..2340a9b 100644
--- a/src/clm/Makefile.am
+++ b/src/clm/Makefile.am
@@ -183,7 +183,8 @@ if ENABLE_TESTS
bin_PROGRAMS += bin/clmtest
noinst_HEADERS += \
- src/clm/apitest/clmtest.h
+ src/clm/apitest/clmtest.h \
+ src/clm/apitest/clm_util.h
bin_clmtest_CPPFLAGS = \
-DSA_CLM_B01=1 \
@@ -191,6 +192,7 @@ bin_clmtest_CPPFLAGS = \
bin_clmtest_SOURCES = \
src/clm/apitest/clmtest.c \
+ src/clm/apitest/clm_util.c \
src/clm/apitest/tet_saClmInitialize.c \
src/clm/apitest/tet_saClmClusterNodeGetAsync.c \
src/clm/apitest/tet_saClmClusterTrack.c \
diff --git a/src/clm/apitest/clm_util.c b/src/clm/apitest/clm_util.c
new file mode 100644
index 0000000..3b2baf3
--- /dev/null
+++ b/src/clm/apitest/clm_util.c
@@ -0,0 +1,385 @@
+/* -*- OpenSAF -*-
+ *
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
+ * under the GNU Lesser General Public License Version 2.1, February 1999.
+ * The complete license can be accessed from the following location:
+ * http://opensource.org/licenses/lgpl-license.php
+ * See the Copying file included with the OpenSAF distribution for full
+ * licensing terms.
+ *
+ */
+
+#include "clm_util.h"
+#include "base/osaf_time.h"
+
+struct RetryControl {
+ // Sleep time b/w retries
+ struct timespec interval;
+ // Maximum time for retries (ms)
+ uint64_t timeout;
+};
+
+static struct RetryControl retry_ctrl = {
+ .interval = {0, 40*1000*1000}, // 40ms
+ .timeout = 10*1000 // 10ms
+};
+
+#if defined(SA_CLM_B01) || defined(SA_CLM_B02)
+SaAisErrorT clmutil_saClmInitialize(
+ SaClmHandleT *handle,
+ const SaClmCallbacksT *cbs,
+ SaVersionT *version)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ SaVersionT ver;
+ struct timespec timeout;
+
+ // Avoid coredump when user passes NULL to version.
+ if (version) ver = *version;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmInitialize(handle, cbs, version ? &ver : NULL);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ if (version) ver = *version;
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+#endif
+
+#ifdef SA_CLM_B03
+SaAisErrorT clmutil_saClmInitialize_3(
+ SaClmHandleT *handle,
+ const SaClmCallbacksT_3 *cbs,
+ SaVersionT *version)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ SaVersionT ver;
+ struct timespec timeout;
+
+ // Avoid coredump when user passes NULL to version.
+ if (version) ver = *version;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmInitialize_3(handle, cbs, version ? &ver : NULL);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ if (version) ver = *version;
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+#endif
+
+SaAisErrorT clmutil_saClmInitialize_4(
+ SaClmHandleT *handle,
+ const SaClmCallbacksT_4 *cbs,
+ SaVersionT *version)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ SaVersionT ver;
+ struct timespec timeout;
+
+ // Avoid coredump when user passes NULL to version.
+ if (version) ver = *version;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmInitialize_4(handle, cbs, version ? &ver : NULL);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ ver = *version;
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+SaAisErrorT clmutil_saClmSelectionObjectGet(
+ SaClmHandleT handle,
+ SaSelectionObjectT *selectionObject)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmSelectionObjectGet(handle, selectionObject);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+SaAisErrorT clmutil_saClmDispatch(
+ SaClmHandleT handle,
+ SaDispatchFlagsT dispatchFlags)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmDispatch(handle, dispatchFlags);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+SaAisErrorT clmutil_saClmFinalize(
+ SaClmHandleT handle)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmFinalize(handle);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+#if defined(SA_CLM_B01) || defined(SA_CLM_B02) || defined(SA_CLM_B03)
+SaAisErrorT clmutil_saClmClusterTrack(
+ SaClmHandleT handle,
+ SaUint8T trackFlags,
+ SaClmClusterNotificationBufferT *buffer)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmClusterTrack(handle, trackFlags, buffer);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+SaAisErrorT clmutil_saClmClusterNodeGet(
+ SaClmHandleT handle,
+ SaClmNodeIdT nodeId,
+ SaTimeT timeout,
+ SaClmClusterNodeT *clNode)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec tout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &tout);
+ while (osaf_timeout_time_left(&tout)) {
+ ais_rc = saClmClusterNodeGet(handle, nodeId, timeout, clNode);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+#endif
+
+#if defined(SA_CLM_B02) || defined(SA_CLM_B03)
+SaAisErrorT clmutil_saClmClusterNotificationFree(
+ SaClmHandleT handle,
+ SaClmClusterNotificationT *notification)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmClusterNotificationFree(handle, notification);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+#endif
+
+#ifdef SA_CLM_B03
+SaAisErrorT clmutil_saClmResponse(
+ SaClmHandleT handle,
+ SaInvocationT invocation,
+ SaAisErrorT error)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmResponse(handle, invocation, error);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+#endif
+
+SaAisErrorT clmutil_saClmClusterTrack_4(
+ SaClmHandleT handle,
+ SaUint8T trackFlags,
+ SaClmClusterNotificationBufferT_4 *buffer)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmClusterTrack_4(handle, trackFlags, buffer);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+SaAisErrorT clmutil_saClmClusterTrackStop(
+ SaClmHandleT handle)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmClusterTrackStop(handle);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+SaAisErrorT clmutil_saClmClusterNotificationFree_4(
+ SaClmHandleT handle,
+ SaClmClusterNotificationT_4 *notification)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmClusterNotificationFree_4(handle, notification);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+SaAisErrorT clmutil_saClmClusterNodeGet_4(
+ SaClmHandleT handle,
+ SaClmNodeIdT nodeId,
+ SaTimeT timeout,
+ SaClmClusterNodeT_4 *clNode)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec tout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &tout);
+ while (osaf_timeout_time_left(&tout)) {
+ ais_rc = saClmClusterNodeGet_4(handle, nodeId, timeout, clNode);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+SaAisErrorT clmutil_saClmClusterNodeGetAsync(
+ SaClmHandleT handle,
+ SaInvocationT invocation,
+ SaClmNodeIdT nodeId)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmClusterNodeGetAsync(handle, invocation, nodeId);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
+
+SaAisErrorT clmutil_saClmResponse_4(
+ SaClmHandleT handle,
+ SaInvocationT invocation,
+ SaClmResponseT response)
+{
+ SaAisErrorT ais_rc = SA_AIS_OK;
+ struct timespec timeout;
+
+ osaf_set_millis_timeout(retry_ctrl.timeout, &timeout);
+ while (osaf_timeout_time_left(&timeout)) {
+ ais_rc = saClmResponse_4(handle, invocation, response);
+ if (ais_rc == SA_AIS_ERR_TRY_AGAIN) {
+ osaf_nanosleep(&retry_ctrl.interval);
+ continue;
+ }
+ break;
+ }
+
+ return ais_rc;
+}
diff --git a/src/clm/apitest/clm_util.h b/src/clm/apitest/clm_util.h
new file mode 100644
index 0000000..cdff1e8
--- /dev/null
+++ b/src/clm/apitest/clm_util.h
@@ -0,0 +1,114 @@
+/* -*- OpenSAF -*-
+ *
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
+ * under the GNU Lesser General Public License Version 2.1, February 1999.
+ * The complete license can be accessed from the following location:
+ * http://opensource.org/licenses/lgpl-license.php
+ * See the Copying file included with the OpenSAF distribution for full
+ * licensing terms.
+ *
+ */
+
+#ifndef CLM_APITEST_CLM_UTIL_H_
+#define CLM_APITEST_CLM_UTIL_H_
+
+#include "ais/include/saClm.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(SA_CLM_B01) || defined(SA_CLM_B02)
+SaAisErrorT clmutil_saClmInitialize(
+ SaClmHandleT *clmHandle,
+ const SaClmCallbacksT *clmCallbacks,
+ SaVersionT *version);
+#endif /* SA_CLM_B01 || SA_CLM_B02 */
+
+#ifdef SA_CLM_B03
+SaAisErrorT clmutil_saClmInitialize_3(
+ SaClmHandleT *clmHandle,
+ const SaClmCallbacksT_3 *clmCallbacks,
+ SaVersionT *version);
+#endif /* SA_CLM_B03 */
+
+SaAisErrorT clmutil_saClmInitialize_4(
+ SaClmHandleT *clmHandle,
+ const SaClmCallbacksT_4 *clmCallbacks,
+ SaVersionT *version);
+
+
+SaAisErrorT clmutil_saClmSelectionObjectGet(
+ SaClmHandleT clmHandle,
+ SaSelectionObjectT *selectionObject);
+
+SaAisErrorT clmutil_saClmDispatch(
+ SaClmHandleT clmHandle,
+ SaDispatchFlagsT dispatchFlags);
+
+SaAisErrorT clmutil_saClmFinalize(
+ SaClmHandleT clmHandle);
+
+#if defined(SA_CLM_B01) || defined(SA_CLM_B02) || defined(SA_CLM_B03)
+SaAisErrorT clmutil_saClmClusterTrack(
+ SaClmHandleT clmHandle,
+ SaUint8T trackFlags,
+ SaClmClusterNotificationBufferT *notificationBuffer);
+
+SaAisErrorT clmutil_saClmClusterNodeGet(
+ SaClmHandleT clmHandle,
+ SaClmNodeIdT nodeId,
+ SaTimeT timeout,
+ SaClmClusterNodeT *clusterNode);
+#endif /* SA_CLM_B01 || SA_CLM_B02 || SA_CLM_B03 */
+
+#if defined(SA_CLM_B02) || defined(SA_CLM_B03)
+SaAisErrorT clmutil_saClmClusterNotificationFree(
+ SaClmHandleT clmHandle,
+ SaClmClusterNotificationT *notification);
+#endif /* SA_CLM_B02 || SA_CLM_B03 */
+
+#ifdef SA_CLM_B03
+SaAisErrorT clmutil_saClmResponse(
+ SaClmHandleT clmHandle,
+ SaInvocationT invocation,
+ SaAisErrorT error);
+#endif /* SA_CLM_B03 */
+
+SaAisErrorT clmutil_saClmClusterTrack_4(
+ SaClmHandleT clmHandle,
+ SaUint8T trackFlags,
+ SaClmClusterNotificationBufferT_4 *notificationBuffer);
+
+SaAisErrorT clmutil_saClmClusterTrackStop(
+ SaClmHandleT clmHandle);
+
+SaAisErrorT clmutil_saClmClusterNotificationFree_4(
+ SaClmHandleT clmHandle,
+ SaClmClusterNotificationT_4 *notification);
+
+SaAisErrorT clmutil_saClmClusterNodeGet_4(
+ SaClmHandleT clmHandle,
+ SaClmNodeIdT nodeId,
+ SaTimeT timeout,
+ SaClmClusterNodeT_4 *clusterNode);
+
+SaAisErrorT clmutil_saClmClusterNodeGetAsync(
+ SaClmHandleT clmHandle,
+ SaInvocationT invocation,
+ SaClmNodeIdT nodeId);
+
+SaAisErrorT clmutil_saClmResponse_4(
+ SaClmHandleT clmHandle,
+ SaInvocationT invocation,
+ SaClmResponseT response);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //< CLM_APITEST_CLM_UTIL_H_
diff --git a/src/clm/apitest/clmtest.h b/src/clm/apitest/clmtest.h
index 02449a0..a34e823 100644
--- a/src/clm/apitest/clmtest.h
+++ b/src/clm/apitest/clmtest.h
@@ -26,6 +26,7 @@
#include <assert.h>
#include "osaf/apitest/utest.h"
#include "osaf/apitest/util.h"
+#include "clm_util.h"
#include <poll.h>
#include <unistd.h>
diff --git a/src/clm/apitest/tet_ClmLongRdn.c b/src/clm/apitest/tet_ClmLongRdn.c
index 53e6c1d..12ea770 100644
--- a/src/clm/apitest/tet_ClmLongRdn.c
+++ b/src/clm/apitest/tet_ClmLongRdn.c
@@ -307,13 +307,13 @@ void saClmLongRdn_02(void)
return;
}
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
if (rc != SA_AIS_OK) {
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
// Failed at saClmClusterTrack_4
test_validate(rc, SA_AIS_OK);
return;
@@ -336,9 +336,9 @@ void saClmLongRdn_02(void)
break;
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(s_clmTrackCallback_err, SA_AIS_OK);
unlock_node(nodeName);
@@ -362,13 +362,13 @@ void saClmLongRdn_03(void)
return;
}
- safassert(saClmInitialize(&clmHandle, &clmCallback, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallback,
&clmVersion_1),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
if (rc != SA_AIS_OK) {
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
// Failed at saClmClusterTrack
test_validate(rc, SA_AIS_OK);
return;
@@ -391,9 +391,9 @@ void saClmLongRdn_03(void)
break;
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(s_clmTrackCallback_err, SA_AIS_OK);
unlock_node(nodeName);
@@ -467,10 +467,10 @@ void saClmLongRdn_05(void)
nodeId = getClmNodeId(nodeName);
assert(nodeId != 0);
- safassert(saClmInitialize_4(&clmHandle, NULL, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, NULL, &clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGet_4(clmHandle, nodeId, 10000000000ll,
+ rc = clmutil_saClmClusterNodeGet_4(clmHandle, nodeId, 10000000000ll,
&clusterNode);
// SaNameT value cannot be longer than 255, so we don't need to use
@@ -506,7 +506,7 @@ void saClmLongRdn_06(void)
nodeId = getClmNodeId(nodeName);
assert(nodeId != 0);
- safassert(saClmInitialize(&clmHandle, NULL, &clmVersion_1), SA_AIS_OK);
+ safassert(clmutil_saClmInitialize(&clmHandle, NULL, &clmVersion_1),
SA_AIS_OK);
rc =
saClmClusterNodeGet(clmHandle, nodeId, 10000000000ll, &clusterNode);
diff --git a/src/clm/apitest/tet_saClmClusterNodeGet.c
b/src/clm/apitest/tet_saClmClusterNodeGet.c
index c26939d..84a8e05 100644
--- a/src/clm/apitest/tet_saClmClusterNodeGet.c
+++ b/src/clm/apitest/tet_saClmClusterNodeGet.c
@@ -1,6 +1,7 @@
/* -*- OpenSAF -*-
*
* (C) Copyright 13134308 The OpenSAF Foundation
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -25,120 +26,120 @@ SaTimeT timeout = 10000000000ll;
void saClmClusterNodeGet_01(void)
{
nodeId = 131343;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGet(clmHandle, nodeId, timeout, &clusterNode_1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet(clmHandle, nodeId, timeout,
&clusterNode_1);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
void saClmClusterNodeGet_02(void)
{
nodeId = 131343;
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGet_4(clmHandle, nodeId, timeout, &clusterNode_4);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet_4(clmHandle, nodeId, timeout,
&clusterNode_4);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
void saClmClusterNodeGet_03(void)
{
nodeId = 131343;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGet(0, nodeId, timeout, &clusterNode_1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet(0, nodeId, timeout, &clusterNode_1);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
nodeId = 131343;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGet(-1, nodeId, timeout, &clusterNode_1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet(-1, nodeId, timeout, &clusterNode_1);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
nodeId = 131343;
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGet_4(0, nodeId, timeout, &clusterNode_4);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet_4(0, nodeId, timeout, &clusterNode_4);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
nodeId = 131343;
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGet_4(-1, nodeId, timeout, &clusterNode_4);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet_4(-1, nodeId, timeout, &clusterNode_4);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
void saClmClusterNodeGet_04(void)
{
nodeId = 131343;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGet(clmHandle, nodeId, 0, &clusterNode_1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet(clmHandle, nodeId, 0, &clusterNode_1);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
nodeId = 131343;
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGet_4(clmHandle, nodeId, 0, &clusterNode_4);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet_4(clmHandle, nodeId, 0,
&clusterNode_4);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
void saClmClusterNodeGet_05(void)
{
nodeId = 131343;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGet(clmHandle, nodeId, timeout, NULL);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet(clmHandle, nodeId, timeout, NULL);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
nodeId = 131343;
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGet_4(clmHandle, nodeId, timeout, NULL);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet_4(clmHandle, nodeId, timeout, NULL);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}
void saClmClusterNodeGet_06(void)
{
nodeId = 255; /*node does not exist*/
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGet(clmHandle, nodeId, timeout, &clusterNode_1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet(clmHandle, nodeId, timeout,
&clusterNode_1);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_NOT_EXIST);
nodeId = 255;
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGet_4(clmHandle, nodeId, timeout, &clusterNode_4);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet_4(clmHandle, nodeId, timeout,
&clusterNode_4);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_NOT_EXIST);
}
void saClmClusterNodeGet_07(void)
{
nodeId = 170255; /*node is non member, 0x2990F*/
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGet(clmHandle, nodeId, timeout, &clusterNode_1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet(clmHandle, nodeId, timeout,
&clusterNode_1);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
/*test_validate(rc, SA_AIS_ERR_UNAVAILABLE);*/
test_validate(rc, SA_AIS_ERR_NOT_EXIST);
nodeId = 170255;
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGet_4(clmHandle, nodeId, timeout, &clusterNode_4);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet_4(clmHandle, nodeId, timeout,
&clusterNode_4);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
/*test_validate(rc, SA_AIS_ERR_UNAVAILABLE);*/
test_validate(rc, SA_AIS_ERR_NOT_EXIST);
}
@@ -146,36 +147,36 @@ void saClmClusterNodeGet_07(void)
void saClmClusterNodeGet_08(void)
{
nodeId = 5;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGet_4(clmHandle, nodeId, timeout, &clusterNode_4);
- /*rc = saClmClusterNodeGet(clmHandle, nodeId, timeout, NULL);*/
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet_4(clmHandle, nodeId, timeout,
&clusterNode_4);
+ /*rc = clmutil_saClmClusterNodeGet(clmHandle, nodeId, timeout, NULL);*/
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_VERSION);
nodeId = 5;
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGet(clmHandle, nodeId, timeout, &clusterNode_1);
- /*rc = saClmClusterNodeGet(clmHandle, nodeId, timeout, NULL);*/
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGet(clmHandle, nodeId, timeout,
&clusterNode_1);
+ /*rc = clmutil_saClmClusterNodeGet(clmHandle, nodeId, timeout, NULL);*/
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_VERSION);
}
void saClmClusterNodeGet_09(void)
{
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGet(clmHandle, SA_CLM_LOCAL_NODE_ID, timeout,
+ rc = clmutil_saClmClusterNodeGet(clmHandle, SA_CLM_LOCAL_NODE_ID,
timeout,
&clusterNode_1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGet_4(clmHandle, SA_CLM_LOCAL_NODE_ID, timeout,
+ rc = clmutil_saClmClusterNodeGet_4(clmHandle, SA_CLM_LOCAL_NODE_ID,
timeout,
&clusterNode_4);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
diff --git a/src/clm/apitest/tet_saClmClusterNodeGetAsync.c b/src/clm/apitest/tet_saClmClusterNodeGetAsync.c
index cb7290a..0562c90 100644
--- a/src/clm/apitest/tet_saClmClusterNodeGetAsync.c
+++ b/src/clm/apitest/tet_saClmClusterNodeGetAsync.c
@@ -1,6 +1,7 @@
/* -*- OpenSAF -*-
*
* (C) Copyright 13134308 The OpenSAF Foundation
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -47,19 +48,19 @@ void saClmClusterNodeGetAsync_01(void)
invocation = 600;
SaAisErrorT rc;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks1,
&clmVersion_1),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
/*
fds[0].fd = (int) selectionObject;
fds[0].events = POLLIN;
ret = poll(fds, 1, 1000);
assert(ret == 1);
*/
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -71,19 +72,19 @@ void saClmClusterNodeGetAsync_02(void)
invocation = 700;
SaAisErrorT rc;
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
ret = poll(fds, 1, 1000);
assert(ret == 1);
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -91,28 +92,28 @@ void saClmClusterNodeGetAsync_03(void)
{
nodeId = 131343;
invocation = 300;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(0, invocation, nodeId);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGetAsync(0, invocation, nodeId);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
- safassert(saClmInitialize(&clmHandle, &clmCallbacks1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(-1, invocation, nodeId);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGetAsync(-1, invocation, nodeId);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(0, invocation, nodeId);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGetAsync(0, invocation, nodeId);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(-1, invocation, nodeId);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGetAsync(-1, invocation, nodeId);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
@@ -120,10 +121,10 @@ void saClmClusterNodeGetAsync_04(void)
{
nodeId = 131343;
invocation = 400;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(clmHandle, 0, nodeId);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, 0, nodeId);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}
@@ -131,10 +132,10 @@ void saClmClusterNodeGetAsync_05(void)
{
nodeId = 131343;
invocation = 500;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation, 0);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation, 0);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}
void saClmClusterNodeGetAsync_06(void)
@@ -145,19 +146,19 @@ void saClmClusterNodeGetAsync_06(void)
invocation = 600;
SaAisErrorT rc;
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
ret = poll(fds, 1, 1000);
assert(ret == 1);
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -168,18 +169,18 @@ void saClmClusterNodeGetAsync_07(void)
nodeId = 131855; /*node is non member*/
invocation = 700;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks1,
&clmVersion_1),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
ret = poll(fds, 1, 1000);
assert(ret == 1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -189,11 +190,11 @@ void saClmClusterNodeGetAsync_08(void)
SaAisErrorT rc;
int ret;
invocation = 900;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks1,
&clmVersion_1),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation,
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation,
SA_CLM_LOCAL_NODE_ID);
fds[0].fd = (int)selectionObject;
@@ -201,8 +202,8 @@ void saClmClusterNodeGetAsync_08(void)
ret = poll(fds, 1, 1000);
assert(ret == 1);
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -214,33 +215,33 @@ void saClmClusterNodeGetAsync_09(void)
invocation = 600;
SaAisErrorT rc;
- safassert(saClmInitialize(&clmHandle, NULL, &clmVersion_1), SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmInitialize(&clmHandle, NULL, &clmVersion_1),
SA_AIS_OK);
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
/*
fds[0].fd = (int) selectionObject;
fds[0].events = POLLIN;
ret = poll(fds, 1, 1000);
assert(ret == 1);
*/
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INIT);
- safassert(saClmInitialize_4(&clmHandle, NULL, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, NULL, &clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
/*
fds[0].fd = (int) selectionObject;
fds[0].events = POLLIN;
ret = poll(fds, 1, 1000);
assert(ret == 1);
*/
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INIT);
}
diff --git a/src/clm/apitest/tet_saClmClusterNotificationFree.c b/src/clm/apitest/tet_saClmClusterNotificationFree.c
index 22faf15..a799e48 100644
--- a/src/clm/apitest/tet_saClmClusterNotificationFree.c
+++ b/src/clm/apitest/tet_saClmClusterNotificationFree.c
@@ -1,6 +1,7 @@
/* -*- OpenSAF -*-
*
* (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -26,12 +27,12 @@ void saClmClusterNotificationFree_01(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_4.numberOfItems);
- safassert(saClmInitialize_4(&clmHandle, NULL, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, NULL, &clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterNotificationFree_4(clmHandle,
+ rc = clmutil_saClmClusterNotificationFree_4(clmHandle,
notificationBuffer_4.notification);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -43,11 +44,11 @@ void saClmClusterNotificationFree_02(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_4.numberOfItems);
- safassert(saClmInitialize(&clmHandle, NULL, &clmVersion_1), SA_AIS_OK);
+ safassert(clmutil_saClmInitialize(&clmHandle, NULL, &clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterNotificationFree_4(clmHandle,
+ rc = clmutil_saClmClusterNotificationFree_4(clmHandle,
notificationBuffer_4.notification);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_VERSION);
}
@@ -59,10 +60,10 @@ void saClmClusterNotificationFree_03(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_4.numberOfItems);
- rc = saClmClusterNotificationFree_4(0,
+ rc = clmutil_saClmClusterNotificationFree_4(0,
notificationBuffer_4.notification);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
- rc = saClmClusterNotificationFree_4(clmHandle, NULL);
+ rc = clmutil_saClmClusterNotificationFree_4(clmHandle, NULL);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}
@@ -74,7 +75,7 @@ void saClmClusterNotificationFree_04(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_4.numberOfItems);
- rc = saClmClusterNotificationFree_4(-1,
+ rc = clmutil_saClmClusterNotificationFree_4(-1,
notificationBuffer_4.notification);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
diff --git a/src/clm/apitest/tet_saClmClusterTrack.c
b/src/clm/apitest/tet_saClmClusterTrack.c
index 8a8ca89..cbbe728 100644
--- a/src/clm/apitest/tet_saClmClusterTrack.c
+++ b/src/clm/apitest/tet_saClmClusterTrack.c
@@ -1,6 +1,7 @@
/* -*- OpenSAF -*-
*
* (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -253,13 +254,13 @@ void saClmClusterTrack_01(void)
sizeof(SaClmClusterNotificationT) *
notificationBuffer_1.numberOfItems);
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, trackFlags, ¬ificationBuffer_1);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags,
¬ificationBuffer_1);
printf("rc = %u", rc);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_ERR_NOT_EXIST);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle),
SA_AIS_ERR_NOT_EXIST);
free(notificationBuffer_1.notification);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -272,15 +273,15 @@ void saClmClusterTrack_02(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_4.numberOfItems);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, ¬ificationBuffer_4);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags,
¬ificationBuffer_4);
clmTrackbuf_4(¬ificationBuffer_4);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_ERR_NOT_EXIST);
- safassert(saClmClusterNotificationFree_4(
+ safassert(clmutil_saClmClusterTrackStop(clmHandle),
SA_AIS_ERR_NOT_EXIST);
+ safassert(clmutil_saClmClusterNotificationFree_4(
clmHandle, notificationBuffer_4.notification),
SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -292,12 +293,12 @@ void saClmClusterTrack_03(void)
sizeof(SaClmClusterNotificationT) *
notificationBuffer_1.numberOfItems);
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, trackFlags, ¬ificationBuffer_1);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_ERR_NOT_EXIST);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags,
¬ificationBuffer_1);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle),
SA_AIS_ERR_NOT_EXIST);
free(notificationBuffer_1.notification);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -310,15 +311,15 @@ void saClmClusterTrack_04(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_4.numberOfItems);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, ¬ificationBuffer_4);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags,
¬ificationBuffer_4);
clmTrackbuf_4(¬ificationBuffer_4);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_ERR_NOT_EXIST);
- safassert(saClmClusterNotificationFree_4(
+ safassert(clmutil_saClmClusterTrackStop(clmHandle),
SA_AIS_ERR_NOT_EXIST);
+ safassert(clmutil_saClmClusterNotificationFree_4(
clmHandle, notificationBuffer_4.notification),
SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -330,12 +331,12 @@ void saClmClusterTrack_05(void)
sizeof(SaClmClusterNotificationT) *
notificationBuffer_1.numberOfItems);
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack(0, trackFlags, ¬ificationBuffer_1);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ rc = clmutil_saClmClusterTrack(0, trackFlags, ¬ificationBuffer_1);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
free(notificationBuffer_1.notification);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
trackFlags = (SA_TRACK_CURRENT | SA_TRACK_LOCAL);
@@ -344,12 +345,12 @@ void saClmClusterTrack_05(void)
sizeof(SaClmClusterNotificationT) *
notificationBuffer_1.numberOfItems);
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack(-1, trackFlags, ¬ificationBuffer_1);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ rc = clmutil_saClmClusterTrack(-1, trackFlags, ¬ificationBuffer_1);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
free(notificationBuffer_1.notification);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
@@ -361,12 +362,12 @@ void saClmClusterTrack_06(void)
sizeof(SaClmClusterNotificationT) *
notificationBuffer_1.numberOfItems);
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, 0, ¬ificationBuffer_1);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ rc = clmutil_saClmClusterTrack(clmHandle, 0, ¬ificationBuffer_1);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
free(notificationBuffer_1.notification);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_FLAGS);
}
@@ -378,15 +379,15 @@ void saClmClusterTrack_07(void)
sizeof(SaClmClusterNotificationT) *
notificationBuffer_1.numberOfItems);
- /*safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ /*safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
* SA_AIS_OK);*/
- safassert(saClmInitialize(&clmHandle, NULL, &clmVersion_1), SA_AIS_OK);
- /*rc = saClmClusterTrack(clmHandle, trackFlags, ¬ificationBuffer_1);
+ safassert(clmutil_saClmInitialize(&clmHandle, NULL, &clmVersion_1),
SA_AIS_OK);
+ /*rc = clmutil_saClmClusterTrack(clmHandle, trackFlags,
¬ificationBuffer_1);
*/
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
free(notificationBuffer_1.notification);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INIT);
}
@@ -399,14 +400,14 @@ void saClmClusterTrack_08(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_4.numberOfItems);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterTrack_4(0, trackFlags, ¬ificationBuffer_4);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
- safassert(saClmClusterNotificationFree_4(
+ rc = clmutil_saClmClusterTrack_4(0, trackFlags, ¬ificationBuffer_4);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ safassert(clmutil_saClmClusterNotificationFree_4(
clmHandle, notificationBuffer_4.notification),
SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
trackFlags = (SA_TRACK_CURRENT | SA_TRACK_LOCAL);
@@ -416,14 +417,14 @@ void saClmClusterTrack_08(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_4.numberOfItems);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterTrack_4(-1, trackFlags, ¬ificationBuffer_4);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
- safassert(saClmClusterNotificationFree_4(
+ rc = clmutil_saClmClusterTrack_4(-1, trackFlags, ¬ificationBuffer_4);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ safassert(clmutil_saClmClusterNotificationFree_4(
clmHandle, notificationBuffer_4.notification),
SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
@@ -436,14 +437,14 @@ void saClmClusterTrack_09(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_4.numberOfItems);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, 0, ¬ificationBuffer_4);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
- safassert(saClmClusterNotificationFree_4(
+ rc = clmutil_saClmClusterTrack_4(clmHandle, 0, ¬ificationBuffer_4);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ safassert(clmutil_saClmClusterNotificationFree_4(
clmHandle, notificationBuffer_4.notification),
SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_FLAGS);
}
@@ -456,14 +457,14 @@ void saClmClusterTrack_10(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_4.numberOfItems);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
- safassert(saClmClusterNotificationFree_4(
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ safassert(clmutil_saClmClusterNotificationFree_4(
clmHandle, notificationBuffer_4.notification),
SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INIT);
}
@@ -476,12 +477,12 @@ void saClmClusterTrack_11(void)
sizeof(SaClmClusterNotificationT_4) *
notificationBuffer_1.numberOfItems);
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, ¬ificationBuffer_4);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags,
¬ificationBuffer_4);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
free(notificationBuffer_4.notification);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_VERSION);
}
@@ -493,24 +494,24 @@ void saClmClusterTrack_12(void)
sizeof(SaClmClusterNotificationT) *
notificationBuffer_1.numberOfItems);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, trackFlags, ¬ificationBuffer_1);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags,
¬ificationBuffer_1);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
free(notificationBuffer_1.notification);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_VERSION);
}
void saClmClusterTrack_13(void)
{
trackFlags = SA_TRACK_CURRENT;
- safassert(saClmInitialize(&clmHandle, &clmCallback1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallback1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_ERR_NOT_EXIST);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle),
SA_AIS_ERR_NOT_EXIST);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -520,20 +521,20 @@ void saClmClusterTrack_14(void)
struct pollfd fds[1];
int ret;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
ret = poll(fds, 1, 3000);
assert(ret == 1);
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_ERR_NOT_EXIST);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle),
SA_AIS_ERR_NOT_EXIST);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -541,11 +542,11 @@ void saClmClusterTrack_14(void)
void saClmClusterTrack_15(void)
{
trackFlags = SA_TRACK_START_STEP;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_FLAGS);
}
@@ -553,11 +554,11 @@ void saClmClusterTrack_15(void)
void saClmClusterTrack_16(void)
{
trackFlags = SA_TRACK_VALIDATE_STEP;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_FLAGS);
}
@@ -565,22 +566,22 @@ void saClmClusterTrack_16(void)
void saClmClusterTrack_17(void)
{
trackFlags = SA_TRACK_CHANGES | SA_TRACK_CHANGES_ONLY;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_FLAGS);
}
/*Bad Flags - only start step without changes/changes only for old API's*/
void saClmClusterTrack_18(void)
{
trackFlags = SA_TRACK_START_STEP;
- safassert(saClmInitialize(&clmHandle, &clmCallback1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallback1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_FLAGS);
}
@@ -588,11 +589,11 @@ void saClmClusterTrack_18(void)
void saClmClusterTrack_19(void)
{
trackFlags = SA_TRACK_VALIDATE_STEP;
- safassert(saClmInitialize(&clmHandle, &clmCallback1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallback1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_FLAGS);
}
@@ -600,11 +601,11 @@ void saClmClusterTrack_19(void)
void saClmClusterTrack_20(void)
{
trackFlags = SA_TRACK_CHANGES | SA_TRACK_CHANGES_ONLY;
- safassert(saClmInitialize(&clmHandle, &clmCallback1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallback1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
- /*safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
+ /*safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);*/
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_FLAGS);
}
@@ -616,11 +617,11 @@ void saClmClusterTrack_21(void)
trackFlags = SA_TRACK_CHANGES_ONLY;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -637,9 +638,9 @@ void saClmClusterTrack_21(void)
break;
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
// Reset CLM state
@@ -657,11 +658,11 @@ void saClmClusterTrack_22(void)
trackFlags = SA_TRACK_CHANGES_ONLY;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -677,9 +678,9 @@ void saClmClusterTrack_22(void)
break;
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -691,11 +692,11 @@ void saClmClusterTrack_23(void)
trackFlags = SA_TRACK_CHANGES;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -711,9 +712,9 @@ void saClmClusterTrack_23(void)
break;
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
// Reset CLM state
@@ -728,11 +729,11 @@ void saClmClusterTrack_24(void)
trackFlags = SA_TRACK_CHANGES | SA_TRACK_START_STEP;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -747,7 +748,7 @@ void saClmClusterTrack_24(void)
break;
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
safassert(
saClmResponse_4(clmHandle, lock_inv, SA_CLM_CALLBACK_RESPONSE_OK),
SA_AIS_OK);
@@ -762,10 +763,10 @@ void saClmClusterTrack_24(void)
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
// Reset CLM state
@@ -780,11 +781,11 @@ void saClmClusterTrack_25(void)
trackFlags = SA_TRACK_CHANGES_ONLY | SA_TRACK_START_STEP;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -800,7 +801,7 @@ void saClmClusterTrack_25(void)
break;
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
safassert(
saClmResponse_4(clmHandle, lock_inv, SA_CLM_CALLBACK_RESPONSE_OK),
SA_AIS_OK);
@@ -815,10 +816,10 @@ void saClmClusterTrack_25(void)
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
// Reset CLM state
@@ -833,11 +834,11 @@ void saClmClusterTrack_27(void)
trackFlags = SA_TRACK_CHANGES_ONLY | SA_TRACK_START_STEP;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -853,7 +854,7 @@ void saClmClusterTrack_27(void)
break;
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
safassert(
saClmResponse_4(clmHandle, lock_inv, SA_CLM_CALLBACK_RESPONSE_OK),
SA_AIS_OK);
@@ -868,10 +869,10 @@ void saClmClusterTrack_27(void)
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
// Reset CLM state
@@ -885,11 +886,11 @@ void saClmClusterTrack_28(void)
trackFlags = SA_TRACK_CHANGES | SA_TRACK_START_STEP;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -905,7 +906,7 @@ void saClmClusterTrack_28(void)
break;
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
safassert(
saClmResponse_4(clmHandle, lock_inv, SA_CLM_CALLBACK_RESPONSE_OK),
SA_AIS_OK);
@@ -920,10 +921,10 @@ void saClmClusterTrack_28(void)
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
// Reset CLM state
@@ -943,11 +944,11 @@ void saClmClusterTrack_31(void)
printf("This test case can run only if PLM is enabled in the system\n");
fflush(stdout);
return;
- safassert(saClmInitialize_4(&clmHandle, &clmCallback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -966,7 +967,7 @@ void saClmClusterTrack_31(void)
break;
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
safassert(
saClmResponse_4(clmHandle, lock_inv, SA_CLM_CALLBACK_RESPONSE_OK),
SA_AIS_OK);
@@ -985,7 +986,7 @@ void saClmClusterTrack_31(void)
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
safassert(
saClmResponse_4(clmHandle, lock_inv, SA_CLM_CALLBACK_RESPONSE_OK),
SA_AIS_OK);
@@ -1003,9 +1004,9 @@ void saClmClusterTrack_31(void)
break;
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
diff --git a/src/clm/apitest/tet_saClmClusterTrackStop.c b/src/clm/apitest/tet_saClmClusterTrackStop.c
index 0904561..a806b8b 100644
--- a/src/clm/apitest/tet_saClmClusterTrackStop.c
+++ b/src/clm/apitest/tet_saClmClusterTrackStop.c
@@ -1,6 +1,7 @@
/* -*- OpenSAF -*-
*
* (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -69,26 +70,26 @@ void saClmClusterTrackStop_01(void)
trackFlags = SA_TRACK_CURRENT;
nodeId = 131343;
invocation = 600;
- safassert(saClmInitialize(&clmHandle, &clmCallback11, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallback11,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
- rc = saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_ERR_NOT_EXIST);
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- rc = saClmClusterTrack(clmHandle, trackFlags, NULL);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_ERR_NOT_EXIST);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
+ rc = clmutil_saClmClusterNodeGetAsync(clmHandle, invocation, nodeId);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle),
SA_AIS_ERR_NOT_EXIST);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ rc = clmutil_saClmClusterTrack(clmHandle, trackFlags, NULL);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle),
SA_AIS_ERR_NOT_EXIST);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
void saClmClusterTrackStop_02(void)
{
- rc = saClmClusterTrackStop(clmHandle);
+ rc = clmutil_saClmClusterTrackStop(clmHandle);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
diff --git a/src/clm/apitest/tet_saClmDispatch.c b/src/clm/apitest/tet_saClmDispatch.c
index c0772b2..159d20a 100644
--- a/src/clm/apitest/tet_saClmDispatch.c
+++ b/src/clm/apitest/tet_saClmDispatch.c
@@ -1,6 +1,7 @@
/* -*- OpenSAF -*-
*
* (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -36,11 +37,11 @@ void saClmDispatch_01(void)
invocation = 600;
SaAisErrorT rc;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks,
&clmVersion_1),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- safassert(saClmClusterNodeGetAsync(clmHandle, invocation, nodeId),
+ safassert(clmutil_saClmClusterNodeGetAsync(clmHandle, invocation,
nodeId),
SA_AIS_OK);
fds[0].fd = (int)selectionObject;
@@ -48,23 +49,23 @@ void saClmDispatch_01(void)
ret = poll(fds, 1, 1000);
assert(ret == 1);
- rc = saClmDispatch(clmHandle, SA_DISPATCH_ALL);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
void saClmDispatch_02(void)
{
- rc = saClmDispatch(0, SA_DISPATCH_ALL);
+ rc = clmutil_saClmDispatch(0, SA_DISPATCH_ALL);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
void saClmDispatch_03(void)
{
- safassert(saClmInitialize(&clmHandle, &clmCallbacks, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmDispatch(clmHandle, 0);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmDispatch(clmHandle, 0);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}
@@ -76,11 +77,11 @@ void saClmDispatch_04(void)
invocation = 600;
SaAisErrorT rc;
- safassert(saClmInitialize(&clmHandle, &clmCallbacks, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks,
&clmVersion_1),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- safassert(saClmClusterNodeGetAsync(clmHandle, invocation, nodeId),
+ safassert(clmutil_saClmClusterNodeGetAsync(clmHandle, invocation,
nodeId),
SA_AIS_OK);
fds[0].fd = (int)selectionObject;
@@ -88,8 +89,8 @@ void saClmDispatch_04(void)
ret = poll(fds, 1, 1000);
assert(ret == 1);
- rc = saClmDispatch(clmHandle, SA_DISPATCH_ONE);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ONE);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
diff --git a/src/clm/apitest/tet_saClmFinalize.c b/src/clm/apitest/tet_saClmFinalize.c
index 3b2a8dc..80ff61f 100644
--- a/src/clm/apitest/tet_saClmFinalize.c
+++ b/src/clm/apitest/tet_saClmFinalize.c
@@ -1,6 +1,7 @@
/* -*- OpenSAF -*-
*
* (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -18,28 +19,28 @@
void saClmFinalize_01(void)
{
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmFinalize(clmHandle);
+ rc = clmutil_saClmFinalize(clmHandle);
test_validate(rc, SA_AIS_OK);
- safassert(saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4),
SA_AIS_OK);
- rc = saClmFinalize(clmHandle);
+ rc = clmutil_saClmFinalize(clmHandle);
test_validate(rc, SA_AIS_OK);
}
void saClmFinalize_02(void)
{
- rc = saClmFinalize(-1);
+ rc = clmutil_saClmFinalize(-1);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
void saClmFinalize_03(void)
{
- safassert(saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1),
SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
- rc = saClmFinalize(clmHandle);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmFinalize(clmHandle);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
diff --git a/src/clm/apitest/tet_saClmInitialize.c b/src/clm/apitest/tet_saClmInitialize.c
index 3922abb..7fca6b4 100644
--- a/src/clm/apitest/tet_saClmInitialize.c
+++ b/src/clm/apitest/tet_saClmInitialize.c
@@ -1,6 +1,7 @@
/* -*- OpenSAF -*-
*
* (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -19,58 +20,58 @@
void saClmInitialize_01(void)
{
- rc = saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
void saClmInitialize_02(void)
{
- rc = saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
void saClmInitialize_03(void)
{
- rc = saClmInitialize(NULL, &clmCallbacks_1, &clmVersion_1);
+ rc = clmutil_saClmInitialize(NULL, &clmCallbacks_1, &clmVersion_1);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}
void saClmInitialize_04(void)
{
- rc = saClmInitialize_4(NULL, &clmCallbacks_4, &clmVersion_4);
+ rc = clmutil_saClmInitialize_4(NULL, &clmCallbacks_4, &clmVersion_4);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}
void saClmInitialize_05(void)
{
- rc = saClmInitialize(&clmHandle, NULL, &clmVersion_1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmInitialize(&clmHandle, NULL, &clmVersion_1);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
void saClmInitialize_06(void)
{
- rc = saClmInitialize_4(&clmHandle, NULL, &clmVersion_4);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmInitialize_4(&clmHandle, NULL, &clmVersion_4);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
void saClmInitialize_07(void)
{
- rc = saClmInitialize(&clmHandle, NULL, NULL);
+ rc = clmutil_saClmInitialize(&clmHandle, NULL, NULL);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
- rc = saClmInitialize_4(&clmHandle, NULL, NULL);
+ rc = clmutil_saClmInitialize_4(&clmHandle, NULL, NULL);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}
void saClmInitialize_08(void)
{
SaVersionT version1, version4;
- rc = saClmInitialize(&clmHandle, &clmCallbacks_1, &version1);
+ rc = clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1, &version1);
test_validate(rc, SA_AIS_ERR_VERSION);
- rc = saClmInitialize_4(&clmHandle, &clmCallbacks_4, &version4);
+ rc = clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4, &version4);
test_validate(rc, SA_AIS_ERR_VERSION);
}
@@ -78,9 +79,9 @@ void saClmInitialize_09(void)
{
SaVersionT version1 = {'C', 1, 1};
SaVersionT version4 = {'C', 1, 1};
- rc = saClmInitialize(&clmHandle, &clmCallbacks_1, &version1);
+ rc = clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1, &version1);
test_validate(rc, SA_AIS_ERR_VERSION);
- rc = saClmInitialize_4(&clmHandle, &clmCallbacks_4, &version4);
+ rc = clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4, &version4);
test_validate(rc, SA_AIS_ERR_VERSION);
}
@@ -88,21 +89,21 @@ void saClmInitialize_10(void)
{
SaVersionT version1 = {'B', 5, 1};
SaVersionT version4 = {'B', 5, 1};
- rc = saClmInitialize(&clmHandle, &clmCallbacks_1, &version1);
+ rc = clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1, &version1);
test_validate(rc, SA_AIS_ERR_VERSION);
- rc = saClmInitialize_4(&clmHandle, &clmCallbacks_4, &version4);
+ rc = clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4, &version4);
test_validate(rc, SA_AIS_ERR_VERSION);
}
void saClmInitialize_11(void)
{
clmVersion_1.minorVersion--;
- rc = saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1,
&clmVersion_1);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
clmVersion_4.minorVersion--;
- rc = saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4,
&clmVersion_4);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -110,9 +111,9 @@ void saClmInitialize_12(void)
{
SaVersionT version1 = {'B', 0, 0};
SaVersionT version4 = {'B', 0, 0};
- rc = saClmInitialize(&clmHandle, &clmCallbacks_1, &version1);
+ rc = clmutil_saClmInitialize(&clmHandle, &clmCallbacks_1, &version1);
test_validate(rc, SA_AIS_ERR_VERSION);
- rc = saClmInitialize_4(&clmHandle, &clmCallbacks_4, &version4);
+ rc = clmutil_saClmInitialize_4(&clmHandle, &clmCallbacks_4, &version4);
test_validate(rc, SA_AIS_ERR_VERSION);
}
@@ -120,29 +121,14 @@ void saClmInitialize_12(void)
void saClmInitialize_13(void)
{
SaClmHandleT clmHandle1, clmHandle2, clmHandle3;
- rc = saClmInitialize(&clmHandle1, &clmCallbacks_1, &clmVersion_1);
- rc = saClmInitialize(&clmHandle2, &clmCallbacks_1, &clmVersion_1);
- rc = saClmInitialize(&clmHandle3, &clmCallbacks_1, &clmVersion_1);
- safassert(saClmFinalize(clmHandle1), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle2), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle3), SA_AIS_OK);
+ rc = clmutil_saClmInitialize(&clmHandle1, &clmCallbacks_1,
&clmVersion_1);
+ rc = clmutil_saClmInitialize(&clmHandle2, &clmCallbacks_1,
&clmVersion_1);
+ rc = clmutil_saClmInitialize(&clmHandle3, &clmCallbacks_1,
&clmVersion_1);
+ safassert(clmutil_saClmFinalize(clmHandle1), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle2), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle3), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
-#if 0
-void saClmInitialize_13(void)
- rc = saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1);
- test_validate(rc, SA_AIS_ERR_LIBRARY);
- rc = saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4);
- test_validate(rc, SA_AIS_ERR_LIBRARY);
-}
-
-void saClmInitialize_14(void)
- rc = saClmInitialize(&clmHandle, &clmCallbacks_1, &clmVersion_1);
- test_validate(rc, SA_AIS_ERR_TRY_AGAIN);
- rc = saClmInitialize_4(&clmHandle, &clmCallbacks_4, &clmVersion_4);
- test_validate(rc, SA_AIS_ERR_TRY_AGAIN);
-}
-#endif
__attribute__((constructor)) static void saNtfInitialize_constructor(void)
{
diff --git a/src/clm/apitest/tet_saClmResponse.c
b/src/clm/apitest/tet_saClmResponse.c
index af40e32..ec8ba0f 100644
--- a/src/clm/apitest/tet_saClmResponse.c
+++ b/src/clm/apitest/tet_saClmResponse.c
@@ -1,6 +1,7 @@
/* -*- OpenSAF -*-
*
* (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -111,11 +112,11 @@ void saClmResponse_01(void)
trackFlags = SA_TRACK_CHANGES | SA_TRACK_START_STEP;
printf(" This test case needs (manual) admin op simulation\n");
return; /* uncomment this and run*/
- safassert(saClmInitialize_4(&clmHandle, &Callback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &Callback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -125,7 +126,7 @@ void saClmResponse_01(void)
break;
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
safassert(
saClmResponse_4(clmHandle, lock_inv, SA_CLM_CALLBACK_RESPONSE_OK),
SA_AIS_OK);
@@ -139,10 +140,10 @@ void saClmResponse_01(void)
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -154,11 +155,11 @@ void saClmResponse_02(void)
printf("This test case needs (manual) admin op simulation\n");
return; /* uncomment this and run*/
- safassert(saClmInitialize_4(&clmHandle, &Callback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &Callback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -168,8 +169,8 @@ void saClmResponse_02(void)
break;
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmResponse_4(clmHandle, lock_inv,
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmResponse_4(clmHandle, lock_inv,
SA_CLM_CALLBACK_RESPONSE_ERROR),
SA_AIS_OK);
@@ -182,10 +183,10 @@ void saClmResponse_02(void)
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -198,11 +199,11 @@ void saClmResponse_03(void)
printf("This test case needs (manual) admin op simulation\n");
return; /* uncomment this and run*/
- safassert(saClmInitialize_4(&clmHandle, &Callback4, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, &Callback4,
&clmVersion_4),
SA_AIS_OK);
- safassert(saClmSelectionObjectGet(clmHandle, &selectionObject),
+ safassert(clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject),
SA_AIS_OK);
- rc = saClmClusterTrack_4(clmHandle, trackFlags, NULL);
+ rc = clmutil_saClmClusterTrack_4(clmHandle, trackFlags, NULL);
fds[0].fd = (int)selectionObject;
fds[0].events = POLLIN;
@@ -212,8 +213,8 @@ void saClmResponse_03(void)
break;
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmResponse_4(clmHandle, lock_inv,
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmResponse_4(clmHandle, lock_inv,
SA_CLM_CALLBACK_RESPONSE_REJECTED),
SA_AIS_OK);
@@ -226,10 +227,10 @@ void saClmResponse_03(void)
}
}
- safassert(saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
+ safassert(clmutil_saClmDispatch(clmHandle, SA_DISPATCH_ALL), SA_AIS_OK);
- safassert(saClmClusterTrackStop(clmHandle), SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmClusterTrackStop(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
@@ -237,21 +238,21 @@ void saClmResponse_04(void)
{
printf("This test case needs (manual) admin op simulation\n");
return; /* uncomment this and run*/
- rc = saClmResponse_4(0, 200, SA_CLM_CALLBACK_RESPONSE_REJECTED);
+ rc = clmutil_saClmResponse_4(0, 200, SA_CLM_CALLBACK_RESPONSE_REJECTED);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
- rc = saClmResponse_4(1234, 0, SA_CLM_CALLBACK_RESPONSE_REJECTED);
+ rc = clmutil_saClmResponse_4(1234, 0,
SA_CLM_CALLBACK_RESPONSE_REJECTED);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
- rc = saClmResponse_4(1234, 200, 10);
+ rc = clmutil_saClmResponse_4(1234, 200, 10);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
- rc = saClmResponse_4(-1, 200, SA_CLM_CALLBACK_RESPONSE_REJECTED);
+ rc = clmutil_saClmResponse_4(-1, 200,
SA_CLM_CALLBACK_RESPONSE_REJECTED);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
void saClmResponse_05(void)
{
- safassert(saClmInitialize_4(&clmHandle, NULL, &clmVersion_4),
+ safassert(clmutil_saClmInitialize_4(&clmHandle, NULL, &clmVersion_4),
SA_AIS_OK);
- rc = saClmResponse_4(clmHandle, 100, SA_CLM_CALLBACK_RESPONSE_OK);
+ rc = clmutil_saClmResponse_4(clmHandle, 100,
SA_CLM_CALLBACK_RESPONSE_OK);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}
diff --git a/src/clm/apitest/tet_saClmSelectionObjectGet.c b/src/clm/apitest/tet_saClmSelectionObjectGet.c
index 34961c1..2d35f5f 100644
--- a/src/clm/apitest/tet_saClmSelectionObjectGet.c
+++ b/src/clm/apitest/tet_saClmSelectionObjectGet.c
@@ -1,6 +1,7 @@
/* -*- OpenSAF -*-
*
* (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright Ericsson AB 2017 - All Rights Reserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -28,37 +29,37 @@ SaClmCallbacksT clmCallback = {nodeGetCallBack, NULL};
void saClmSelectionObjectGet_01(void)
{
- safassert(saClmInitialize(&clmHandle, &clmCallback, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallback,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmSelectionObjectGet(clmHandle, &selectionObject);
+ rc = clmutil_saClmSelectionObjectGet(clmHandle, &selectionObject);
test_validate(rc, SA_AIS_OK);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
}
void saClmSelectionObjectGet_02(void)
{
- safassert(saClmInitialize(&clmHandle, &clmCallback, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallback,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmSelectionObjectGet(0, &selectionObject);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmSelectionObjectGet(0, &selectionObject);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
void saClmSelectionObjectGet_03(void)
{
- safassert(saClmInitialize(&clmHandle, &clmCallback, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallback,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmSelectionObjectGet(-1, &selectionObject);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmSelectionObjectGet(-1, &selectionObject);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
void saClmSelectionObjectGet_04(void)
{
- safassert(saClmInitialize(&clmHandle, &clmCallback, &clmVersion_1),
+ safassert(clmutil_saClmInitialize(&clmHandle, &clmCallback,
&clmVersion_1),
SA_AIS_OK);
- rc = saClmSelectionObjectGet(clmHandle, NULL);
- safassert(saClmFinalize(clmHandle), SA_AIS_OK);
+ rc = clmutil_saClmSelectionObjectGet(clmHandle, NULL);
+ safassert(clmutil_saClmFinalize(clmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}