[ofa-general] [PATCH] opensm/osmtest: convert osm_log() to OSM_LOG() macro

Sasha Khapyorsky sashak at voltaire.com
Sat Jul 26 19:03:56 PDT 2008


Convert logging to use OSM_LOG() macro.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/osmtest/osmt_inform.c      |  179 ++---
 opensm/osmtest/osmt_multicast.c   | 1000 ++++++++---------------
 opensm/osmtest/osmt_service.c     |  300 +++-----
 opensm/osmtest/osmt_slvl_vl_arb.c |   60 +-
 opensm/osmtest/osmtest.c          | 1640 ++++++++++++-------------------------
 5 files changed, 1056 insertions(+), 2123 deletions(-)

diff --git a/opensm/osmtest/osmt_inform.c b/opensm/osmtest/osmt_inform.c
index 618b263..7257c7e 100644
--- a/opensm/osmtest/osmt_inform.c
+++ b/opensm/osmtest/osmt_inform.c
@@ -75,13 +75,11 @@ osmt_bind_inform_qp(IN osmtest_t * const p_osmt, OUT osmt_qp_ctx_t * p_qp_ctx)
 
 	port_guid = p_osmt->local_port.port_guid;
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_bind_inform_qp: "
-		"Binding to port 0x%" PRIx64 "\n", cl_ntoh64(port_guid));
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Binding to port 0x%" PRIx64 "\n",
+		cl_ntoh64(port_guid));
 
 	/* obtain the hca name and port num from the guid */
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_bind_inform_qp: "
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
 		"Finding CA and Port that owns port guid 0x%" PRIx64 "\n",
 		port_guid);
 
@@ -91,8 +89,7 @@ osmt_bind_inform_qp(IN osmtest_t * const p_osmt, OUT osmt_qp_ctx_t * p_qp_ctx)
 					    &hca_hndl,
 					    &hca_id[0], &hca_index, &port_num);
 	if (mgt_ret != IB_MGT_OK) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_bind_inform_qp: ERR 0109: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0109: "
 			"Unable to obtain CA and port (%d).\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -108,8 +105,7 @@ osmt_bind_inform_qp(IN osmtest_t * const p_osmt, OUT osmt_qp_ctx_t * p_qp_ctx)
 
 	vapi_ret = osmt_mtl_init_opened_hca(&p_qp_ctx->qp_bind_hndl);
 	if (vapi_ret != VAPI_OK) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_bind_inform_qp: ERR 0114: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0114: "
 			"Error initializing QP.\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -129,20 +125,16 @@ osmt_bind_inform_qp(IN osmtest_t * const p_osmt, OUT osmt_qp_ctx_t * p_qp_ctx)
 	memset(p_qp_ctx->p_send_buf, 0, MAD_BLOCK_SIZE);
 
 	status = IB_SUCCESS;
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_bind_inform_qp: "
-		"Initialized QP:0x%X in VAPI Mode\n",
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Initialized QP:0x%X in VAPI Mode\n",
 		p_qp_ctx->qp_bind_hndl.qp_id);
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_bind_inform_qp: " "Binding to IB_MGT SMI\n");
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Binding to IB_MGT SMI\n");
 
 	/* we also need a QP0 handle for sending packets */
 	mgt_ret = IB_MGT_get_handle(hca_id, port_num, IB_MGT_SMI,
 				    &(p_qp_ctx->ib_mgt_qp0_handle));
 	if (IB_MGT_OK != mgt_ret) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_bind_inform_qp: ERR 0115: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0115: "
 			"Error obtaining IB_MGT handle to SMI\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -167,8 +159,7 @@ osmt_unbind_inform_qp(IN osmtest_t * const p_osmt, IN osmt_qp_ctx_t * p_qp_ctx)
 
 	IB_MGT_release_handle(p_qp_ctx->ib_mgt_qp0_handle);
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_unbind_inform_qp: " "Unbind QP handles\n");
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Unbind QP handles\n");
 	OSM_LOG_EXIT(&p_osmt->log);
 }
 
@@ -208,14 +199,12 @@ osmt_reg_unreg_inform_info(IN osmtest_t * p_osmt,
 	memcpy(p_ii, p_inform_info, sizeof(ib_inform_info_t));
 
 	if (reg_flag) {
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_reg_unreg_inform_info: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Subscribing InformInfo: Traps from lid:0x%X to 0x%X, trap num :0x%X\n",
 			p_ii->lid_range_begin, p_ii->lid_range_end,
 			p_ii->g_or_v.generic.trap_num);
 	} else {
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_reg_unreg_inform_info: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"UnSubscribing InformInfo: Traps from lid:0x%X to 0x%X\n",
 			p_ii->lid_range_begin, p_ii->lid_range_end);
 	}
@@ -239,28 +228,24 @@ osmt_reg_unreg_inform_info(IN osmtest_t * p_osmt,
 	/* --------------------- PREP ------------------------- */
 	if (osmt_mtl_mad_post_recv_bufs(&p_qp_ctx->qp_bind_hndl, p_qp_ctx->p_recv_buf, 1,	/*  but we need only one mad at a time */
 					GRH_LEN + MAD_BLOCK_SIZE, wrid) != 1) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_reg_unreg_inform_info: ERR 0120: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0120: "
 			"Error posting recv bufs\n");
 		status = IB_ERROR;
 		goto Exit;
 	}
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_reg_unreg_inform_info: " "Posted recv bufs\n");
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Posted recv bufs\n");
 
 	vapi_ret =
 	    osmt_mtl_create_av(&p_qp_ctx->qp_bind_hndl,
 			       p_osmt->local_port.sm_lid, &avh);
 	if (vapi_ret != VAPI_OK) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_reg_unreg_inform_info: ERR 0121: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0121: "
 			"Error Preparing AVH (%s)\n",
 			VAPI_strerror_sym(vapi_ret));
 		status = IB_ERROR;
 		goto Exit;
 	}
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_reg_unreg_inform_info: " "Prepared AVH\n");
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Prepared AVH\n");
 
 	if (osm_log_is_active(p_log, OSM_LOG_DEBUG)) {
 		osm_dump_sa_mad(p_log, (ib_sa_mad_t *) (p_qp_ctx->p_send_buf),
@@ -282,8 +267,7 @@ osmt_reg_unreg_inform_info(IN osmtest_t * p_osmt,
 				     OSMT_MTL_REVERSE_QP1_WELL_KNOWN_Q_KEY,
 				     avh);
 	if (vapi_ret != VAPI_OK) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_reg_unreg_inform_info: ERR 0122: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0122: "
 			"Error sending mad (%s)\n",
 			VAPI_strerror_sym(vapi_ret));
 		status = IB_ERROR;
@@ -294,8 +278,7 @@ osmt_reg_unreg_inform_info(IN osmtest_t * p_osmt,
 					 p_qp_ctx->qp_bind_hndl.sq_cq_hndl,
 					 &wc_desc, 20, 10000, NULL);
 	if (vapi_ret != VAPI_OK) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_reg_unreg_inform_info: ERR 0123: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0123: "
 			"Error getting send completion (%s)\n",
 			VAPI_strerror_sym(vapi_ret));
 		status = IB_ERROR;
@@ -303,15 +286,13 @@ osmt_reg_unreg_inform_info(IN osmtest_t * p_osmt,
 	}
 
 	if (wc_desc.status != VAPI_SUCCESS) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_reg_unreg_inform_info: ERR 0124: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0124: "
 			"Error on send completion (%s) (%d)\n",
 			VAPI_strerror_sym(wc_desc.status), wc_desc.status);
 		status = IB_ERROR;
 		goto Exit;
 	}
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_reg_unreg_inform_info: " "Sent MAD\n");
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Sent MAD\n");
 
 	/* --------------------- RECV ------------------------- */
 	vapi_ret = osmt_mtl_mad_poll4cqe(p_qp_ctx->qp_bind_hndl.hca_hndl,
@@ -321,8 +302,7 @@ osmt_reg_unreg_inform_info(IN osmtest_t * p_osmt,
 		if (vapi_ret == VAPI_CQ_EMPTY) {
 			status = IB_TIMEOUT;
 		} else {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osmt_reg_unreg_inform_info: ERR 0125: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0125: "
 				"Error receiving mad (%s)\n",
 				VAPI_strerror_sym(vapi_ret));
 			status = IB_ERROR;
@@ -334,17 +314,14 @@ osmt_reg_unreg_inform_info(IN osmtest_t * p_osmt,
 	p_sa_mad = (ib_sa_mad_t *) (p_qp_ctx->p_recv_buf + GRH_LEN);
 
 	if (p_sa_mad->status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_reg_unreg_inform_info: "
-			"Remote error = %s\n",
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "Remote error = %s\n",
 			ib_get_mad_status_str((ib_mad_t *) p_sa_mad));
 		status = IB_REMOTE_ERROR;
 		goto Exit;
 	}
 
 	if (p_sa_mad->method != IB_MAD_METHOD_GET_RESP) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_reg_unreg_inform_info: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 			"Expected IB_MAD_METHOD_GET_RESP but got:(%X)\n",
 			p_sa_mad->method);
 		status = IB_REMOTE_ERROR;
@@ -352,8 +329,7 @@ osmt_reg_unreg_inform_info(IN osmtest_t * p_osmt,
 	}
 
 	if (p_sa_mad->attr_id != IB_MAD_ATTR_INFORM_INFO) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_reg_unreg_inform_info: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 			"Expected IB_MAD_ATTR_INFORM_INFO but got:(%X)\n",
 			cl_ntoh16(p_sa_mad->attr_id));
 		status = IB_REMOTE_ERROR;
@@ -362,8 +338,7 @@ osmt_reg_unreg_inform_info(IN osmtest_t * p_osmt,
 
 	p_ii = ib_sa_mad_get_payload_ptr(p_sa_mad);
 	if (!p_ii->subscribe) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_reg_unreg_inform_info: ERR 0126: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0126: "
 			"Subscribe/Unsubscribe Failed\n");
 		status = IB_REMOTE_ERROR;
 	}
@@ -397,8 +372,7 @@ osmt_send_trap_wait_for_forward(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(p_log);
 
-	osm_log(p_log, OSM_LOG_INFO,
-		"osmt_send_trap_wait_for_forward: "
+	OSM_LOG(p_log, OSM_LOG_INFO,
 		"Sending Traps to QP0 of SA LID:0x%X\n",
 		p_osmt->local_port.sm_lid);
 
@@ -421,14 +395,12 @@ osmt_send_trap_wait_for_forward(IN osmtest_t * const p_osmt,
 	/* --------------------- PREP ------------------------- */
 	if (osmt_mtl_mad_post_recv_bufs(&p_qp_ctx->qp_bind_hndl, p_qp_ctx->p_recv_buf, 1,	/*  we need to receive both trap repress and report */
 					GRH_LEN + MAD_BLOCK_SIZE, wrid) != 1) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_send_trap_wait_for_forward: ERR 0127: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0127: "
 			"Error posting recv bufs\n");
 		status = IB_ERROR;
 		goto Exit;
 	}
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_send_trap_wait_for_forward: " "Posted recv bufs\n");
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Posted recv bufs\n");
 
 	av.dlid = p_osmt->local_port.sm_lid;
 	av.grh_flag = FALSE;
@@ -438,14 +410,9 @@ osmt_send_trap_wait_for_forward(IN osmtest_t * const p_osmt,
 	av.src_path_bits = 1;	/*  p_mad_addr->path_bits; */
 	av.sl = 0;		/*  p_mad_addr->addr_type.gsi.service_level; */
 
-	if (osm_log_is_active(p_log, OSM_LOG_DEBUG)) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"osmt_send_trap_wait_for_forward: "
-			"av.dlid 0x%X, "
-			"av.static_rate %d, "
-			"av.path_bits %d\n",
-			cl_ntoh16(av.dlid), av.static_rate, av.src_path_bits);
-	}
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
+		"av.dlid 0x%X, av.static_rate %d, av.path_bits %d\n",
+		cl_ntoh16(av.dlid), av.static_rate, av.src_path_bits);
 
 	/* send it */
 	mgt_res = IB_MGT_send_mad(p_qp_ctx->ib_mgt_qp0_handle, p_smp,	/*  actual payload */
@@ -453,8 +420,7 @@ osmt_send_trap_wait_for_forward(IN osmtest_t * const p_osmt,
 				  wrid,	/*  casting the mad wrapper pointer for err cb */
 				  p_osmt->opt.transaction_timeout);
 	if (mgt_res != IB_MGT_OK) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_send_trap_wait_for_forward: ERR 0128: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0128: "
 			"Error sending mad (%d)\n", mgt_res);
 		status = IB_ERROR;
 		goto Exit;
@@ -464,18 +430,15 @@ osmt_send_trap_wait_for_forward(IN osmtest_t * const p_osmt,
 	    osmt_mtl_create_av(&p_qp_ctx->qp_bind_hndl,
 			       p_osmt->local_port.sm_lid, &avh);
 	if (vapi_ret != VAPI_OK) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_send_trap_wait_for_forward: ERR 0129: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0129: "
 			"Error Preparing AVH (%s)\n",
 			VAPI_strerror_sym(vapi_ret));
 		status = IB_ERROR;
 		goto Exit;
 	}
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_send_trap_wait_for_forward: " "Prepared AVH\n");
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Prepared AVH\n");
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osmt_send_trap_wait_for_forward: " "Trap MAD Sent\n");
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Trap MAD Sent\n");
 
 	/* --------------------- RECV ------------------------- */
 	vapi_ret = osmt_mtl_mad_poll4cqe(p_qp_ctx->qp_bind_hndl.hca_hndl,
@@ -483,14 +446,12 @@ osmt_send_trap_wait_for_forward(IN osmtest_t * const p_osmt,
 					 &wc_desc, 200, 10000, &avh);
 	if (vapi_ret != VAPI_SUCCESS) {
 		if (vapi_ret == VAPI_CQ_EMPTY) {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osmt_send_trap_wait_for_forward: ERR 0130: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0130: "
 				"Timeout receiving mad (%s)\n",
 				VAPI_strerror_sym(vapi_ret));
 			status = IB_TIMEOUT;
 		} else {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osmt_send_trap_wait_for_forward: ERR 0131: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0131: "
 				"Error receiving mad (%s)\n",
 				VAPI_strerror_sym(vapi_ret));
 			status = IB_ERROR;
@@ -503,21 +464,16 @@ osmt_send_trap_wait_for_forward(IN osmtest_t * const p_osmt,
 
 	if (p_sa_mad->method == IB_MAD_METHOD_REPORT) {
 		if (p_sa_mad->attr_id == IB_MAD_ATTR_NOTICE) {
-			osm_log(p_log, OSM_LOG_INFO,
-				"osmt_send_trap_wait_for_forward: "
-				"Received the Report!\n");
+			OSM_LOG(p_log, OSM_LOG_INFO, "Received the Report!\n");
 			status = IB_SUCCESS;
 		} else {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osmt_send_trap_wait_for_forward: ERR 1020"
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 1020"
 				"Did not receive a Report(Notice) but attr:%d\n",
-				cl_ntoh16(p_sa_mad->attr_id)
-			    );
+				cl_ntoh16(p_sa_mad->attr_id));
 			status = IB_ERROR;
 		}
 	} else {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osmt_send_trap_wait_for_forward: ERR 1020"
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 1020"
 			"Received an Unexpected Method:%d\n", p_smp->method);
 		status = IB_ERROR;
 	}
@@ -543,8 +499,7 @@ osmt_trap_wait(IN osmtest_t * const p_osmt, IN osmt_qp_ctx_t * p_qp_ctx)
 
 	OSM_LOG_ENTER(p_log);
 
-	osm_log(p_log, OSM_LOG_INFO,
-		"osmt_trap_wait: "
+	OSM_LOG(p_log, OSM_LOG_INFO,
 		"Waiting for Traps under QP:0x%X of SA LID:0x%X\n",
 		cl_ntoh16(p_osmt->local_port.sm_lid));
 
@@ -557,14 +512,12 @@ osmt_trap_wait(IN osmtest_t * const p_osmt, IN osmt_qp_ctx_t * p_qp_ctx)
 					 10000, NULL);
 	if (vapi_ret != VAPI_SUCCESS) {
 		if (vapi_ret == VAPI_CQ_EMPTY) {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osmt_trap_wait: ERR 0130: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0130: "
 				"Timeout receiving mad (%s)\n",
 				VAPI_strerror_sym(vapi_ret));
 			status = IB_TIMEOUT;
 		} else {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osmt_trap_wait: ERR 0131: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0131: "
 				"Error receiving mad (%s)\n",
 				VAPI_strerror_sym(vapi_ret));
 			status = IB_ERROR;
@@ -577,20 +530,17 @@ osmt_trap_wait(IN osmtest_t * const p_osmt, IN osmt_qp_ctx_t * p_qp_ctx)
 
 	if (p_sa_mad->method == IB_MAD_METHOD_REPORT) {
 		if (p_sa_mad->attr_id == IB_MAD_ATTR_NOTICE) {
-			osm_log(&p_osmt->log, OSM_LOG_INFO,
-				"osmt_trap_wait: " "Received the Report!\n");
+			OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+				"Received the Report!\n");
 			status = IB_SUCCESS;
 		} else {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_trap_wait: ERR 1020"
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 1020"
 				"Did not receive a Report(Notice) but attr:%d\n",
-				cl_ntoh16(p_sa_mad->attr_id)
-			    );
+				cl_ntoh16(p_sa_mad->attr_id));
 			status = IB_ERROR;
 		}
 	} else {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_trap_wait: ERR 1020"
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 1020"
 			"Received an Unexpected Method:%d\n", p_smp->method);
 		status = IB_ERROR;
 	}
@@ -671,14 +621,12 @@ ib_api_status_t osmt_run_inform_info_flow(IN osmtest_t * const p_osmt)
 	/* WAS IB_REMOTE_ERROR */
 	if (status != IB_REMOTE_ERROR) {
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_INFO,
-				"osmt_run_inform_info_flow:"
+			OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 				"Error during UnSubscribe: (%s)\n",
 				ib_get_err_str(status));
 			goto Exit;
 		} else {
-			osm_log(&p_osmt->log, OSM_LOG_INFO,
-				"osmt_run_inform_info_flow:"
+			OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 				"Expected Failure to UnSubscribe non existing InformInfo\n");
 			status = IB_ERROR;
 			goto Exit;
@@ -694,8 +642,7 @@ ib_api_status_t osmt_run_inform_info_flow(IN osmtest_t * const p_osmt)
 	/* send a trap through QP0 and wait on QPN */
 	status = osmt_send_trap_wait_for_forward(p_osmt, &qp_ctx);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_inform_info_flow:"
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Error during Send Trap and Wait For Report: (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -705,15 +652,13 @@ ib_api_status_t osmt_run_inform_info_flow(IN osmtest_t * const p_osmt)
 	status = osmt_reg_unreg_inform_info(p_osmt, &qp_ctx, &inform_info, 0);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_inform_info_flow:"
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Error during UnSubscribe: (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
 	} else {
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_INFO,
-				"osmt_run_inform_info_flow:"
+			OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 				"Remote Error during UnSubscribe\n");
 			status = IB_ERROR;
 			goto Exit;
@@ -762,15 +707,13 @@ ib_api_status_t osmt_run_trap64_65_flow(IN osmtest_t * const p_osmt)
   /*--------------------- PREP -------------------------*/
 	if (osmt_mtl_mad_post_recv_bufs(&qp_ctx.qp_bind_hndl, qp_ctx.p_recv_buf, 1,	/* we need to receive the report */
 					GRH_LEN + MAD_BLOCK_SIZE, 1) != 1) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_trap64_65_flow: ERR 0127: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0127: "
 			"Error posting recv bufs for trap 64\n");
 		status = IB_ERROR;
 		goto Exit;
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-		"osmt_run_trap64_65_flow: " "Posted recv bufs for trap 64\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "Posted recv bufs for trap 64\n");
 
 	/* init the inform info */
 	osmt_init_inform_info_by_trap(p_osmt, cl_hton16(65), &inform_info);
@@ -784,14 +727,12 @@ ib_api_status_t osmt_run_trap64_65_flow(IN osmtest_t * const p_osmt)
   /*--------------------- PREP -------------------------*/
 	if (osmt_mtl_mad_post_recv_bufs(&qp_ctx.qp_bind_hndl, qp_ctx.p_recv_buf, 1,	/* we need to reveive the report */
 					GRH_LEN + MAD_BLOCK_SIZE, 1) != 1) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_trap64_65_flow: ERR 0127: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0127: "
 			"Error posting recv bufs for trap 65\n");
 		status = IB_ERROR;
 		goto Exit;
 	}
-	osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-		"osmt_run_trap64_65_flow: " "Posted recv bufs for trap 65\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "Posted recv bufs for trap 65\n");
 
 	/* Sleep for x seconds in order to allow external script trap generation */
 #if 0
@@ -801,8 +742,7 @@ ib_api_status_t osmt_run_trap64_65_flow(IN osmtest_t * const p_osmt)
 	/* wait for a trap on QPN */
 	status = osmt_trap_wait(p_osmt, &qp_ctx);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_trap64_65_flow:"
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Error during Send Trap and Wait For Report: (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -812,8 +752,7 @@ ib_api_status_t osmt_run_trap64_65_flow(IN osmtest_t * const p_osmt)
 	status = osmt_reg_unreg_inform_info(p_osmt, &qp_ctx, &inform_info, 0);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_trap64_65_flow:"
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Error during UnSubscribe: (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/osmtest/osmt_multicast.c b/opensm/osmtest/osmt_multicast.c
index a4f80b9..6725d8f 100644
--- a/opensm/osmtest/osmt_multicast.c
+++ b/opensm/osmtest/osmt_multicast.c
@@ -83,8 +83,7 @@ static void __osmt_print_all_multicast_records(IN osmtest_t * const p_osmt)
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 
 	if (status != IB_SUCCESS || context.result.status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"__osmt_print_all_multicast_records: ERR 02B5: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02B5: "
 			"Failed getting the multicast groups records - %s/%s\n",
 			ib_get_err_str(status),
 			ib_get_err_str(context.result.status));
@@ -107,8 +106,7 @@ static void __osmt_print_all_multicast_records(IN osmtest_t * const p_osmt)
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 
 	if (status != IB_SUCCESS || context.result.status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"__osmt_print_all_multicast_records: ERR 02B6: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02B6: "
 			"Failed getting the multicast group members records - %s/%s\n",
 			ib_get_err_str(status),
 			ib_get_err_str(context.result.status));
@@ -191,8 +189,7 @@ ib_api_status_t osmt_query_mcast(IN osmtest_t * const p_osmt)
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_query_mcast: ERR 0203: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0203: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -200,12 +197,10 @@ ib_api_status_t osmt_query_mcast(IN osmtest_t * const p_osmt)
 	status = context.result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_query_mcast: ERR 0264: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0264: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_query_mcast: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s.\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (context.result.
@@ -229,8 +224,8 @@ ib_api_status_t osmt_query_mcast(IN osmtest_t * const p_osmt)
 	cl_list_init(&mgids_list, num_recs);
 	p_mgids_list = &mgids_list;
 	num_recs = context.result.result_cnt;
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_query_mcast: " "Received %u records\n", num_recs);
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Received %u records\n",
+		num_recs);
 
 	for (i = 0; i < num_recs; i++) {
 		p_rec = osmv_get_query_result(context.result.p_result_madw, i);
@@ -240,11 +235,10 @@ ib_api_status_t osmt_query_mcast(IN osmtest_t * const p_osmt)
 		/* If returns iterator other than end of list, same mgid exists already */
 		if (p_mgids_res != cl_list_end(p_mgids_list)) {
 			char gid_str[INET6_ADDRSTRLEN];
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_query_mcast: ERR 0265: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0265: "
 				"MCG MGIDs are the same - invalid MGID : %s\n",
 				inet_ntop(AF_INET6, p_rec->mgid.raw, gid_str,
-					sizeof gid_str));
+					  sizeof gid_str));
 			status = IB_ERROR;
 			goto Exit;
 
@@ -252,16 +246,14 @@ ib_api_status_t osmt_query_mcast(IN osmtest_t * const p_osmt)
 		osm_dump_mc_record(&p_osmt->log, p_rec, OSM_LOG_VERBOSE);
 		cl_status = cl_list_insert_head(p_mgids_list, &(p_rec->mgid));
 		if (cl_status) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_query_mcast: ERR 0205: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0205: "
 				"Could not add MGID to cl_list\n");
 			status = IB_ERROR;
 			goto Exit;
 		}
 		p_mgrp = (osmtest_mgrp_t *) malloc(sizeof(*p_mgrp));
 		if (!p_mgrp) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_query_mcast: ERR 0204: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0204: "
 				"Could not allocate new MCG\n");
 			status = IB_ERROR;
 			goto Exit;
@@ -320,16 +312,15 @@ osmt_send_mcast_request(IN osmtest_t * const p_osmt,
 	} else if (is_set == 0) {
 		req.query_type = OSMV_QUERY_UD_MULTICAST_DELETE;
 	} else if (is_set == 0xee) {
-
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_send_mcast_request: Set USER DEFINED QUERY\n");
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+			"Set USER DEFINED QUERY\n");
 		req.query_type = OSMV_QUERY_USER_DEFINED;
 		user.method = IB_MAD_METHOD_GET;
 		user.attr_id = IB_MAD_ATTR_MCMEMBER_RECORD;
 		user.attr_offset = ib_get_attr_offset(sizeof(ib_member_rec_t));
 	} else if (is_set == 0xff) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_send_mcast_request: Set USER DEFINED QUERY\n");
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+			"Set USER DEFINED QUERY\n");
 		req.query_type = OSMV_QUERY_USER_DEFINED;
 		user.method = IB_MAD_METHOD_SET;
 		user.attr_id = IB_MAD_ATTR_MCMEMBER_RECORD;
@@ -356,8 +347,7 @@ osmt_send_mcast_request(IN osmtest_t * const p_osmt,
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_send_mcast_request: ERR 0206: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0206: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -370,12 +360,10 @@ osmt_send_mcast_request(IN osmtest_t * const p_osmt,
 	status = context.result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_send_mcast_request: ERR 0224: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0224: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_send_mcast_request: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (context.result.
@@ -550,12 +538,10 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: " "GetTable of all current MCGs...\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO, "GetTable of all current MCGs...\n");
 	status = osmt_query_mcast(p_osmt);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 2FF "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 2FF "
 			"GetTable of all records has failed!\n");
 		goto Exit;
 	}
@@ -572,8 +558,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* Only when we are on single mode check flow - do the count comparison, otherwise skip */
 	if (p_osmt->opt.mmode == 1 || p_osmt->opt.mmode == 3) {
 		start_cnt = cl_qmap_count(p_mgrp_mlid_tbl);
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow (start): "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO, "(start): "
 			"Number of MC Records found in SA DB is %d\n",
 			start_cnt);
 	}
@@ -596,26 +581,23 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 		if (IS_IPOIB_MGID(&p_mgrp->mcmember_rec.mgid)) {
 			start_ipoib_cnt++;
 		} else {
-			osm_log(&p_osmt->log, OSM_LOG_INFO,
-				"osmt_run_mcast_flow: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 				"Non-IPoIB MC Groups exist: mgid=%s\n",
 				inet_ntop(AF_INET6,
-					p_mgrp->mcmember_rec.mgid.raw,
-					gid_str, sizeof gid_str));
+					  p_mgrp->mcmember_rec.mgid.raw,
+					  gid_str, sizeof gid_str));
 			mcg_outside_test_cnt++;
 		}
 
 		p_mgrp = (osmtest_mgrp_t *) cl_qmap_next(&p_mgrp->map_item);
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Found %d non-IPoIB MC Groups\n", mcg_outside_test_cnt);
 
 	if (start_ipoib_cnt) {
 		/* o15-0.2.4 - Check a join request to already created MCG */
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Found IPoIB MC Group, so we run SilverStorm Bug Flow...\n");
 		/* Try to join first like IPoIB of SilverStorm */
 		memcpy(&mc_req_rec.mgid, &osm_ipoib_good_mgid,
@@ -631,23 +613,19 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 						 &mc_req_rec,
 						 comp_mask, &res_sa_mad);
 
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Joining an existing IPoIB multicast group\n");
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow: "
-			"Sent Join request with :\n\t\tport_gid=%s"
-			", mgid=%s\n"
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+			"Sent Join request with :\n\t\tport_gid=%s, mgid=%s\n"
 			"\t\tjoin state= 0x%x, response is : %s\n",
 			inet_ntop(AF_INET6, mc_req_rec.port_gid.raw,
-				gid_str, sizeof gid_str),
+				  gid_str, sizeof gid_str),
 			inet_ntop(AF_INET6, mc_req_rec.mgid.raw,
-				gid_str2, sizeof gid_str2),
+				  gid_str2, sizeof gid_str2),
 			(mc_req_rec.scope_state & 0x0F),
 			ib_get_err_str(status));
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_run_mcast_flow: ERR 02B3: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02B3: "
 				"Failed joining existing IPoIB MCGroup - got %s\n",
 				ib_get_err_str(status));
 			goto Exit;
@@ -663,8 +641,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 		   has included some more fields but we know that problem was
 		   genereated by the RATE
 		 */
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Received attributes of MCG : \n\t\tMTU=0x%02X, RATE=0x%02X\n",
 			p_mc_res->mtu, p_mc_res->rate);
 
@@ -686,25 +663,21 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 		    IB_MCR_COMPMASK_MTU | IB_MCR_COMPMASK_RATE_SEL |
 		    IB_MCR_COMPMASK_RATE;
 
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Sending attributes of MCG : \n\t\tMTU=0x%02X, RATE=0x%02X\n",
 			mc_req_rec.mtu, mc_req_rec.rate);
 		status = osmt_send_mcast_request(p_osmt, 0xff,	/* User Defined query */
 						 &mc_req_rec,
 						 comp_mask, &res_sa_mad);
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Sent Join request using response values, response is : %s\n",
 			ib_get_err_str(status));
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_run_mcast_flow: ERR 02EF: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02EF: "
 				"Query as Full Member of already existing "
 				"ipoib group gid %s has failed\n",
 				inet_ntop(AF_INET6, mc_req_rec.mgid.raw,
-					gid_str, sizeof gid_str));
-
+					  gid_str, sizeof gid_str));
 			goto Exit;
 		}
 		/* We do not want to leave the MCG since its IPoIB */
@@ -713,23 +686,20 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
   /**************************************************************************/
 	/* Check Get with invalid mlid */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: " "Checking Get with invalid mlid...\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+		"Checking Get with invalid mlid...\n");
 	/* Request Get */
 	ib_member_set_join_state(&mc_req_rec, IB_MC_REC_STATE_FULL_MEMBER);
 	mc_req_rec.mlid = invalid_mlid;
 	comp_mask = IB_MCR_COMPMASK_MLID;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 0xee,	/* User Defined query Get */
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status == IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow : ERR 2E0 "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 2E0 "
 			"SubnAdmGet with invalid mlid 0x%x succeeded\n",
 			cl_ntoh16(mc_req_rec.mlid));
 		status = IB_ERROR;
@@ -741,8 +711,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
   /**************************************************************************/
 	/* Check Get with invalid port guid */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Get with invalid port guid (0x0) but valid interface ID : 0x%"
 		PRIx64 "...\n",
 		cl_ntoh64(mc_req_rec.port_gid.unicast.interface_id));
@@ -753,16 +722,13 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	       sizeof(ib_net64_t));
 	comp_mask = IB_MCR_COMPMASK_GID;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 0xee,	/* User Defined query Get */
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status == IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow : ERR 2E4 "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 2E4 "
 			"SubnAdmGet with invalid port guid succeeded\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -775,8 +741,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* o15.0.1.3:  */
 	/* - Request Join with insufficient comp_mask */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with insufficient comp mask qkey & pkey (o15.0.1.3)...\n");
 
 	/* no MGID */
@@ -790,28 +755,23 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	    IB_MCR_COMPMASK_SL | IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    ((ib_net16_t) (res_sa_mad.status & IB_SMP_STATUS_MASK)) !=
 	    IB_SA_MAD_STATUS_INSUF_COMPS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02EE: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02EE: "
 			"Expectedd REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with insufficient comp mask - sl (15.0.1.3)...\n");
 
 	/* no MGID */
@@ -827,22 +787,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	    IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    ((ib_net16_t) (res_sa_mad.status & IB_SMP_STATUS_MASK)) !=
 	    IB_SA_MAD_STATUS_INSUF_COMPS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02ED: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02ED: "
 			"Expectedd REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -855,8 +811,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	p_mc_res = ib_sa_mad_get_payload_ptr(&res_sa_mad);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with insufficient comp mask - flow label (o15.0.1.3)...\n");
 
 	/* Request Join */
@@ -870,22 +825,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	    IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    ((ib_net16_t) (res_sa_mad.status & IB_SMP_STATUS_MASK)) !=
 	    IB_SA_MAD_STATUS_INSUF_COMPS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02EC: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02EC: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -894,8 +845,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	p_mc_res = ib_sa_mad_get_payload_ptr(&res_sa_mad);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with insufficient comp mask - tclass (o15.0.1.3)...\n");
 
 	/* Request Join */
@@ -911,22 +861,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	    /* IB_MCR_COMPMASK_TCLASS |  Intentionally missed to raise an error */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    ((ib_net16_t) (res_sa_mad.status & IB_SMP_STATUS_MASK)) !=
 	    IB_SA_MAD_STATUS_INSUF_COMPS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02EA: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02EA: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -935,8 +881,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	p_mc_res = ib_sa_mad_get_payload_ptr(&res_sa_mad);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with insufficient comp mask - tclass qkey (o15.0.1.3)...\n");
 
 	/* no MGID */
@@ -952,30 +897,25 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	    /* IB_MCR_COMPMASK_TCLASS |  intentionaly missed to raise the error */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    ((ib_net16_t) (res_sa_mad.status & IB_SMP_STATUS_MASK)) !=
 	    IB_SA_MAD_STATUS_INSUF_COMPS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02E9: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02E9: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* o15.0.1.8: */
 	/* - Request join with irrelevant RATE : get a ERR_INSUFFICIENT_COMPONENTS */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with unrealistic rate (o15.0.1.8)...\n");
 
 	/* impossible requested rate */
@@ -985,28 +925,23 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	comp_mask = IB_MCR_COMPMASK_GID | IB_MCR_COMPMASK_PORT_GID | IB_MCR_COMPMASK_QKEY | IB_MCR_COMPMASK_PKEY | IB_MCR_COMPMASK_SL | IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0207: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0207: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_REQ_INVALID got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Check Valid value which is unreasonable now */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with unrealistic rate 120GB (o15.0.1.8)...\n");
 
 	/* impossible requested rate */
@@ -1016,28 +951,23 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	comp_mask = IB_MCR_COMPMASK_GID | IB_MCR_COMPMASK_PORT_GID | IB_MCR_COMPMASK_QKEY | IB_MCR_COMPMASK_PKEY | IB_MCR_COMPMASK_SL | IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0208: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0208: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_REQ_INVALID got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Check Valid value which is unreasonable now */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with less than min rate 2.5GB (o15.0.1.8)...\n");
 
 	/* impossible requested rate */
@@ -1047,28 +977,23 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	comp_mask = IB_MCR_COMPMASK_GID | IB_MCR_COMPMASK_PORT_GID | IB_MCR_COMPMASK_QKEY | IB_MCR_COMPMASK_PKEY | IB_MCR_COMPMASK_SL | IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02AB: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02AB: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_REQ_INVALID got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Checking above max value of MTU which is impossible */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with unrealistic mtu : \n\t\tmore than 4096 -"
 		" max (o15.0.1.8)...\n");
 
@@ -1078,17 +1003,14 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	comp_mask = IB_MCR_COMPMASK_GID | IB_MCR_COMPMASK_PORT_GID | IB_MCR_COMPMASK_QKEY | IB_MCR_COMPMASK_PKEY | IB_MCR_COMPMASK_SL | IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_MTU_SEL | IB_MCR_COMPMASK_MTU;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02AC: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02AC: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_REQ_INVALID got:%s/%s\n",
 			ib_get_err_str(status),
 			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
@@ -1098,8 +1020,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	}
 
 	/* Checking below min value of MTU which is impossible */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with unrealistic mtu : \n\t\tless than 256 -"
 		" min (o15.0.1.8)...\n");
 
@@ -1109,27 +1030,22 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	comp_mask = IB_MCR_COMPMASK_GID | IB_MCR_COMPMASK_PORT_GID | IB_MCR_COMPMASK_QKEY | IB_MCR_COMPMASK_PKEY | IB_MCR_COMPMASK_SL | IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_MTU_SEL | IB_MCR_COMPMASK_MTU;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02AD: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02AD: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_REQ_INVALID got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with unrealistic mtu (o15.0.1.8)...\n");
 
 	/* impossible requested mtu */
@@ -1138,29 +1054,24 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	comp_mask = IB_MCR_COMPMASK_GID | IB_MCR_COMPMASK_PORT_GID | IB_MCR_COMPMASK_QKEY | IB_MCR_COMPMASK_PKEY | IB_MCR_COMPMASK_SL | IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_MTU_SEL | IB_MCR_COMPMASK_MTU;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02AE: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02AE: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_REQ_INVALID got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 #if 0
 	/* Currently PacketLifeTime isn't checked in opensm */
 	/* Check PacketLifeTime as 0 */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Create with unrealistic packet life value less than 0 (o15.0.1.8)...\n");
 
 	/* impossible requested packet life */
@@ -1169,21 +1080,17 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	comp_mask = IB_MCR_COMPMASK_GID | IB_MCR_COMPMASK_PORT_GID | IB_MCR_COMPMASK_QKEY | IB_MCR_COMPMASK_PKEY | IB_MCR_COMPMASK_SL | IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_LIFE | IB_MCR_COMPMASK_LIFE_SEL;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02AF: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02AF: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_REQ_INVALID got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -1193,8 +1100,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* - Create an MGID by asking for a join with MGID = 0 */
 	/*   providing P_Key, Q_Key, SL, FlowLabel, Tclass. */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Create given MGID=0 skip service level (o15.0.1.4)...\n");
 
 	osmt_init_mc_query_rec(p_osmt, &mc_req_rec);
@@ -1214,22 +1120,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	    IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    ((ib_net16_t) (res_sa_mad.status & IB_SMP_STATUS_MASK)) !=
 	    IB_SA_MAD_STATUS_INSUF_COMPS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02A8: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02A8: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -1238,33 +1140,28 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_query_mcast(p_osmt);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02AA: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02AA: "
 			"Could not get all MC Records in subnet, got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Only when we are on single mode check flow - do the count comparison, otherwise skip */
 	if (p_osmt->opt.mmode == 1 || p_osmt->opt.mmode == 3) {
 		middle_cnt = cl_qmap_count(&p_osmt->exp_subn.mgrp_mlid_tbl);
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow (post false create): "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO, "(post false create): "
 			"Number of MC Records found in SA DB is %d\n",
 			middle_cnt);
 		if (middle_cnt != start_cnt) {
-			osm_log(&p_osmt->log, OSM_LOG_INFO,
-				"osmt_run_mcast_flow: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 				"Got different number of records stored in SA DB (before any creation)\n"
 				"Instead of %d got %d\n", start_cnt,
 				middle_cnt);
 		}
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Create given MGID=0 skip Qkey and Pkey (o15.0.1.4)...\n");
 
 	osmt_init_mc_query_rec(p_osmt, &mc_req_rec);
@@ -1282,22 +1179,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	    IB_MCR_COMPMASK_SL | IB_MCR_COMPMASK_FLOW | IB_MCR_COMPMASK_JOIN_STATE | IB_MCR_COMPMASK_TCLASS |	/* all above are required */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    ((ib_net16_t) (res_sa_mad.status & IB_SMP_STATUS_MASK)) !=
 	    IB_SA_MAD_STATUS_INSUF_COMPS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02A7: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02A7: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -1306,8 +1199,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	status = osmt_query_mcast(p_osmt);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Create given MGID=0 skip TClass (o15.0.1.4)...\n");
 
 	osmt_init_mc_query_rec(p_osmt, &mc_req_rec);
@@ -1330,28 +1222,23 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	    /* all above are required */
 	    IB_MCR_COMPMASK_RATE_SEL | IB_MCR_COMPMASK_RATE;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR ||
 	    ((ib_net16_t) (res_sa_mad.status & IB_SMP_STATUS_MASK)) !=
 	    IB_SA_MAD_STATUS_INSUF_COMPS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02A6: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02A6: "
 			"Expected REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Create given MGID=0 valid Set several options :\n\t\t"
 		"First above min RATE, Second less than max RATE\n\t\t"
 		"Third above min MTU, Second less than max MTU\n\t\t"
@@ -1369,23 +1256,19 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02A5: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02A5: "
 			"Failed to create MCG for MGID=0 with higher than minimum RATE - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
@@ -1400,23 +1283,19 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0211: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0211: "
 			"Failed to create MCG for MGID=0 with less than highest RATE - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
@@ -1430,23 +1309,19 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0238: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0238: "
 			"Failed to create MCG for MGID=0 with less than highest MTU - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
@@ -1459,31 +1334,26 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0239: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0239: "
 			"Failed to create MCG for MGID=0 with higher than lowest MTU - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
 	/* Good Flow - mgid is 0 while giving all required fields for join : P_Key, Q_Key, SL, FlowLabel, Tclass */
 	/* Using Exact feasible MTU & RATE */
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Using Exact feasible MTU & RATE: "
 		"MTU = 0x%02X, RATE = 0x%02X\n", mtu_phys, rate_phys);
 
@@ -1499,31 +1369,26 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0240: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0240: "
 			"Failed to create MCG for MGID=0 with exact MTU & RATE - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
 	/* Good Flow - mgid is 0 while giving all required fields for join : P_Key, Q_Key, SL, FlowLabel, Tclass */
 	/* Using Exact feasible RATE */
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Using Exact feasible RATE: 0x%02X\n", rate_phys);
 
 	mc_req_rec.rate = rate_phys;
@@ -1534,31 +1399,26 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0241: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0241: "
 			"Failed to create MCG for MGID=0 with exact RATE - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
 	/* Good Flow - mgid is 0 while giving all required fields for join : P_Key, Q_Key, SL, FlowLabel, Tclass */
 	/* Using Exact feasible MTU */
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Using Exact feasible MTU: 0x%02X\n", mtu_phys);
 
 	mc_req_rec.mtu = mtu_phys;
@@ -1569,30 +1429,25 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0242: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0242: "
 			"Failed to create MCG for MGID=0 with exact MTU - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
 	/* o15.0.1.5: */
 	/* - Check the returned MGID is valid. (p 804) */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Validating resulting MGID (o15.0.1.5)...\n");
 	/* prefix 0xFF1 Scope 0xA01B */
 	/* Since we did not directly specified SCOPE in comp mask
@@ -1601,20 +1456,17 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	    (p_mc_res->mgid.multicast.header[1] != 0x12) ||
 	    (p_mc_res->mgid.multicast.raw_group_id[0] != 0xA0) ||
 	    (p_mc_res->mgid.multicast.raw_group_id[1] != 0x1B)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0209: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0209: "
 			"Validating MGID failed. MGID:%s\n",
 			inet_ntop(AF_INET6, p_mc_res->mgid.raw, gid_str,
-				sizeof gid_str)
-		    );
+				  sizeof gid_str));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Good Flow - mgid is 0 while giving all required fields for join : P_Key, Q_Key, SL, FlowLabel, Tclass */
 	/* Using feasible GREATER_THAN 0 packet lifitime */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Create given MGID=0 (o15.0.1.4)...\n");
 
 	status = osmt_query_mcast(p_osmt);
@@ -1636,23 +1488,19 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0210: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0210: "
 			"Failed to create MCG for MGID=0 - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
@@ -1661,34 +1509,28 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	osmt_init_mc_query_rec(p_osmt, &mc_req_rec);
 	mc_req_rec.mgid = good_mgid;
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Create given valid MGID=%s (o15.0.1.6)...\n",
 		inet_ntop(AF_INET6, mc_req_rec.mgid.raw, gid_str,
-			sizeof gid_str));
+			  sizeof gid_str));
 
 	/* Before creation, need to check that this group doesn't exist */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Verifying that MCGroup with this MGID doesn't exist by trying to Join it (o15.0.1.13)...\n");
 
 	ib_member_set_join_state(&mc_req_rec, IB_MC_REC_STATE_NON_MEMBER);
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,	/* join */
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0301: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0301: "
 			"Tried joining group that shouldn't have existed - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -1696,21 +1538,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* Set State to full member to allow group creation */
 	ib_member_set_join_state(&mc_req_rec, IB_MC_REC_STATE_FULL_MEMBER);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Now creating group with given valid MGID=%s (o15.0.1.6)...\n",
 		inet_ntop(AF_INET6, mc_req_rec.mgid.raw, gid_str,
-			sizeof gid_str));
+			  sizeof gid_str));
 
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0211: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0211: "
 			"Failed to create MCG for MGID=%s (o15.0.1.6) - got %s/%s\n",
 			inet_ntop(AF_INET6, good_mgid.raw, gid_str,
-				sizeof gid_str),
-			ib_get_err_str(status),
+				  sizeof gid_str), ib_get_err_str(status),
 			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
@@ -1718,122 +1557,101 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Validating resulting MGID (o15.0.1.6)...\n");
 	/* prefix 0xFF1 Scope 0xA01B */
 	if ((p_mc_res->mgid.multicast.header[0] != 0xFF) || (p_mc_res->mgid.multicast.header[1] != 0x12) ||	/* HACK hardcoded scope = 0x02 */
 	    (p_mc_res->mgid.multicast.raw_group_id[0] != 0xA0) ||
 	    (p_mc_res->mgid.multicast.raw_group_id[1] != 0x1C)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0212: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0212: "
 			"Validating MGID failed. MGID:%s\n",
 			inet_ntop(AF_INET6, p_mc_res->mgid.raw, gid_str,
-				sizeof gid_str)
-		    );
+				  sizeof gid_str));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* - Try to create a new MCG with invalid MGID : get back ERR_REQ_INVALID */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking BAD MGID=0xFA..... (o15.0.1.6)...\n");
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 
 	mc_req_rec.mgid.raw[0] = 0xFA;
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0213: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0213: "
 			"Failed to recognize MGID error for MGID=0xFA - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* - Try again with MGID prefix = 0xA01B (maybe 0x1BA0 little or big ?) */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking BAD MGID=0xFF12A01B..... with link-local scope (o15.0.1.6)...\n");
 
 	mc_req_rec.mgid.raw[0] = 0xFF;
 	mc_req_rec.mgid.raw[3] = 0x1B;
 	comp_mask = comp_mask | IB_MCR_COMPMASK_SCOPE;
 	mc_req_rec.scope_state = mc_req_rec.scope_state & 0x2F;	/* local scope */
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0214: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0214: "
 			"Failed to recognize MGID error for A01B with link-local bit (status %s) (rem status %s)\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Change the mgid prefix - get back ERR_REQ_INVALID */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking BAD MGID PREFIX=0xEF... (o15.0.1.6)...\n");
 
 	mc_req_rec.mgid = good_mgid;
 
 	mc_req_rec.mgid.raw[0] = 0xEF;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0215: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0215: "
 			"Failed to recognize MGID PREFIX error for MGID=0xEF - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Change the scope to reserved - get back VALID REQ */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking local scope with full member \n\t\tand valid mgid %s"
 		"  ... (o15.0.1.6)...\n",
 		inet_ntop(AF_INET6, mc_req_rec.mgid.raw, gid_str,
-			sizeof gid_str));
+			  sizeof gid_str));
 
 	mc_req_rec.mgid = good_mgid;
 
@@ -1842,12 +1660,10 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0216: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0216: "
 			"Failed to create MCG for MGID=%s - got %s/%s\n",
 			inet_ntop(AF_INET6, good_mgid.raw, gid_str,
-				sizeof gid_str),
-			ib_get_err_str(status),
+				  sizeof gid_str), ib_get_err_str(status),
 			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
@@ -1855,22 +1671,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
 	/* Change the flags to invalid value 0x2 - get back INVALID REQ */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking invalid flags=0xFF 22  ... (o15.0.1.6)...\n");
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 
 	mc_req_rec.mgid = good_mgid;
 
@@ -1879,25 +1691,21 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0217: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0217: "
 			"Failed to recognize create with invalid flags value 0x2 - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Change the MGID to link local MGID  - get back VALID REQ */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking link local MGID 0xFF02:0:0:0:0:0:0:1 (o15.0.1.6)...\n");
 
 	mc_req_rec.mgid = osm_link_local_mgid;
@@ -1905,23 +1713,19 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0218: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0218: "
 			"Failed to create MCG for MGID=0xFF02:0:0:0:0:0:0:1 - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
@@ -1931,12 +1735,10 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* o15.0.1.9 */
 	/* - Create MCG with Invalid JoinState.FullMember != 1 : get ERR_REQ_INVALID */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking new MGID with invalid join state (o15.0.1.9)...\n");
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 
 	mc_req_rec.mgid = good_mgid;
 	mc_req_rec.mgid.raw[12] = 0xFF;
@@ -1944,24 +1746,20 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0219: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0219: "
 			"Failed to recognize create with JoinState != FullMember - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Lets try a valid join scope state */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking new MGID with valid join state (o15.0.1.9)...\n");
 
 	mc_req_rec.mgid = good_mgid;
@@ -1971,33 +1769,27 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0220: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0220: "
 			"Failed to create MCG with valid join state 0x3 - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
 	/* Lets try another invalid join scope state */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking new MGID with invalid join state (o15.0.1.9)...\n");
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 
 	/* We have created a new MCG so now we need different mgid when cresting group otherwise it will be counted as join request . */
 	mc_req_rec.mgid = good_mgid;
@@ -2007,24 +1799,20 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0221: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0221: "
 			"Failed to recognize create with JoinState != FullMember - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Lets try another valid join scope state */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking new MGID creation with valid join state (o15.0.1.9)...\n");
 
 	mc_req_rec.mgid = good_mgid;
@@ -2036,23 +1824,19 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0222: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0222: "
 			"Failed to create MCG with valid join state 0xF - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* Save the mlid created in test_created_mlids map */
 	p_recvd_rec =
 	    (ib_member_rec_t *) ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Created MGID:%s MLID:0x%04X\n",
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Created MGID:%s MLID:0x%04X\n",
 		inet_ntop(AF_INET6, p_recvd_rec->mgid.raw, gid_str,
-			sizeof gid_str),
-		cl_ntoh16(p_recvd_rec->mlid));
+			  sizeof gid_str), cl_ntoh16(p_recvd_rec->mlid));
 	cl_map_insert(&test_created_mlids, cl_ntoh16(p_recvd_rec->mlid),
 		      p_recvd_rec);
 
@@ -2060,8 +1844,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	   checked by SilverStorm bug o15-0.2.4, never the less recheck */
 	/* o15-0.2.4 - Check a join request to already created MCG */
 	p_mc_res = ib_sa_mad_get_payload_ptr(&res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: " "Check o15-0.2.4 statement...\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO, "Check o15-0.2.4 statement...\n");
 	/* Try to join */
 	memcpy(&mc_req_rec.mgid, &p_mc_res->mgid, sizeof(ib_gid_t));
 	/* Request Join */
@@ -2073,8 +1856,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 0x1,	/* User Defined query */
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02CC: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02CC: "
 			"Failed to join MCG with valid req, returned status = %s\n",
 			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
@@ -2083,8 +1865,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* o15.0.1.11: */
 	/* - Try to join into a MGID that exists with JoinState=SendOnlyMember -  */
 	/*   see that it updates JoinState. What is the routing change? */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Retry of existing MGID - See JoinState update (o15.0.1.11)...\n");
 
 	mc_req_rec.mgid = good_mgid;
@@ -2093,22 +1874,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02CD: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02CD: "
 			"Failed to update existing MGID - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Validating Join State update with NonMember (o15.0.1.11)...\n");
 
 	if (p_mc_res->scope_state != 0x23) {	/* scope is LSB */
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02CE: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02CE: "
 			"Validating JoinState update failed. Expected 0x23 got: 0x%02X\n",
 			p_mc_res->scope_state);
 		status = IB_ERROR;
@@ -2116,8 +1893,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	}
 
 	/* Try delete current join state then update it with another value  */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking JoinState update request should return 0x22 (o15.0.1.11)...\n");
 
 	mc_req_rec.rate =
@@ -2125,19 +1901,16 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	mc_req_rec.mgid = good_mgid;
 	/* link-local scope, non member (so we should not be able to delete) */
 	/*  but the FullMember bit should be gone */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Partially delete JoinState (o15.0.1.14)...\n");
 	mc_req_rec.scope_state = 0x22;
 	status = osmt_send_mcast_request(p_osmt, 0,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if ((status != IB_SUCCESS) || (p_mc_res->scope_state != 0x21)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02CF: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02CF: "
 			"Failed to partially update JoinState : %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -2149,22 +1922,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02C0: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02C0: "
 			"Failed to update existing MCG - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Validating Join State update with Send Only Member (o15.0.1.11)...\n");
 
 	if (p_mc_res->scope_state != 0x25) {	/* scope is MSB */
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02C1: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02C1: "
 			"Validating JoinState update failed. Expected 0x25 got: 0x%02X\n",
 			p_mc_res->scope_state);
 		status = IB_ERROR;
@@ -2176,23 +1945,19 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02C2: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02C2: "
 			"Failed to update existing MGID - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Validating Join State update with Full Member\n\t\t"
 		"to an existing 0x5 state MCG (o15.0.1.11)...\n");
 
 	if (p_mc_res->scope_state != 0x25) {	/* scope is LSB */
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02C3: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02C3: "
 			"Validating JoinState update failed. Expected 0x25 got: 0x%02X\n",
 			p_mc_res->scope_state);
 		status = IB_ERROR;
@@ -2205,29 +1970,25 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02C4: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02C4: "
 			"Failed to update existing MGID - got %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Validating Join State update with Non Member\n\t\t"
 		"to an existing 0x5 state MCG (o15.0.1.11)...\n");
 
 	if (p_mc_res->scope_state != 0x27) {	/* scope is LSB */
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02C5: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02C5: "
 			"Validating JoinState update failed. Expected 0x27 got: 0x%02X\n",
 			p_mc_res->scope_state);
 		status = IB_ERROR;
 		goto Exit;
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"DEBUG - Current scope_state value : 0x%02X...\n",
 		p_mc_res->scope_state);
 
@@ -2241,11 +2002,9 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* - Try joining with rate that does not exist in any MCG -
 	   ERR_REQ_INVALID */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking BAD RATE when connecting to existing MGID (o15.0.1.13)...\n");
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 
 	mc_req_rec.mgid = good_mgid;
 	mc_req_rec.rate =
@@ -2255,28 +2014,23 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02C6: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02C6: "
 			"Failed to catch BAD RATE joining an exiting MGID: %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Try MTU that does not exist in any MCG */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking BAD MTU (higher them max) when connecting to "
 		"existing MGID (o15.0.1.13)...\n");
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 
 	mc_req_rec.mgid = osm_ipoib_mgid;
 	mc_req_rec.mtu = IB_MTU_LEN_4096 | IB_PATH_SELECTOR_GREATER_THAN << 6;
@@ -2285,28 +2039,23 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02C7: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02C7: "
 			"Failed to catch BAD RATE (higher them max) joining an exiting MGID: %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Try another MTU that does not exist in any MCG */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking BAD MTU (less than min) when connecting "
 		"to existing MGID (o15.0.1.13)...\n");
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 
 	mc_req_rec.mgid = osm_ipoib_mgid;
 	mc_req_rec.mtu = IB_MTU_LEN_256 | IB_PATH_SELECTOR_LESS_THAN << 6;
@@ -2315,17 +2064,14 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02C8: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02C8: "
 			"Failed to catch BAD RATE (less them min) joining an exiting MGID: %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -2333,8 +2079,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* o15.0.1.14: */
 	/* - Try partial delete - actually updating the join state. check it. */
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking partial JoinState delete request - removing NonMember (o15.0.1.14)...\n");
 
 	mc_req_rec.rate =
@@ -2350,22 +2095,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02C9: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02C9: "
 			"Fail to partially update JoinState during delete: %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Validating Join State removal of Non Member bit (o15.0.1.14)...\n");
 	if (p_mc_res->scope_state != 0x25) {	/* scope is MSB - now only the non member & send only member have left */
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02CA: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02CA: "
 			"Validating JoinState update failed. Expected 0x25 got: 0x%02X\n",
 			p_mc_res->scope_state);
 		status = IB_ERROR;
@@ -2379,23 +2120,19 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02CB: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02CB: "
 			"Failed to update JoinState during delete: %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Validating Join State update remove (o15.0.1.14)...\n");
 
 	if (p_mc_res->scope_state != 0x25) {	/* scope is MSB - now only 0x0 so port is removed from MCG */
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02BF: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02BF: "
 			"Validating JoinState update failed. Expected 0x25 got: 0x%02X\n",
 			p_mc_res->scope_state);
 		status = IB_ERROR;
@@ -2403,36 +2140,29 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	}
 
 	/* - Try joining (not full mem) again to see the group was deleted. (should fail) */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Delete by trying to Join deleted group (o15.0.1.13)...\n");
 
 	mc_req_rec.scope_state = 0x22;	/* use non member - so if no group fail */
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,	/* join */
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status != IB_REMOTE_ERROR) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02BC: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02BC: "
 			"Succeeded Joining Deleted Group: %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* - Try deletion of the IPoIB MCG and get: ERR_REQ_INVALID */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking BAD Delete of Mgid membership (no prev join) (o15.0.1.15)...\n");
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 
 	mc_req_rec.mgid = osm_ipoib_mgid;
 	mc_req_rec.rate =
@@ -2441,27 +2171,23 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	status = osmt_send_mcast_request(p_osmt, 0,	/* delete flag */
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02BD: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02BD: "
 			"Failed to catch BAD delete from IPoIB: %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
 
 	/* Prepare another MCG for the following tests : */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Create given MGID=%s\n\t\t(o15.0.1.4)...\n",
 		inet_ntop(AF_INET6, osm_ipoib_mgid.raw, gid_str,
-			sizeof gid_str));
+			  sizeof gid_str));
 
 	mc_req_rec.mgid = good_mgid;
 	mc_req_rec.mgid.raw[12] = 0xAA;
@@ -2473,19 +2199,16 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02BE: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02BE: "
 			"Failed to create MCG for %s - got %s/%s\n",
 			inet_ntop(AF_INET6, good_mgid.raw, gid_str,
-				sizeof gid_str),
-			ib_get_err_str(status),
+				  sizeof gid_str), ib_get_err_str(status),
 			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		goto Exit;
 	}
 
 	/* - Try delete with valid join state */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Full Delete of a group (o15.0.1.14)...\n");
 	mc_req_rec.scope_state = 0x21;	/* the FullMember is the current JoinState */
 	status = osmt_send_mcast_request(p_osmt, 0,
@@ -2497,11 +2220,9 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	/* o15.0.1.15: */
 	/* - Try deletion of the IPoIB MCG and get: ERR_REQ_INVALID */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking BAD Delete of IPoIB membership (no prev join) (o15.0.1.15)...\n");
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 
 	mc_req_rec.mgid = osm_ipoib_mgid;
 	mc_req_rec.rate =
@@ -2511,17 +2232,14 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_send_mcast_request(p_osmt, 0,	/* delete flag */
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if ((status != IB_REMOTE_ERROR) ||
 	    (res_sa_mad.status != IB_SA_MAD_STATUS_REQ_INVALID)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 0223: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0223: "
 			"Failed to catch BAD delete from IPoIB: %s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -2529,8 +2247,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
   /**************************************************************************/
 	/* Checking join with invalid MTU */
 	osmt_init_mc_query_rec(p_osmt, &mc_req_rec);
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Checking Join with unrealistic mtu : \n"
 		"\t\tFirst create new MCG than try to join it \n"
 		"\t\twith unrealistic MTU greater than 4096 (o15.0.1.8)...\n");
@@ -2546,8 +2263,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 					 &mc_req_rec, comp_mask, &res_sa_mad);
 	p_mc_res = ib_sa_mad_get_payload_ptr(&res_sa_mad);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02EB: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02EB: "
 			"Failed to create new mgrp\n");
 		goto Exit;
 	}
@@ -2565,20 +2281,16 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	    IB_MCR_COMPMASK_JOIN_STATE |
 	    IB_MCR_COMPMASK_MTU_SEL | IB_MCR_COMPMASK_MTU;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmt_send_mcast_request(p_osmt, 1,
 					 &mc_req_rec, comp_mask, &res_sa_mad);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status == IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02E4: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02E4: "
 			"Expected REMOTE ERROR got:%s/%s\n",
 			ib_get_err_str(status),
-			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad))
-		    );
+			ib_get_mad_status_str((ib_mad_t *) (&res_sa_mad)));
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -2586,14 +2298,12 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	/* - Try GetTable with PortGUID wildcarded and get back some groups. */
 	status = osmt_query_mcast(p_osmt);
 	cnt = cl_qmap_count(&p_osmt->exp_subn.mgrp_mlid_tbl);
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow (Before checking Max MCG creation): "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO, "(Before checking Max MCG creation): "
 		"Number of MC Records found in SA DB is %d\n", cnt);
 
   /**************************************************************************/
 	/* Checking join on behalf of remote port gid */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow: " "Checking Proxy Join...\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO, "Checking Proxy Join...\n");
 	osmt_init_mc_query_rec(p_osmt, &mc_req_rec);
 	memset(&context, 0, sizeof(context));
 
@@ -2604,8 +2314,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 				      sizeof(*p_rec), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02E5: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02E5: "
 			"osmtest_get_all_recs failed on getting all node records(%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -2615,17 +2324,15 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	 * Populate the database with the received records.
 	 */
 	num_recs = context.result.result_cnt;
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_run_mcast_flow: " "Received %u records\n", num_recs);
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Received %u records\n", num_recs);
 
 	for (i = 0; i < num_recs; i++) {
 		p_rec =
 		    osmv_get_query_node_rec(context.result.p_result_madw, i);
 		if (p_rec->node_info.port_guid != p_osmt->local_port.port_guid
 		    && p_rec->node_info.node_type == IB_NODE_TYPE_CA) {
-			osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-				"osmt_run_mcast_flow: " "remote port_guid = 0x%"
-				PRIx64 "\n",
+			OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+				"remote port_guid = 0x%" PRIx64 "\n",
 				cl_ntoh64(p_rec->node_info.port_guid));
 
 			remote_port_guid = p_rec->node_info.port_guid;
@@ -2646,8 +2353,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 						 comp_mask, &res_sa_mad);
 
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_run_mcast_flow: ERR 02B4: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02B4: "
 				"Could not join on behalf of remote port 0x%016"
 				PRIx64 " remote status: %s\n",
 				cl_ntoh64(remote_port_guid),
@@ -2662,8 +2368,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 		/* First try a bad deletion then good one */
 
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Trying deletion of remote port with local port guid\n");
 
 		osmt_init_mc_query_rec(p_osmt, &mc_req_rec);
@@ -2673,19 +2378,16 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 		    IB_MCR_COMPMASK_MGID | IB_MCR_COMPMASK_PORT_GID |
 		    IB_MCR_COMPMASK_JOIN_STATE;
 
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: " EXPECTING_ERRORS_START "\n");
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 
 		status = osmt_send_mcast_request(p_osmt, 0,	/* delete flag */
 						 &mc_req_rec,
 						 comp_mask, &res_sa_mad);
 
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: " EXPECTING_ERRORS_END "\n");
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 		if (status == IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_run_mcast_flow: ERR 02A9: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02A9: "
 				"Successful deletion of remote port guid with local one MGID : "
 				"%s, Got : %s/%s\n",
 				inet_ntop(AF_INET6,
@@ -2698,8 +2400,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 			goto Exit;
 		}
 
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Trying deletion of remote port with the right port guid\n");
 
 		osmt_init_mc_query_rec(p_osmt, &mc_req_rec);
@@ -2714,8 +2415,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 						 &mc_req_rec,
 						 comp_mask, &res_sa_mad);
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_run_mcast_flow: ERR 02B0: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02B0: "
 				"Failed to delete mgid with remote port guid MGID : "
 				"%s, Got : %s/%s\n",
 				inet_ntop(AF_INET6,
@@ -2727,8 +2427,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 			goto Exit;
 		}
 	} else {
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Could not check proxy join since could not found remote port, different from local port\n");
 	}
 
@@ -2739,8 +2438,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	if (p_osmt->opt.mmode > 2) {
 		/* Check invalid Join with max mlid which is more than the
 		   Mellanox switches support 0xC000+0x1000 = 0xd000 */
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmt_run_mcast_flow: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 			"Checking Creation of Maximum avaliable Groups (MulticastFDBCap)...\n");
 		tmp_mlid = cl_ntoh16(max_mlid) - cnt;
 
@@ -2770,8 +2468,8 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 				if (cur_mlid > cl_ntoh16(max_mlid)) {
 
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmt_run_mcast_flow : ERR 2E1 "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 2E1 "
 						"Successful Join with greater mlid than switches support (MulticastFDBCap) 0x%04X\n",
 						cur_mlid);
 					status = IB_ERROR;
@@ -2793,12 +2491,11 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 				p_recvd_rec =
 				    (ib_member_rec_t *)
 				    ib_sa_mad_get_payload_ptr(&res_sa_mad);
-				osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-					"osmt_run_mcast_flow : "
+				OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 					"Created MGID:%s MLID:0x%04X\n",
 					inet_ntop(AF_INET6,
-						p_recvd_rec->mgid.raw,
-						gid_str, sizeof gid_str),
+						  p_recvd_rec->mgid.raw,
+						  gid_str, sizeof gid_str),
 					cl_ntoh16(p_recvd_rec->mlid));
 				cl_map_insert(&test_created_mlids,
 					      cl_ntoh16(p_recvd_rec->mlid),
@@ -2817,21 +2514,18 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 
 	status = osmt_query_mcast(p_osmt);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02B1: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02B1: "
 			"Failed to query multicast groups: %s\n",
 			ib_get_err_str(status));
 		goto Exit;
 	}
 
 	cnt = cl_qmap_count(&p_osmt->exp_subn.mgrp_mlid_tbl);
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow (Before Deletion of all MCG): "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO, "(Before Deletion of all MCG): "
 		"Number of MC Records found in SA DB is %d\n", cnt);
 
 	/* Delete all MCG that are not of IPoIB */
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_run_mcast_flow : "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Cleanup all MCG that are not IPoIB...\n");
 
 	p_mgrp_mlid_tbl = &p_osmt->exp_subn.mgrp_mlid_tbl;
@@ -2856,28 +2550,25 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 			    IB_MCR_COMPMASK_PORT_GID |
 			    IB_MCR_COMPMASK_JOIN_STATE;
 
-			osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-				"osmt_run_mcast_flow : "
+			OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 				"Sending request to delete MGID : %s"
 				", scope_state : 0x%02X\n",
 				inet_ntop(AF_INET6, mc_req_rec.mgid.raw,
-					gid_str, sizeof gid_str),
+					  gid_str, sizeof gid_str),
 				mc_req_rec.scope_state);
 			status = osmt_send_mcast_request(p_osmt, 0,	/* delete flag */
 							 &mc_req_rec,
 							 comp_mask,
 							 &res_sa_mad);
 			if (status != IB_SUCCESS) {
-				osm_log(&p_osmt->log, OSM_LOG_ERROR,
-					"osmt_run_mcast_flow: ERR 02FF: "
-					"Failed to delete MGID : %s"
+				OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+					"ERR 02FF: Failed to delete MGID : %s"
 					" ,\n\t\t it is not our MCG, Status : %s/%s\n",
 					inet_ntop(AF_INET6,
-						p_mgrp->mcmember_rec.mgid.raw,
-						gid_str, sizeof gid_str),
+						  p_mgrp->mcmember_rec.mgid.raw,
+						  gid_str, sizeof gid_str),
 					ib_get_err_str(status),
-					ib_get_mad_status_str((ib_mad_t
-							       *)
+					ib_get_mad_status_str((ib_mad_t *)
 							      (&res_sa_mad)));
 				fail_to_delete_mcg++;
 			}
@@ -2890,8 +2581,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	status = osmt_query_mcast(p_osmt);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_mcast_flow: ERR 02B2 "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02B2 "
 			"GetTable of all records has failed - got %s\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -2903,7 +2593,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 	if (p_osmt->opt.mmode == 1 || p_osmt->opt.mmode == 3) {
 		end_cnt = cl_qmap_count(&p_osmt->exp_subn.mgrp_mlid_tbl);
 
-		osm_log(&p_osmt->log, OSM_LOG_INFO, "osmt_run_mcast_flow: " "Status of MC Records in SA DB during the test flow:\n" "  Beginning of test\n" "       Unrelated to the test: %d\n" "       IPoIB MC Records     : %d\n" "       Total                : %d\n" "  End of test\n" "       Failed to delete     : %d\n" "       IPoIB MC Records     : %d\n" "       Total                : %d\n", mcg_outside_test_cnt,	/* Non-IPoIB that existed at the beginning */
+		OSM_LOG(&p_osmt->log, OSM_LOG_INFO, "Status of MC Records in SA DB during the test flow:\n" "  Beginning of test\n" "       Unrelated to the test: %d\n" "       IPoIB MC Records     : %d\n" "       Total                : %d\n" "  End of test\n" "       Failed to delete     : %d\n" "       IPoIB MC Records     : %d\n" "       Total                : %d\n", mcg_outside_test_cnt,	/* Non-IPoIB that existed at the beginning */
 			start_ipoib_cnt,	/* IPoIB records */
 			start_cnt,	/* Total: IPoIB and MC Records unrelated to the test */
 			fail_to_delete_mcg,	/* Failed to delete at the end */
@@ -2913,8 +2603,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 		/* when we compare num of MCG we should consider an outside source which create other MCGs */
 		if ((end_cnt - fail_to_delete_mcg - end_ipoib_cnt) !=
 		    (start_cnt - mcg_outside_test_cnt - start_ipoib_cnt)) {
-			osm_log(&p_osmt->log, OSM_LOG_INFO,
-				"osmt_run_mcast_flow: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 				"Got different number of non-IPoIB records stored in SA DB\n\t\t"
 				"at Start got %d, at End got %d (IPoIB groups only)\n",
 				(start_cnt - mcg_outside_test_cnt -
@@ -2929,25 +2618,22 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
 			uint16_t mlid =
 			    (uint16_t) cl_qmap_key((cl_map_item_t *) p_mgrp);
 
-			osm_log(&p_osmt->log, OSM_LOG_INFO,
-				"osmt_run_mcast_flow: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 				"Found MLID:0x%04X\n", mlid);
 			/* Check if the mlid is in the test_created_mlids. If TRUE, then we
 			   didn't delete a MCgroup that was created in this flow. */
 			if (cl_map_get(&test_created_mlids, mlid) != NULL) {
 				/* This means that we still have an mgrp that we created!! */
-				osm_log(&p_osmt->log, OSM_LOG_ERROR,
-					"osmt_run_mcast_flow: ERR 02FE: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02FE: "
 					"Wasn't able to erase mgrp with MGID:%s"
 					" MLID:0x%04X\n",
 					inet_ntop(AF_INET6,
-						p_mgrp->mcmember_rec.mgid.raw,
-						gid_str, sizeof gid_str),
+						  p_mgrp->mcmember_rec.mgid.raw,
+						  gid_str, sizeof gid_str),
 					mlid);
 				got_error = TRUE;
 			} else {
-				osm_log(&p_osmt->log, OSM_LOG_INFO,
-					"osmt_run_mcast_flow: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 					"Still exists %s MGID:%s\n",
 					(IS_IPOIB_MGID
 					 (&p_mgrp->mcmember_rec.
diff --git a/opensm/osmtest/osmt_service.c b/opensm/osmtest/osmt_service.c
index 5d3ff8b..ce13500 100644
--- a/opensm/osmtest/osmt_service.c
+++ b/opensm/osmtest/osmt_service.c
@@ -74,8 +74,7 @@ osmt_register_service(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(p_log);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_register_service: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Registering service: name: %s id: 0x%" PRIx64 "\n",
 		service_name, cl_ntoh64(service_id));
 
@@ -129,8 +128,7 @@ osmt_register_service(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_register_service: ERR 4A01: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A01: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -138,13 +136,11 @@ osmt_register_service(IN osmtest_t * const p_osmt,
 	status = context.result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_register_service: ERR 4A02: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A02: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_register_service: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (context.result.
@@ -185,8 +181,7 @@ osmt_register_service_with_full_key(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(p_log);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_register_service_with_full_key: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Registering service: name: %s id: 0x%" PRIx64 "\n",
 		service_name, cl_ntoh64(service_id));
 
@@ -241,21 +236,18 @@ osmt_register_service_with_full_key(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_register_service_with_full_key: ERR 4A03: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A03: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
 
 	status = context.result.status;
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_register_service_with_full_key: ERR 4A04: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A04: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_register_service_with_full_key: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (context.result.
@@ -266,18 +258,17 @@ osmt_register_service_with_full_key(IN osmtest_t * const p_osmt,
 
 	/*  Check service key on context to see if match */
 	p_rec = osmv_get_query_svc_rec(context.result.p_result_madw, 0);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Comparing service key...\n" "return key is:\n");
 	for (i = 0; i <= 15; i++) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 			"service_key sent[%u] = %u, service_key returned[%u] = %u\n",
 			i, service_key[i], i, p_rec->service_key[i]);
 	}
 	/*  since c15-0.1.14 not supported all key association queries should bring in return zero in service key */
 	if (memcmp(skey, p_rec->service_key, 16 * sizeof(uint8_t)) != 0) {
 		status = IB_REMOTE_ERROR;
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_register_service_with_full_key: ERR 4A33: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A33: "
 			"Data mismatch in service_key\n");
 		goto Exit;
 	}
@@ -318,8 +309,7 @@ osmt_register_service_with_data(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(p_log);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_register_service_with_data: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Registering service: name: %s id: 0x%" PRIx64 "\n",
 		service_name, cl_ntoh64(service_id));
 
@@ -395,15 +385,13 @@ osmt_register_service_with_data(IN osmtest_t * const p_osmt,
 	user.p_attr = &svc_rec;
 
 	/*  Dump to Service Data b4 send */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_register_service_with_data:"
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Dumping service data b4 send\n");
 	osm_dump_service_record(&p_osmt->log, &svc_rec, OSM_LOG_VERBOSE);
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_register_service_with_data: ERR 4A05: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A05: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -411,13 +399,11 @@ osmt_register_service_with_data(IN osmtest_t * const p_osmt,
 	status = context.result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_register_service_with_data: ERR 4A06: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A06: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_register_service_with_data: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (context.result.
@@ -428,7 +414,7 @@ osmt_register_service_with_data(IN osmtest_t * const p_osmt,
 
 	/*  Check data on context to see if match */
 	p_rec = osmv_get_query_svc_rec(context.result.p_result_madw, 0);
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE, "Comparing service data...\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Comparing service data...\n");
 	if (memcmp(service_data8, p_rec->service_data8, 16 * sizeof(uint8_t)) !=
 	    0
 	    || memcmp(service_data16, p_rec->service_data16,
@@ -438,8 +424,7 @@ osmt_register_service_with_data(IN osmtest_t * const p_osmt,
 	    || memcmp(service_data64, p_rec->service_data64,
 		      2 * sizeof(uint64_t)) != 0) {
 		status = IB_REMOTE_ERROR;
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_register_service_with_data: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 			"Data mismatch in service_data8\n");
 		goto Exit;
 	}
@@ -475,11 +460,9 @@ osmt_get_service_by_id_and_name(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE))
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_get_service_by_id_and_name: "
-			"Getting service record: id: 0x%016" PRIx64
-			" and name: %s\n", cl_ntoh64(sid), sr_name);
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting service record: id: 0x%016" PRIx64
+		" and name: %s\n", cl_ntoh64(sid), sr_name);
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -519,8 +502,7 @@ osmt_get_service_by_id_and_name(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_get_service_by_id_and_name: ERR 4A07: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A07: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -543,13 +525,11 @@ osmt_get_service_by_id_and_name(IN osmtest_t * const p_osmt,
 		if (status == IB_REMOTE_ERROR &&
 		    !strcmp(mad_stat_err, "IB_SA_MAD_STATUS_NO_RECORDS") &&
 		    rec_num == 0) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_service_by_id_and_name: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"IS EXPECTED ERROR ^^^^\n");
 			status = IB_SUCCESS;
 		} else {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_service_by_id_and_name: ERR 4A08: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A08: "
 				"Query failed: %s (%s)\n",
 				ib_get_err_str(status), mad_stat_err);
 			goto Exit;
@@ -557,8 +537,7 @@ osmt_get_service_by_id_and_name(IN osmtest_t * const p_osmt,
 	}
 
 	if (rec_num && num_recs != rec_num) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_get_service_by_id_and_name: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 			"Unmatched number of records: expected: %d, received: %d\n",
 			rec_num, num_recs);
 		status = IB_REMOTE_ERROR;
@@ -569,8 +548,7 @@ osmt_get_service_by_id_and_name(IN osmtest_t * const p_osmt,
 	*p_out_rec = *p_rec;
 
 	if (num_recs) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_get_service_by_id_and_name: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 			"Found service record: name: %s id: 0x%016" PRIx64 "\n",
 			p_rec->service_name, cl_ntoh64(p_rec->service_id));
 
@@ -578,8 +556,7 @@ osmt_get_service_by_id_and_name(IN osmtest_t * const p_osmt,
 	}
 
 Exit:
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_get_service_by_id_and_name: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Expected and found %d records\n", rec_num);
 
 	if (context.result.p_result_madw != NULL) {
@@ -610,11 +587,9 @@ osmt_get_service_by_id(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE))
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_get_service_by_id: "
-			"Getting service record: id: 0x%016" PRIx64 "\n",
-			cl_ntoh64(sid));
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting service record: id: 0x%016" PRIx64 "\n",
+		cl_ntoh64(sid));
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -651,8 +626,7 @@ osmt_get_service_by_id(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_get_service_by_id: ERR 4A09: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A09: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -676,13 +650,11 @@ osmt_get_service_by_id(IN osmtest_t * const p_osmt,
 		if (status == IB_REMOTE_ERROR &&
 		    !strcmp(mad_stat_err, "IB_SA_MAD_STATUS_NO_RECORDS") &&
 		    rec_num == 0) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_service_by_id: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"IS EXPECTED ERROR ^^^^\n");
 			status = IB_SUCCESS;
 		} else {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_service_by_id: ERR 4A0A: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A0A: "
 				"Query failed: %s (%s)\n",
 				ib_get_err_str(status), mad_stat_err);
 			goto Exit;
@@ -690,8 +662,7 @@ osmt_get_service_by_id(IN osmtest_t * const p_osmt,
 	}
 
 	if (rec_num && num_recs != rec_num) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_get_service_by_id: ERR 4A0B: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A0B: "
 			"Unmatched number of records: expected: %d received: %d\n",
 			rec_num, num_recs);
 		status = IB_REMOTE_ERROR;
@@ -702,8 +673,7 @@ osmt_get_service_by_id(IN osmtest_t * const p_osmt,
 	*p_out_rec = *p_rec;
 
 	if (num_recs) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_get_service_by_id: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 			"Found service record: name: %s id: 0x%016" PRIx64 "\n",
 			p_rec->service_name, cl_ntoh64(p_rec->service_id));
 
@@ -711,8 +681,7 @@ osmt_get_service_by_id(IN osmtest_t * const p_osmt,
 	}
 
 Exit:
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_get_service_by_id: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Expected and found %d records\n", rec_num);
 
 	if (context.result.p_result_madw != NULL) {
@@ -745,20 +714,12 @@ osmt_get_service_by_name_and_key(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		char buf_service_key[33];
-
-		sprintf(buf_service_key,
-			"0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
-			skey[0], skey[1], skey[2], skey[3], skey[4], skey[5],
-			skey[6], skey[7], skey[8], skey[9], skey[10], skey[11],
-			skey[12], skey[13], skey[14], skey[15]);
-
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_get_service_by_name_and_key: "
-			"Getting service record: name: %s and key: %s\n",
-			sr_name, buf_service_key);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting service record: name: %s and key: "
+		"0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n",
+		sr_name, skey[0], skey[1], skey[2], skey[3], skey[4], skey[5],
+		skey[6], skey[7], skey[8], skey[9], skey[10], skey[11],
+		skey[12], skey[13], skey[14], skey[15]);
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -799,8 +760,7 @@ osmt_get_service_by_name_and_key(IN osmtest_t * const p_osmt,
 	user.p_attr = &svc_rec;
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_get_service_by_name_and_key: ERR 4A0C: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A0C: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -824,13 +784,11 @@ osmt_get_service_by_name_and_key(IN osmtest_t * const p_osmt,
 		if (status == IB_REMOTE_ERROR &&
 		    !strcmp(mad_stat_err, "IB_SA_MAD_STATUS_NO_RECORDS") &&
 		    rec_num == 0) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_service_by_name_and_key: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"IS EXPECTED ERROR ^^^^\n");
 			status = IB_SUCCESS;
 		} else {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_service_by_name_and_key: ERR 4A0D: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A0D: "
 				"Query failed:%s (%s)\n",
 				ib_get_err_str(status), mad_stat_err);
 			goto Exit;
@@ -838,8 +796,7 @@ osmt_get_service_by_name_and_key(IN osmtest_t * const p_osmt,
 	}
 
 	if (rec_num && num_recs != rec_num) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_get_service_by_name_and_key: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 			"Unmatched number of records: expected: %d, received: %d\n",
 			rec_num, num_recs);
 		status = IB_REMOTE_ERROR;
@@ -850,8 +807,7 @@ osmt_get_service_by_name_and_key(IN osmtest_t * const p_osmt,
 	*p_out_rec = *p_rec;
 
 	if (num_recs) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_get_service_by_name_and_key: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 			"Found service record: name: %s id: 0x%016" PRIx64 "\n",
 			sr_name, cl_ntoh64(p_rec->service_id));
 
@@ -859,8 +815,7 @@ osmt_get_service_by_name_and_key(IN osmtest_t * const p_osmt,
 	}
 
 Exit:
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_get_service_by_name_and_key: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Expected and found %d records\n", rec_num);
 
 	if (context.result.p_result_madw != NULL) {
@@ -892,10 +847,8 @@ osmt_get_service_by_name(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE))
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_get_service_by_name: "
-			"Getting service record: name: %s\n", sr_name);
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting service record: name: %s\n", sr_name);
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -924,8 +877,7 @@ osmt_get_service_by_name(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_get_service_by_name: ERR 4A0E: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A0E: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -949,13 +901,11 @@ osmt_get_service_by_name(IN osmtest_t * const p_osmt,
 		if (status == IB_REMOTE_ERROR &&
 		    !strcmp(mad_stat_err, "IB_SA_MAD_STATUS_NO_RECORDS") &&
 		    rec_num == 0) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_service_by_name: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"IS EXPECTED ERROR ^^^^\n");
 			status = IB_SUCCESS;
 		} else {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_service_by_name: ERR 4A0F: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A0F: "
 				"Query failed: %s (%s)\n",
 				ib_get_err_str(status), mad_stat_err);
 			goto Exit;
@@ -963,8 +913,7 @@ osmt_get_service_by_name(IN osmtest_t * const p_osmt,
 	}
 
 	if (rec_num && num_recs != rec_num) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_get_service_by_name: ERR 4A10: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A10: "
 			"Unmatched number of records: expected: %d, received: %d\n",
 			rec_num, num_recs);
 		status = IB_REMOTE_ERROR;
@@ -975,8 +924,7 @@ osmt_get_service_by_name(IN osmtest_t * const p_osmt,
 	*p_out_rec = *p_rec;
 
 	if (num_recs) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_get_service_by_name: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 			"Found service record: name: %s id: 0x%016" PRIx64 "\n",
 			sr_name, cl_ntoh64(p_rec->service_id));
 
@@ -984,8 +932,7 @@ osmt_get_service_by_name(IN osmtest_t * const p_osmt,
 	}
 
 Exit:
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_get_service_by_name: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Expected and found %d records\n", rec_num);
 
 	if (context.result.p_result_madw != NULL) {
@@ -1025,11 +972,8 @@ osmt_get_all_services_and_check_names(IN osmtest_t * const p_osmt,
 		p_checked_names[j] = 0;
 	}
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_get_all_services_and_check_names: "
-			"Getting all service records\n");
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Getting all service records\n");
+
 	/*
 	 * Do a blocking query for this record in the subnet.
 	 * The result is returned in the result field of the caller's
@@ -1052,8 +996,7 @@ osmt_get_all_services_and_check_names(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_get_all_services_and_check_names: ERR 4A12: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A12: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -1062,14 +1005,11 @@ osmt_get_all_services_and_check_names(IN osmtest_t * const p_osmt,
 
 	if (status != IB_SUCCESS) {
 		if (status != IB_INVALID_PARAMETER) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_all_services_and_check_names: ERR 4A13: "
-				"ib_query failed (%s)\n",
-				ib_get_err_str(status));
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A13: "
+				"ib_query failed (%s)\n", ib_get_err_str(status));
 		}
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_all_services_and_check_names: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (context.result.
@@ -1079,29 +1019,25 @@ osmt_get_all_services_and_check_names(IN osmtest_t * const p_osmt,
 	}
 
 	num_recs = context.result.result_cnt;
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_get_all_services_and_check_names: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Received %u records\n", num_recs);
 
 	for (i = 0; i < num_recs; i++) {
 		p_rec = osmv_get_query_svc_rec(context.result.p_result_madw, i);
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmt_get_all_services_and_check_names: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 			"Found service record: name: %s id: 0x%016" PRIx64 "\n",
 			p_rec->service_name, cl_ntoh64(p_rec->service_id));
 		osm_dump_service_record(&p_osmt->log, p_rec, OSM_LOG_VERBOSE);
 		for (j = 0; j < num_of_valid_names; j++) {
 			/* If the service names exist in the record, mark it as checked (1) */
-			osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-				"osmt_get_all_services_and_check_names: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 				"-I- Comparing source name : >%s<, with record name : >%s<, idx : %d\n",
 				p_valid_service_names_arr[j],
 				p_rec->service_name, p_checked_names[j]);
 			if (strcmp
 			    ((char *)p_valid_service_names_arr[j],
 			     (char *)p_rec->service_name) == 0) {
-				osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-					"osmt_get_all_services_and_check_names: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 					"-I- The service %s is valid\n",
 					p_valid_service_names_arr[j]);
 				p_checked_names[j] = 1;
@@ -1112,8 +1048,7 @@ osmt_get_all_services_and_check_names(IN osmtest_t * const p_osmt,
 	/* Check that all service names have been identified */
 	for (j = 0; j < num_of_valid_names; j++)
 		if (p_checked_names[j] == 0) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_get_all_services_and_check_names: ERR 4A14: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A14: "
 				"Missing valid service: name: %s\n",
 				p_valid_service_names_arr[j]);
 			status = IB_ERROR;
@@ -1149,16 +1084,14 @@ osmt_delete_service_by_name(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmt_delete_service_by_name: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 		"Trying to Delete service name: %s\n", sr_name);
 
 	memset(&svc_rec, 0, sizeof(svc_rec));
 
 	status = osmt_get_service_by_name(p_osmt, sr_name, rec_num, &svc_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_delete_service_by_name: ERR 4A15: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A15: "
 			"Failed to get service: name: %s\n", sr_name);
 		goto ExitNoDel;
 	}
@@ -1190,8 +1123,7 @@ osmt_delete_service_by_name(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_delete_service_by_name: ERR 4A16: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A16: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -1200,15 +1132,13 @@ osmt_delete_service_by_name(IN osmtest_t * const p_osmt,
 	if (IsServiceExist) {
 		/* If IsServiceExist = 1 then we should succeed here */
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_delete_service_by_name: ERR 4A17: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A17: "
 				"ib_query failed (%s)\n",
 				ib_get_err_str(status));
 
 			if (status == IB_REMOTE_ERROR) {
-				osm_log(&p_osmt->log, OSM_LOG_ERROR,
-					"osmt_delete_service_by_name: ERR 4A18: "
-					"Remote error = %s\n",
+				OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+					"ERR 4A18: Remote error = %s\n",
 					ib_get_mad_status_str
 					(osm_madw_get_mad_ptr
 					 (context.result.p_result_madw)));
@@ -1217,19 +1147,16 @@ osmt_delete_service_by_name(IN osmtest_t * const p_osmt,
 	} else {
 		/* If IsServiceExist = 0 then we should fail here */
 		if (status == IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_delete_service_by_name: ERR 4A19: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A19: "
 				"Succeeded to delete service: %s which "
 				"shouldn't exist", sr_name);
 			status = IB_ERROR;
 		} else {
 			/* The deletion should have failed, since the service_name
 			   shouldn't exist. */
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_run_service_records_flow: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"IS EXPECTED ERROR ^^^^\n");
-			osm_log(&p_osmt->log, OSM_LOG_INFO,
-				"osmt_delete_service_by_name: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 				"Failed to delete service_name: %s\n", sr_name);
 			status = IB_SUCCESS;
 		}
@@ -1386,8 +1313,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[0], 1, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A1A: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A1A: "
 			"Fail to find service: name: %s\n",
 			(char *)service_name[0]);
 		status = IB_ERROR;
@@ -1398,8 +1324,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[1], 1, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A1B: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A1B: "
 			"Fail to find service: name: %s\n",
 			(char *)service_name[1]);
 		status = IB_ERROR;
@@ -1410,8 +1335,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[2], 1, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A1C: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A1C: "
 			"Fail to find service: name: %s\n",
 			(char *)service_name[2]);
 		status = IB_ERROR;
@@ -1423,8 +1347,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[3], 1, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A1D: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A1D: "
 			"Fail to find service: name: %s\n",
 			(char *)service_name[3]);
 		status = IB_ERROR;
@@ -1436,8 +1359,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[3], 0, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A1E: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A1E: "
 			"Found service: name: %s that should have been "
 			"deleted due to service lease expiring\n",
 			(char *)service_name[3]);
@@ -1448,8 +1370,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	/*  Check that for service: id[5] only one record exists */
 	status = osmt_get_service_by_id(p_osmt, 1, cl_ntoh64(id[5]), &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A1F: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A1F: "
 			"Found number of records != 1 for "
 			"service: id: 0x%016" PRIx64 "\n", id[5]);
 		status = IB_ERROR;
@@ -1459,8 +1380,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	/*  Bad Flow of Get with invalid Service ID: id[7] */
 	status = osmt_get_service_by_id(p_osmt, 0, cl_ntoh64(id[7]), &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A20: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A20: "
 			"Found service: id: 0x%016" PRIx64 " "
 			"that is invalid\n", id[7]);
 		status = IB_ERROR;
@@ -1472,8 +1392,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 						 (char *)service_name[0],
 						 &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A21: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A21: "
 			"Fail to find service: id: 0x%016" PRIx64 " "
 			"name: %s\n", id[0], (char *)service_name[0]);
 		status = IB_ERROR;
@@ -1485,8 +1404,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 						 (char *)service_name[6],
 						 &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A22: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A22: "
 			"Fail to find service: id: 0x%016" PRIx64 " "
 			"name: %s\n", id[5], (char *)service_name[6]);
 		status = IB_ERROR;
@@ -1498,8 +1416,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 						 (char *)service_name[3],
 						 &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A23: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A23: "
 			"Found service: id: 0x%016" PRIx64
 			"name: %s which is an invalid service\n",
 			id[0], (char *)service_name[3]);
@@ -1512,8 +1429,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 						 (char *)service_name[5],
 						 &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A24: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A24: "
 			"Found service: id: 0x%016" PRIx64
 			"name: %s which is an invalid service\n",
 			id[3], (char *)service_name[5]);
@@ -1525,8 +1441,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[4], 0, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A25: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A25: "
 			"Found service: name: %s that shouldn't exist\n",
 			(char *)service_name[4]);
 		status = IB_ERROR;
@@ -1538,8 +1453,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[5], 0, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A26: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A26: "
 			"Found service: name: %s which is an "
 			"invalid service\n", (char *)service_name[5]);
 		status = IB_ERROR;
@@ -1551,8 +1465,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[6], 1, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A27: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A27: "
 			"Fail to find service: name: %s\n",
 			(char *)service_name[6]);
 		status = IB_ERROR;
@@ -1568,8 +1481,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 						  (char *)service_name[5],
 						  0, service_key, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A28: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A28: "
 			"Found service: name: %s key:0 which is an "
 			"invalid service (wrong name)\n",
 			(char *)service_name[5]);
@@ -1583,8 +1495,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 						  (char *)service_name[6],
 						  0, service_key, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A29: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A29: "
 			"Found service: name: %s key: 0 which is an "
 			"invalid service (wrong service_key)\n",
 			(char *)service_name[6]);
@@ -1599,8 +1510,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 						  (char *)service_name[6],
 						  1, service_key, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A2A: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A2A: "
 			"Fail to find service: name: %s with "
 			"correct service key\n", (char *)service_name[6]);
 		status = IB_ERROR;
@@ -1616,8 +1526,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	    osmt_get_all_services_and_check_names(p_osmt, service_valid_names,
 						  3, &num_recs);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A2B: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A2B: "
 			"Fail to find all services that should exist\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -1628,8 +1537,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_delete_service_by_name(p_osmt, 1,
 					     (char *)service_name[0], 1);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A2C: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A2C: "
 			"Fail to delete service: name: %s\n",
 			(char *)service_name[0]);
 		status = IB_ERROR;
@@ -1640,8 +1548,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[0], 0, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A2D: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A2D: "
 			"Found service: name: %s that was deleted\n",
 			(char *)service_name[0]);
 		status = IB_ERROR;
@@ -1652,8 +1559,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[1], 0, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A2E: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A2E: "
 			"Found service: name: %s that should have expired\n",
 			(char *)service_name[1]);
 		status = IB_ERROR;
@@ -1664,8 +1570,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_get_service_by_name(p_osmt,
 					  (char *)service_name[2], 1, &srv_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A2F: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A2F: "
 			"Fail to find service: name: %s\n",
 			(char *)service_name[2]);
 		status = IB_ERROR;
@@ -1676,8 +1581,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_delete_service_by_name(p_osmt, 0,
 					     (char *)service_name[5], 0);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A30: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A30: "
 			"Succeed to delete non-existent service: name: %s\n",
 			(char *)service_name[5]);
 		status = IB_ERROR;
@@ -1688,8 +1592,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_delete_service_by_name(p_osmt, 1,
 					     (char *)service_name[2], 1);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A31: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A31: "
 			"Fail to delete service: name: %s\n",
 			(char *)service_name[2]);
 		status = IB_ERROR;
@@ -1700,8 +1603,7 @@ ib_api_status_t osmt_run_service_records_flow(IN osmtest_t * const p_osmt)
 	status = osmt_delete_service_by_name(p_osmt, 1,
 					     (char *)service_name[6], 1);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_run_service_records_flow: ERR 4A32: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 4A32: "
 			"Failed to delete service name: %s\n",
 			(char *)service_name[6]);
 		goto Exit;
diff --git a/opensm/osmtest/osmt_slvl_vl_arb.c b/opensm/osmtest/osmt_slvl_vl_arb.c
index df234d2..e63bef2 100644
--- a/opensm/osmtest/osmt_slvl_vl_arb.c
+++ b/opensm/osmtest/osmt_slvl_vl_arb.c
@@ -106,12 +106,9 @@ osmt_query_vl_arb(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-		osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-			"osmt_query_vl_arb: "
-			"Getting VL_Arbitration Table for port with LID 0x%X Num:0x%X\n",
-			cl_ntoh16(lid), port_num);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+		"Getting VL_Arbitration Table for port with LID 0x%X Num:0x%X\n",
+		cl_ntoh16(lid), port_num);
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -143,8 +140,7 @@ osmt_query_vl_arb(IN osmtest_t * const p_osmt,
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_query_vl_arb: ERR 0405: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0405: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -152,13 +148,11 @@ osmt_query_vl_arb(IN osmtest_t * const p_osmt,
 	status = context.result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_query_vl_arb: ERR 0466: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0466: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_query_vl_arb: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (context.result.
@@ -197,8 +191,7 @@ osmt_query_all_ports_vl_arb(IN osmtest_t * const p_osmt, IN FILE * fh)
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_query_all_ports_vl_arb: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Obtaining ALL Ports VL Arbitration Tables\n");
 
 	/*
@@ -223,8 +216,8 @@ osmt_query_all_ports_vl_arb(IN osmtest_t * const p_osmt, IN FILE * fh)
 						      p_src_port->rec.lid, 0,
 						      block, fh);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmt_query_all_ports_vl_arb: ERR 0467: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0467: "
 						"Failed to get Lid:0x%X Port:0x%X (%s)\n",
 						cl_ntoh16(p_src_port->rec.lid),
 						0, ib_get_err_str(status));
@@ -240,8 +233,8 @@ osmt_query_all_ports_vl_arb(IN osmtest_t * const p_osmt, IN FILE * fh)
 						      p_src_port->rec.port_num,
 						      block, fh);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmt_query_all_ports_vl_arb: ERR 0468: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0468: "
 						"Failed to get Lid:0x%X Port:0x%X (%s)\n",
 						cl_ntoh16(p_src_port->rec.lid),
 						p_src_port->rec.port_num,
@@ -314,12 +307,9 @@ osmt_query_slvl_map(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-		osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-			"osmt_query_slvl_map: "
-			"Getting SLtoVL Map Table for out-port with LID 0x%X Num:0x%X from In-Port:0x%X\n",
-			cl_ntoh16(lid), out_port_num, in_port_num);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+		"Getting SLtoVL Map Table for out-port with LID 0x%X Num:0x%X from In-Port:0x%X\n",
+		cl_ntoh16(lid), out_port_num, in_port_num);
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -351,8 +341,7 @@ osmt_query_slvl_map(IN osmtest_t * const p_osmt,
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_query_slvl_map: ERR 0469: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0469: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -360,13 +349,11 @@ osmt_query_slvl_map(IN osmtest_t * const p_osmt,
 	status = context.result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmt_query_slvl_map: ERR 0470: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0470: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmt_query_slvl_map: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (context.result.
@@ -412,8 +399,7 @@ osmt_query_all_ports_slvl_map(IN osmtest_t * const p_osmt, IN FILE * fh)
 	 * get the relevant SLtoVLs
 	 */
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmt_query_all_ports_slvl_map: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Obtaining ALL Ports (to other ports) SLtoVL Maps\n");
 
 	p_tbl = &p_osmt->exp_subn.port_key_tbl;
@@ -432,8 +418,7 @@ osmt_query_all_ports_slvl_map(IN osmtest_t * const p_osmt, IN FILE * fh)
 			    osmt_query_slvl_map(p_osmt, p_src_port->rec.lid, 0,
 						0, fh);
 			if (status != IB_SUCCESS) {
-				osm_log(&p_osmt->log, OSM_LOG_ERROR,
-					"osmt_query_all_ports_slvl_map: ERR 0471: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0471: "
 					"Failed to get Lid:0x%X In-Port:0x%X Out-Port:0x%X(%s)\n",
 					cl_ntoh16(p_src_port->rec.lid), 0, 0,
 					ib_get_err_str(status));
@@ -446,8 +431,7 @@ osmt_query_all_ports_slvl_map(IN osmtest_t * const p_osmt, IN FILE * fh)
 			    (node_t *) cl_qmap_get(p_node_tbl,
 						   p_src_port->rec.lid);
 			if (p_node == (node_t *) cl_qmap_end(p_node_tbl)) {
-				osm_log(&p_osmt->log, OSM_LOG_ERROR,
-					"osmt_query_all_ports_slvl_map: ERR 0472: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0472: "
 					"Failed to get Node by Lid:0x%X\n",
 					p_src_port->rec.lid);
 				goto Exit;
@@ -462,8 +446,8 @@ osmt_query_all_ports_slvl_map(IN osmtest_t * const p_osmt, IN FILE * fh)
 							p_src_port->rec.
 							port_num, in_port, fh);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmt_query_all_ports_slvl_map: ERR 0473: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0473: "
 						"Failed to get Lid:0x%X In-Port:0x%X Out-Port:0x%X (%s)\n",
 						cl_ntoh16(p_src_port->rec.lid),
 						p_src_port->rec.port_num,
diff --git a/opensm/osmtest/osmtest.c b/opensm/osmtest/osmtest.c
index 4e73ed0..b173e49 100644
--- a/opensm/osmtest/osmtest.c
+++ b/opensm/osmtest/osmtest.c
@@ -507,7 +507,7 @@ osmtest_init(IN osmtest_t * const p_osmt,
 	/* but we do not want any extra stuff here */
 	osm_log_set_level(&p_osmt->log, log_flags);
 
-	osm_log(&p_osmt->log, OSM_LOG_FUNCS, "osmtest_init: [\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_FUNCS, "[\n");
 
 	p_osmt->opt = *p_opt;
 
@@ -526,8 +526,7 @@ osmtest_init(IN osmtest_t * const p_osmt,
 
 	if (p_osmt->p_vendor == NULL) {
 		status = IB_INSUFFICIENT_RESOURCES;
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_init: ERR 0001: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0001: "
 			"Unable to allocate vendor object");
 		status = IB_ERROR;
 		goto Exit;
@@ -539,7 +538,7 @@ osmtest_init(IN osmtest_t * const p_osmt,
 		goto Exit;
 
 Exit:
-	osm_log(&p_osmt->log, OSM_LOG_FUNCS, "osmtest_init: ]\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_FUNCS, "]\n");
 	return (status);
 }
 
@@ -556,8 +555,7 @@ void osmtest_query_res_cb(IN osmv_query_res_t * p_rec)
 	p_ctxt->result = *p_rec;
 
 	if (p_rec->status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_query_res_cb: ERR 0003: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0003: "
 			"Error on query (%s)\n", ib_get_err_str(p_rec->status));
 	}
 
@@ -578,12 +576,8 @@ osmtest_get_all_recs(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-		osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-			"osmtest_get_all_recs: "
-			"Getting all %s records\n",
-			ib_get_sa_attr_str(attr_id));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "Getting all %s records\n",
+		ib_get_sa_attr_str(attr_id));
 
 	/*
 	 * Do a blocking query for all <attr_id> records in the subnet.
@@ -610,8 +604,7 @@ osmtest_get_all_recs(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_all_recs: ERR 0004: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0004: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -619,13 +612,11 @@ osmtest_get_all_recs(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_all_recs: ERR 0064: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0064: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_all_recs: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (p_context->result.
@@ -652,11 +643,7 @@ ib_api_status_t osmtest_validate_sa_class_port_info(IN osmtest_t * const p_osmt)
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_sa_class_port_info: "
-			"Getting ClassPortInfo\n");
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Getting ClassPortInfo\n");
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -679,8 +666,7 @@ ib_api_status_t osmtest_validate_sa_class_port_info(IN osmtest_t * const p_osmt)
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_sa_class_port_info: ERR 0065: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0065: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -688,12 +674,10 @@ ib_api_status_t osmtest_validate_sa_class_port_info(IN osmtest_t * const p_osmt)
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_sa_class_port_info: ERR 0070: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0070: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_sa_class_port_info: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (p_context->result.
@@ -708,9 +692,8 @@ ib_api_status_t osmtest_validate_sa_class_port_info(IN osmtest_t * const p_osmt)
 	p_cpi =
 	    (ib_class_port_info_t *) ib_sa_mad_get_payload_ptr(p_resp_sa_madp);
 
-	osm_log(&p_osmt->log, OSM_LOG_INFO,
-		"osmtest_validate_sa_class_port_info:\n"
-		"-----------------------------\n"
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+		"\n-----------------------------\n"
 		"SA Class Port Info:\n"
 		" base_ver:%u\n"
 		" class_ver:%u\n"
@@ -748,12 +731,9 @@ osmtest_get_node_rec(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_get_node_rec: "
-			"Getting node record for 0x%016" PRIx64 "\n",
-			cl_ntoh64(node_guid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting node record for 0x%016" PRIx64 "\n",
+		cl_ntoh64(node_guid));
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -785,8 +765,7 @@ osmtest_get_node_rec(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_node_rec: ERR 0071: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0071: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -794,12 +773,10 @@ osmtest_get_node_rec(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_node_rec: ERR 0072: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0072: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_node_rec: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (p_context->result.
@@ -829,11 +806,8 @@ osmtest_get_node_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_get_node_rec_by_lid: "
-			"Getting node record for LID 0x%02X\n", cl_ntoh16(lid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting node record for LID 0x%02X\n", cl_ntoh16(lid));
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -865,8 +839,7 @@ osmtest_get_node_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_node_rec_by_lid: ERR 0073: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0073: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -874,15 +847,13 @@ osmtest_get_node_rec_by_lid(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_node_rec_by_lid: ERR 0074: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0074: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
 			p_mad =
 			    osm_madw_get_mad_ptr(p_context->result.
 						 p_result_madw);
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_node_rec_by_lid: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(p_mad));
 
@@ -929,15 +900,13 @@ osmtest_get_path_rec_by_guid_pair(IN osmtest_t * const p_osmt,
 	req.p_query_input = &guid_pair;
 	req.sm_key = 0;
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_get_path_rec_by_guid_pair: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Query for path from 0x%" PRIx64 " to 0x%" PRIx64 "\n",
 		sguid, dguid);
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_path_rec_by_guid_pair: ERR 0063: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0063: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -945,13 +914,11 @@ osmtest_get_path_rec_by_guid_pair(IN osmtest_t * const p_osmt,
 	status = (*p_context).result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_path_rec_by_guid_pair: ERR 0066: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0066: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_path_rec_by_guid_pair: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      ((*p_context).result.
@@ -998,8 +965,7 @@ osmtest_get_path_rec_by_gid_pair(IN osmtest_t * const p_osmt,
 	req.p_query_input = &gid_pair;
 	req.sm_key = 0;
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_get_path_rec_by_gid_pair: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Query for path from 0x%016" PRIx64 " 0x%016" PRIx64
 		" to 0x%016" PRIx64 " 0x%016" PRIx64 "\n", sgid.unicast.prefix,
 		sgid.unicast.interface_id, dgid.unicast.prefix,
@@ -1007,8 +973,7 @@ osmtest_get_path_rec_by_gid_pair(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_path_rec_by_gid_pair: ERR 006A: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 006A: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -1016,13 +981,11 @@ osmtest_get_path_rec_by_gid_pair(IN osmtest_t * const p_osmt,
 	status = (*p_context).result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_path_rec_by_gid_pair: ERR 006B: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 006B: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_path_rec_by_gid_pair: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      ((*p_context).result.
@@ -1073,8 +1036,7 @@ osmtest_get_multipath_rec(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_multipath_rec: ERR 0068: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0068: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -1082,13 +1044,11 @@ osmtest_get_multipath_rec(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_multipath_rec: ERR 0069: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0069: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_multipath_rec: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (p_context->result.
@@ -1117,12 +1077,9 @@ osmtest_get_port_rec(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-		osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-			"osmtest_get_port_rec: "
-			"Getting PortInfoRecord for port with LID 0x%X\n",
-			cl_ntoh16(lid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+		"Getting PortInfoRecord for port with LID 0x%X\n",
+		cl_ntoh16(lid));
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -1154,8 +1111,7 @@ osmtest_get_port_rec(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_port_rec: ERR 0075: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0075: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -1163,13 +1119,11 @@ osmtest_get_port_rec(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_port_rec: ERR 0076: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0076: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_port_rec: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (p_context->result.
@@ -1199,12 +1153,9 @@ osmtest_get_port_rec_by_num(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-		osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-			"osmtest_get_port_rec_by_num: "
-			"Getting PortInfoRecord for port with LID 0x%X Num:0x%X\n",
-			cl_ntoh16(lid), port_num);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+		"Getting PortInfoRecord for port with LID 0x%X Num:0x%X\n",
+		cl_ntoh16(lid), port_num);
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -1234,8 +1185,7 @@ osmtest_get_port_rec_by_num(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_port_rec_by_num: ERR 0077: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0077: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -1243,16 +1193,14 @@ osmtest_get_port_rec_by_num(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_port_rec_by_num: ERR 0078: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0078: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
 			p_mad =
 			    osm_madw_get_mad_ptr(p_context->result.
 						 p_result_madw);
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_port_rec_by_num: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(p_mad));
 			status =
@@ -1289,8 +1237,7 @@ osmtest_stress_port_recs_large(IN osmtest_t * const p_osmt,
 				      sizeof(*p_rec), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_stress_port_recs_large: ERR 0006: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0006: "
 			"osmtest_get_all_recs failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -1304,8 +1251,7 @@ osmtest_stress_port_recs_large(IN osmtest_t * const p_osmt,
 	++*p_num_queries;
 
 	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_stress_port_recs_large: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 			"Received %u records\n", num_recs);
 
 		for (i = 0; i < num_recs; i++) {
@@ -1355,8 +1301,7 @@ osmtest_stress_node_recs_large(IN osmtest_t * const p_osmt,
 				      sizeof(*p_rec), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_stress_node_recs_large: ERR 0007: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0007: "
 			"osmtest_get_all_recs failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -1370,8 +1315,7 @@ osmtest_stress_node_recs_large(IN osmtest_t * const p_osmt,
 	++*p_num_queries;
 
 	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_stress_node_recs_large: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 			"Received %u records\n", num_recs);
 
 		for (i = 0; i < num_recs; i++) {
@@ -1420,8 +1364,7 @@ osmtest_stress_path_recs_large(IN osmtest_t * const p_osmt,
 	status = osmtest_get_all_recs(p_osmt, IB_MAD_ATTR_PATH_RECORD,
 				      sizeof(*p_rec), &context);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_stress_path_recs_large: ERR 0008: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0008: "
 			"osmtest_get_all_recs failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -1435,8 +1378,7 @@ osmtest_stress_path_recs_large(IN osmtest_t * const p_osmt,
 	++*p_num_queries;
 
 	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_stress_path_recs_large: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 			"Received %u records\n", num_recs);
 
 		for (i = 0; i < num_recs; i++) {
@@ -1498,8 +1440,7 @@ osmtest_stress_path_recs_by_guid(IN osmtest_t * const p_osmt,
 			/*
 			 * Do a blocking query for CA to CA Path Record
 			 */
-			osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-				"osmtest_stress_path_recs_by_guid:"
+			OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 				"Source : guid = 0x%" PRIx64 " type = %d"
 				"Target : guid = 0x%" PRIx64 " type = %d\n",
 				cl_ntoh64(p_src_node->rec.node_info.port_guid),
@@ -1525,8 +1466,8 @@ osmtest_stress_path_recs_by_guid(IN osmtest_t * const p_osmt,
 
 				/* In a case of TIMEOUT you still can try sending but cant count, maybe its a temporary issue */
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_stress_path_recs_by_guid: ERR 0009: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0009: "
 						"osmtest_get_path_rec_by_guid_pair failed (%s)\n",
 						ib_get_err_str(status));
 					if (status != IB_TIMEOUT)
@@ -1539,13 +1480,8 @@ osmtest_stress_path_recs_by_guid(IN osmtest_t * const p_osmt,
 					 */
 					*p_num_recs += num_recs;
 					++*p_num_queries;
-					if (osm_log_is_active
-					    (&p_osmt->log, OSM_LOG_VERBOSE))
-						osm_log(&p_osmt->log,
-							OSM_LOG_VERBOSE,
-							"osmtest_stress_path_recs_by_guid: "
-							"Received %u records\n",
-							num_recs);
+					OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+						"Received %u records\n", num_recs);
 					/* Dont waste time if not VERBOSE and above */
 					if (p_osmt->log.level & OSM_LOG_VERBOSE) {
 						for (i = 0; i < num_recs; i++) {
@@ -1605,8 +1541,7 @@ osmtest_stress_port_recs_small(IN osmtest_t * const p_osmt,
 				      &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_stress_port_recs_small: ERR 0010: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0010: "
 			"osmtest_get_port_rec failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -1620,8 +1555,7 @@ osmtest_stress_port_recs_small(IN osmtest_t * const p_osmt,
 	++*p_num_queries;
 
 	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_stress_port_recs_small: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 			"Received %u records\n", num_recs);
 
 		for (i = 0; i < num_recs; i++) {
@@ -1669,8 +1603,7 @@ osmtest_get_local_port_lmc(IN osmtest_t * const p_osmt,
 	status = osmtest_get_port_rec(p_osmt, cl_ntoh16(lid), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_local_port_lmc: ERR 001A: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 001A: "
 			"osmtest_get_port_rec failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -1678,11 +1611,7 @@ osmtest_get_local_port_lmc(IN osmtest_t * const p_osmt,
 
 	num_recs = context.result.result_cnt;
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_get_local_port_lmc: "
-			"Received %u records\n", num_recs);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Received %u records\n", num_recs);
 
 	for (i = 0; i < num_recs; i++) {
 		p_rec =
@@ -1691,9 +1620,7 @@ osmtest_get_local_port_lmc(IN osmtest_t * const p_osmt,
 		osm_dump_portinfo_record(&p_osmt->log, p_rec, OSM_LOG_VERBOSE);
 		if (p_lmc) {
 			*p_lmc = ib_port_info_get_lmc(&p_rec->port_info);
-			osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-				"osmtest_get_local_port_lmc: "
-				"LMC %d\n", *p_lmc);
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "LMC %d\n", *p_lmc);
 		}
 	}
 
@@ -1727,12 +1654,9 @@ ib_api_status_t osmtest_wrong_sm_key_ignored(IN osmtest_t * const p_osmt)
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_INFO)) {
-		osm_log(&p_osmt->log, OSM_LOG_INFO,
-			"osmtest_wrong_sm_key_ignored: "
-			"Trying PortInfoRecord for port with LID 0x%X Num:0x%X\n",
-			p_osmt->local_port.sm_lid, port_num);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+		"Trying PortInfoRecord for port with LID 0x%X Num:0x%X\n",
+		p_osmt->local_port.sm_lid, port_num);
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -1761,16 +1685,13 @@ ib_api_status_t osmtest_wrong_sm_key_ignored(IN osmtest_t * const p_osmt)
 	req.sm_key = 9999;
 	context.result.p_result_madw = NULL;
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_wrong_sm_key_ignored: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmv_query_sa(p_osmt->h_bind, &req);
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_wrong_sm_key_ignored: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	/* since we use a wrong sm_key we should get a timeout */
 	if (status != IB_TIMEOUT) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_wrong_sm_key_ignored: ERR 0011: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0011: "
 			"Did not get a timeout but got (%s)\n",
 			ib_get_err_str(status));
 		if (status == IB_SUCCESS) {
@@ -1878,8 +1799,8 @@ osmtest_write_port_info(IN osmtest_t * const p_osmt,
 			 p_rec->port_info.error_threshold);
 
 	if (result < 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_port_info: ERR 0161: " "Write failed\n");
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0161: "
+			"Write failed\n");
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -1928,8 +1849,8 @@ osmtest_write_path_info(IN osmtest_t * const p_osmt,
 			 p_rec->preference);
 
 	if (result < 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_path_info: ERR 0162: " "Write failed\n");
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0162: "
+			"Write failed\n");
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -1988,8 +1909,8 @@ osmtest_write_node_info(IN osmtest_t * const p_osmt,
 				   (&p_rec->node_info)), desc);
 
 	if (result < 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_node_info: ERR 0163: " "Write failed\n");
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0163: "
+			"Write failed\n");
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -2022,8 +1943,8 @@ osmtest_write_link(IN osmtest_t * const p_osmt,
 			 p_rec->to_port_num, cl_ntoh16(p_rec->to_lid));
 
 	if (result < 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_link: ERR 0164: " "Write failed\n");
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0164: "
+			"Write failed\n");
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -2056,8 +1977,7 @@ osmtest_write_all_link_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 				      sizeof(*p_rec), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_all_link_recs: ERR 0165: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0165: "
 			"osmtest_get_all_recs failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -2068,16 +1988,12 @@ osmtest_write_all_link_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 	 */
 	num_recs = context.result.result_cnt;
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_write_all_link_recs: "
-			"Received %zu records\n", num_recs);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Received %zu records\n", num_recs);
 
 	result = fprintf(fh, "#\n" "# Link Records\n" "#\n");
 	if (result < 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_all_link_recs: ERR 0166: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0166: "
 			"Write failed\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -2138,13 +2054,11 @@ osmtest_get_path_rec_by_lid_pair(IN osmtest_t * const p_osmt,
 	req.p_query_input = &lid_pair;
 	req.sm_key = 0;
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_get_path_rec_by_lid_pair: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Query for path from 0x%X to 0x%X\n", slid, dlid);
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_path_rec_by_lid_pair: ERR 0053: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0053: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -2152,13 +2066,11 @@ osmtest_get_path_rec_by_lid_pair(IN osmtest_t * const p_osmt,
 	status = (*p_context).result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_path_rec_by_lid_pair: ERR 0067: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0067: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_path_rec_by_lid_pair: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      ((*p_context).result.
@@ -2197,8 +2109,7 @@ osmtest_write_all_node_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 				      sizeof(*p_rec), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_all_node_recs: ERR 0022: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0022: "
 			"osmtest_get_all_recs failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -2209,16 +2120,11 @@ osmtest_write_all_node_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 	 */
 	num_recs = context.result.result_cnt;
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_write_all_node_recs: "
-			"Received %zu records\n", num_recs);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Received %zu records\n", num_recs);
 
 	result = fprintf(fh, "#\n" "# Node Records\n" "#\n");
 	if (result < 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_all_node_recs: ERR 0023: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0023: "
 			"Write failed\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -2268,8 +2174,7 @@ osmtest_write_all_port_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 				      sizeof(*p_rec), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_all_port_recs: ERR 0167: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0167: "
 			"osmtest_get_all_recs failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -2280,16 +2185,11 @@ osmtest_write_all_port_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 	 */
 	num_recs = context.result.result_cnt;
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_write_all_port_recs: "
-			"Received %zu records\n", num_recs);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Received %zu records\n", num_recs);
 
 	result = fprintf(fh, "#\n" "# PortInfo Records\n" "#\n");
 	if (result < 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_all_port_recs: ERR 0024: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0024: "
 			"Write failed\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -2340,8 +2240,7 @@ osmtest_write_all_path_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 				      sizeof(*p_rec), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_all_path_recs: ERR 0025: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0025: "
 			"osmtest_get_all_recs failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -2352,16 +2251,11 @@ osmtest_write_all_path_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 	 */
 	num_recs = context.result.result_cnt;
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_write_all_path_recs: "
-			"Received %zu records\n", num_recs);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Received %zu records\n", num_recs);
 
 	result = fprintf(fh, "#\n" "# Path Records\n" "#\n");
 	if (result < 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_all_path_recs: ERR 0026: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0026: "
 			"Write failed\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -2406,8 +2300,7 @@ osmtest_write_all_node_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 
 	result = fprintf(fh, "#\n" "# Node Records\n" "#\n");
 	if (result < 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_all_node_recs: ERR 0027: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0027: "
 			"Write failed\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -2426,14 +2319,12 @@ osmtest_write_all_node_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 						&context);
 		if (status != IB_SUCCESS) {
 			if (status != IB_SA_MAD_STATUS_NO_RECORDS) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_write_all_node_recs: ERR 0028: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "ERR 0028: "
 					"failed to get node info for LID:0x%02X (%s)\n",
 					cl_ntoh16(lid), ib_get_err_str(status));
 				goto Exit;
 			} else {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_write_all_node_recs: WRN 0121: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "WRN 0121: "
 					"failed to get node info for LID:0x%02X (%s)\n",
 					cl_ntoh16(lid), ib_get_err_str(status));
 				status = IB_SUCCESS;
@@ -2508,8 +2399,7 @@ osmtest_write_all_port_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 	/* print header */
 	result = fprintf(fh, "#\n" "# PortInfo Records\n" "#\n");
 	if (result < 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_write_all_port_recs: ERR 0029: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0029: "
 			"Write failed\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -2539,15 +2429,15 @@ osmtest_write_all_port_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 							     &context);
 			if (status != IB_SUCCESS) {
 				if (status != IB_SA_MAD_STATUS_NO_RECORDS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_write_all_port_recs: WRN 0122: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"WRN 0122: "
 						"Error encountered getting port info for LID:0x%04X Num:0x%02X (%s)\n",
 						p_node_rec->lid, port_num,
 						ib_get_err_str(status));
 					goto Exit;
 				} else {
-					osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-						"osmtest_write_all_port_recs: WRN 0123: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+						"WRN 0123: "
 						"failed to get port info for LID:0x%04X Num:0x%02X (%s)\n",
 						p_node_rec->lid, port_num,
 						ib_get_err_str(status));
@@ -2647,8 +2537,7 @@ osmtest_write_all_path_recs(IN osmtest_t * const p_osmt, IN FILE * fh)
 								  &context);
 
 			if (status != IB_SUCCESS) {
-				osm_log(&p_osmt->log, OSM_LOG_ERROR,
-					"osmtest_write_all_path_recs: ERR 012D: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 012D: "
 					"failed to get path info from LID:0x%X To LID:0x%X (%s)\n",
 					p_src_node->rec.lid,
 					p_dst_node->rec.lid,
@@ -2717,8 +2606,7 @@ osmtest_create_inventory_file(IN osmtest_t * const p_osmt)
 
 	fh = fopen(p_osmt->opt.file_name, "w");
 	if (fh == NULL) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_create_inventory_file: ERR 0079: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0079: "
 			"Unable to open inventory file (%s)\n",
 			p_osmt->opt.file_name);
 		status = IB_ERROR;
@@ -3042,8 +2930,7 @@ static ib_api_status_t osmtest_check_missing_nodes(IN osmtest_t * const p_osmt)
 			/*
 			 * This node was not reported by the SA
 			 */
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_check_missing_nodes: ERR 0080: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0080: "
 				"Missing node 0x%016" PRIx64 "\n",
 				cl_ntoh64(p_node->rec.node_info.node_guid));
 			status = IB_ERROR;
@@ -3075,8 +2962,7 @@ static ib_api_status_t osmtest_check_missing_ports(IN osmtest_t * const p_osmt)
 			/*
 			 * This port was not reported by the SA
 			 */
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_check_missing_ports: ERR 0081: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0081: "
 				"Missing port LID:0x%X Num:0x%X\n",
 				cl_ntoh16(p_port->rec.lid),
 				p_port->rec.port_num);
@@ -3109,8 +2995,7 @@ static ib_api_status_t osmtest_check_missing_paths(IN osmtest_t * const p_osmt)
 			/*
 			 * This path was not reported by the SA
 			 */
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_check_missing_paths: ERR 0051: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0051: "
 				"SA did not return path SLID 0x%X to DLID 0x%X\n",
 				cl_ntoh16(p_path->rec.slid),
 				cl_ntoh16(p_path->rec.dlid));
@@ -3140,8 +3025,7 @@ osmtest_path_rec_kay_is_valid(IN osmtest_t * const p_osmt,
 			      IN const path_t * const p_path)
 {
 	if ((p_path->comp.dlid == 0) || (p_path->comp.slid == 0)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_path_rec_kay_is_valid: ERR 0168: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0168: "
 			"SLID and DLID must be specified for defined paths\n");
 		return (FALSE);
 	}
@@ -3161,12 +3045,9 @@ osmtest_validate_path_data(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_path_data: "
-			"Checking path SLID 0x%X to DLID 0x%X\n",
-			cl_ntoh16(p_rec->slid), cl_ntoh16(p_rec->dlid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+		"Checking path SLID 0x%X to DLID 0x%X\n",
+		cl_ntoh16(p_rec->slid), cl_ntoh16(p_rec->dlid));
 
 	status =
 	    osmtest_get_local_port_lmc(p_osmt, p_osmt->local_port.lid, &lmc);
@@ -3181,8 +3062,7 @@ osmtest_validate_path_data(IN osmtest_t * const p_osmt,
 		 * Has this record already been returned?
 		 */
 		if (p_path->count != 0) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_path_data: ERR 0056: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0056: "
 				"Already received path SLID 0x%X to DLID 0x%X\n",
 				cl_ntoh16(p_rec->slid), cl_ntoh16(p_rec->dlid));
 			status = IB_ERROR;
@@ -3191,8 +3071,7 @@ osmtest_validate_path_data(IN osmtest_t * const p_osmt,
 	} else {
 		/* Also, this doesn't detect fewer than the correct number of paths being returned */
 		if (p_path->count >= (uint32_t) (1 << (2 * lmc))) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_path_data: ERR 0052: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0052: "
 				"Already received path SLID 0x%X to DLID 0x%X count %d LMC %d\n",
 				cl_ntoh16(p_rec->slid), cl_ntoh16(p_rec->dlid),
 				p_path->count, lmc);
@@ -3210,8 +3089,7 @@ osmtest_validate_path_data(IN osmtest_t * const p_osmt,
 	     p_path->rec.dgid.unicast.interface_id) !=
 	    (p_path->comp.dgid.unicast.interface_id &
 	     p_rec->dgid.unicast.interface_id)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_path_data: ERR 0169: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0169: "
 			"DGID mismatch on path SLID 0x%X to DLID 0x%X\n"
 			"\t\t\t\tExpected 0x%016" PRIx64 " 0x%016" PRIx64 "\n"
 			"\t\t\t\tReceived 0x%016" PRIx64 " 0x%016" PRIx64 "\n",
@@ -3232,8 +3110,7 @@ osmtest_validate_path_data(IN osmtest_t * const p_osmt,
 	     p_path->rec.sgid.unicast.interface_id) !=
 	    (p_path->comp.sgid.unicast.interface_id &
 	     p_rec->sgid.unicast.interface_id)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_path_data: ERR 0057: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0057: "
 			"SGID mismatch on path SLID 0x%X to DLID 0x%X\n"
 			"\t\t\t\tExpected 0x%016" PRIx64 " 0x%016" PRIx64 ",\n"
 			"\t\t\t\tReceived 0x%016" PRIx64 " 0x%016" PRIx64 ".\n",
@@ -3252,8 +3129,7 @@ osmtest_validate_path_data(IN osmtest_t * const p_osmt,
 	 */
 	if ((p_path->comp.pkey & p_path->rec.pkey) !=
 	    (p_path->comp.pkey & p_rec->pkey)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_path_data: ERR 0012: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0012: "
 			"PKEY mismatch on path SLID 0x%X to DLID 0x%X\n"
 			"\t\t\t\tExpected 0x%X, received 0x%X\n",
 			cl_ntoh16(p_path->rec.slid),
@@ -3279,20 +3155,15 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: "
-			"Checking node 0x%016" PRIx64 ", LID 0x%X\n",
-			cl_ntoh64(p_rec->node_info.node_guid),
-			cl_ntoh16(p_rec->lid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+		"Checking node 0x%016" PRIx64 ", LID 0x%X\n",
+		cl_ntoh64(p_rec->node_info.node_guid), cl_ntoh16(p_rec->lid));
 
 	/*
 	 * Has this record already been returned?
 	 */
 	if (p_node->count != 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0013: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0013: "
 			"Already received node 0x%016" PRIx64 "\n",
 			cl_ntoh64(p_node->rec.node_info.node_guid));
 		status = IB_ERROR;
@@ -3306,8 +3177,7 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 	 */
 	if ((p_node->comp.lid & p_node->rec.lid) !=
 	    (p_node->comp.lid & p_rec->lid)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0014: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0014: "
 			"Field mismatch node 0x%016" PRIx64 ", LID 0x%X\n"
 			"\t\t\t\tExpected LID 0x%X, received 0x%X\n",
 			cl_ntoh64(p_rec->node_info.node_guid),
@@ -3320,8 +3190,7 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 	     p_node->rec.node_info.base_version) !=
 	    (p_node->comp.node_info.base_version &
 	     p_rec->node_info.base_version)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0015: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0015: "
 			"Field mismatch node 0x%016" PRIx64 ", LID 0x%X\n"
 			"\t\t\t\tExpected base_version 0x%X, received 0x%X\n",
 			cl_ntoh64(p_rec->node_info.node_guid),
@@ -3336,8 +3205,7 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 	     p_node->rec.node_info.class_version) !=
 	    (p_node->comp.node_info.class_version &
 	     p_rec->node_info.class_version)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0016: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0016: "
 			"Field mismatch node 0x%016" PRIx64 ", LID 0x%X\n"
 			"\t\t\t\tExpected class_version 0x%X, received 0x%X\n",
 			cl_ntoh64(p_rec->node_info.node_guid),
@@ -3351,8 +3219,7 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 	if ((p_node->comp.node_info.node_type &
 	     p_node->rec.node_info.node_type) !=
 	    (p_node->comp.node_info.node_type & p_rec->node_info.node_type)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0017: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0017: "
 			"Field mismatch node 0x%016" PRIx64 ", LID 0x%X\n"
 			"\t\t\t\tExpected node_type 0x%X, received 0x%X\n",
 			cl_ntoh64(p_rec->node_info.node_guid),
@@ -3366,8 +3233,7 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 	if ((p_node->comp.node_info.sys_guid &
 	     p_node->rec.node_info.sys_guid) !=
 	    (p_node->comp.node_info.sys_guid & p_rec->node_info.sys_guid)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0018: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0018: "
 			"Field mismatch node 0x%016" PRIx64 ", LID 0x%X\n"
 			"\t\t\t\tExpected sys_guid 0x%016" PRIx64
 			", received 0x%016" PRIx64 "\n",
@@ -3382,8 +3248,7 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 	if ((p_node->comp.node_info.node_guid &
 	     p_node->rec.node_info.node_guid) !=
 	    (p_node->comp.node_info.node_guid & p_rec->node_info.node_guid)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0019: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0019: "
 			"Field mismatch node 0x%016" PRIx64 ", LID 0x%X\n"
 			"\t\t\t\tExpected node_guid 0x%016" PRIx64
 			", received 0x%016" PRIx64 "\n",
@@ -3398,8 +3263,7 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 	if ((p_node->comp.node_info.port_guid &
 	     p_node->rec.node_info.port_guid) !=
 	    (p_node->comp.node_info.port_guid & p_rec->node_info.port_guid)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0031: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0031: "
 			"Field mismatch node 0x%016" PRIx64 ", LID 0x%X\n"
 			"\t\t\t\tExpected port_guid 0x%016" PRIx64
 			", received 0x%016" PRIx64 "\n",
@@ -3415,11 +3279,9 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 	     p_node->rec.node_info.partition_cap) !=
 	    (p_node->comp.node_info.partition_cap &
 	     p_rec->node_info.partition_cap)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0032: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0032: "
 			"Field mismatch node 0x%016" PRIx64 ", LID 0x%X\n"
-			"\t\t\t\tExpected partition_cap 0x%X"
-			", received 0x%X\n",
+			"\t\t\t\tExpected partition_cap 0x%X, received 0x%X\n",
 			cl_ntoh64(p_rec->node_info.node_guid),
 			cl_ntoh16(p_rec->lid),
 			cl_ntoh16(p_node->rec.node_info.partition_cap),
@@ -3431,11 +3293,9 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 	if ((p_node->comp.node_info.device_id &
 	     p_node->rec.node_info.device_id) !=
 	    (p_node->comp.node_info.device_id & p_rec->node_info.device_id)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0033: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0033: "
 			"Field mismatch node 0x%016" PRIx64 ", LID 0x%X\n"
-			"\t\t\t\tExpected device_id 0x%X"
-			", received 0x%X\n",
+			"\t\t\t\tExpected device_id 0x%X, received 0x%X\n",
 			cl_ntoh64(p_rec->node_info.node_guid),
 			cl_ntoh16(p_rec->lid),
 			cl_ntoh16(p_node->rec.node_info.device_id),
@@ -3447,11 +3307,9 @@ osmtest_validate_node_data(IN osmtest_t * const p_osmt,
 	if ((p_node->comp.node_info.revision &
 	     p_node->rec.node_info.revision) !=
 	    (p_node->comp.node_info.revision & p_rec->node_info.revision)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_data: ERR 0034: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0034: "
 			"Field mismatch node 0x%016" PRIx64 ", LID 0x%X\n"
-			"\t\t\t\tExpected revision 0x%X"
-			", received 0x%X\n",
+			"\t\t\t\tExpected revision 0x%X, received 0x%X\n",
 			cl_ntoh64(p_rec->node_info.node_guid),
 			cl_ntoh16(p_rec->lid),
 			cl_ntoh32(p_node->rec.node_info.revision),
@@ -3483,8 +3341,7 @@ osmtest_validate_node_rec(IN osmtest_t * const p_osmt,
 	p_tbl = &p_osmt->exp_subn.node_lid_tbl;
 	p_node = (node_t *) cl_qmap_get(p_tbl, p_rec->lid);
 	if (p_node == (node_t *) cl_qmap_end(p_tbl)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_node_rec: ERR 0035: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0035: "
 			"Unexpected node 0x%016" PRIx64 ", LID 0x%X\n",
 			cl_ntoh64(p_rec->node_info.node_guid),
 			cl_ntoh16(p_rec->lid));
@@ -3510,19 +3367,15 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: "
-			"Checking port LID 0x%X, Num 0x%X\n",
-			cl_ntoh16(p_rec->lid), p_rec->port_num);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+		"Checking port LID 0x%X, Num 0x%X\n",
+		cl_ntoh16(p_rec->lid), p_rec->port_num);
 
 	/*
 	 * Has this record already been returned?
 	 */
 	if (p_port->count != 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0036: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0036: "
 			"Already received port LID 0x%X, Num 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num);
 		status = IB_ERROR;
@@ -3536,8 +3389,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	 */
 	if ((p_port->comp.lid & p_port->rec.lid) !=
 	    (p_port->comp.lid & p_rec->lid)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0037: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0037: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected LID 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3548,8 +3400,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 
 	if ((p_port->comp.port_num & p_port->rec.port_num) !=
 	    (p_port->comp.port_num & p_rec->port_num)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0038: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0038: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected port_num 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3560,8 +3411,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 
 	if ((p_port->comp.port_info.m_key & p_port->rec.port_info.m_key) !=
 	    (p_port->comp.port_info.m_key & p_rec->port_info.m_key)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0039: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0039: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected m_key 0x%016" PRIx64
 			", received 0x%016" PRIx64 "\n", cl_ntoh16(p_rec->lid),
@@ -3575,8 +3425,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     subnet_prefix) !=
 	    (p_port->comp.port_info.subnet_prefix & p_rec->port_info.
 	     subnet_prefix)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0040: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0040: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected subnet_prefix 0x%016" PRIx64
 			", received 0x%016" PRIx64 "\n", cl_ntoh16(p_rec->lid),
@@ -3589,8 +3438,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	if ((p_port->comp.port_info.base_lid & p_port->rec.port_info.
 	     base_lid) !=
 	    (p_port->comp.port_info.base_lid & p_rec->port_info.base_lid)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0041: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0041: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected base_lid 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3604,8 +3452,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     master_sm_base_lid) !=
 	    (p_port->comp.port_info.master_sm_base_lid & p_rec->port_info.
 	     master_sm_base_lid)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0042: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0042: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected master_sm_base_lid 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3619,8 +3466,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     capability_mask) !=
 	    (p_port->comp.port_info.capability_mask & p_rec->port_info.
 	     capability_mask)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0043: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0043: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected capability_mask 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3633,8 +3479,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	if ((p_port->comp.port_info.diag_code & p_port->rec.port_info.
 	     diag_code) !=
 	    (p_port->comp.port_info.diag_code & p_rec->port_info.diag_code)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0044: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0044: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected diag_code 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3648,8 +3493,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     m_key_lease_period) !=
 	    (p_port->comp.port_info.m_key_lease_period & p_rec->port_info.
 	     m_key_lease_period)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0045: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0045: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected m_key_lease_period 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3663,8 +3507,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     local_port_num) !=
 	    (p_port->comp.port_info.local_port_num & p_rec->port_info.
 	     local_port_num)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0046: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0046: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected local_port_num 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3678,8 +3521,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     link_width_enabled) !=
 	    (p_port->comp.port_info.link_width_enabled & p_rec->port_info.
 	     link_width_enabled)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0047: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0047: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected link_width_enabled 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3693,8 +3535,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     port_info.link_width_supported) !=
 	    (p_port->comp.port_info.link_width_supported & p_rec->port_info.
 	     link_width_supported)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0048: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0048: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected link_width_supported 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3708,8 +3549,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     link_width_active) !=
 	    (p_port->comp.port_info.link_width_active & p_rec->port_info.
 	     link_width_active)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0049: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0049: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected link_width_active 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3722,8 +3562,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	if ((p_port->comp.port_info.link_speed & p_port->rec.port_info.
 	     link_speed) !=
 	    (p_port->comp.port_info.link_speed & p_rec->port_info.link_speed)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0054: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0054: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected link_speed 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3737,8 +3576,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     state_info1) !=
 	    (p_port->comp.port_info.state_info1 & p_rec->port_info.
 	     state_info1)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0055: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0055: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected state_info1 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3752,8 +3590,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     state_info2) !=
 	    (p_port->comp.port_info.state_info2 & p_rec->port_info.
 	     state_info2)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0058: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0058: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected state_info2 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3766,8 +3603,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	if ((p_port->comp.port_info.mkey_lmc & p_port->rec.port_info.
 	     mkey_lmc) !=
 	    (p_port->comp.port_info.mkey_lmc & p_rec->port_info.mkey_lmc)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0059: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0059: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected mkey_lmc 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3780,8 +3616,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	if ((p_port->comp.port_info.link_speed & p_port->rec.port_info.
 	     link_speed) !=
 	    (p_port->comp.port_info.link_speed & p_rec->port_info.link_speed)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0060: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0060: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected link_speed 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3794,8 +3629,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	if ((p_port->comp.port_info.mtu_smsl & p_port->rec.port_info.
 	     mtu_smsl) !=
 	    (p_port->comp.port_info.mtu_smsl & p_rec->port_info.mtu_smsl)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0061: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0061: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected mtu_smsl 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3807,8 +3641,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 
 	if ((p_port->comp.port_info.vl_cap & p_port->rec.port_info.vl_cap) !=
 	    (p_port->comp.port_info.vl_cap & p_rec->port_info.vl_cap)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0062: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0062: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected vl_cap 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3821,8 +3654,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     vl_high_limit) !=
 	    (p_port->comp.port_info.vl_high_limit & p_rec->port_info.
 	     vl_high_limit)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0082: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0082: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected vl_high_limit 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3836,8 +3668,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     vl_arb_high_cap) !=
 	    (p_port->comp.port_info.vl_arb_high_cap & p_rec->port_info.
 	     vl_arb_high_cap)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0083: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0083: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected vl_arb_high_cap 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3851,8 +3682,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     vl_arb_low_cap) !=
 	    (p_port->comp.port_info.vl_arb_low_cap & p_rec->port_info.
 	     vl_arb_low_cap)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0084: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0084: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected vl_arb_low_cap 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3864,8 +3694,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 
 	if ((p_port->comp.port_info.mtu_cap & p_port->rec.port_info.mtu_cap) !=
 	    (p_port->comp.port_info.mtu_cap & p_rec->port_info.mtu_cap)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0085: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0085: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected mtu_cap 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3880,8 +3709,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     vl_stall_life) !=
 	    (p_port->comp.port_info.vl_stall_life & p_rec->port_info.
 	     vl_stall_life)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 012F: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 012F: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected vl_stall_life 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3895,8 +3723,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	if ((p_port->comp.port_info.vl_enforce & p_port->rec.port_info.
 	     vl_enforce) !=
 	    (p_port->comp.port_info.vl_enforce & p_rec->port_info.vl_enforce)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0086: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0086: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected vl_enforce 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3910,8 +3737,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     m_key_violations) !=
 	    (p_port->comp.port_info.m_key_violations & p_rec->port_info.
 	     m_key_violations)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0087: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0087: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected m_key_violations 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3925,8 +3751,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     p_key_violations) !=
 	    (p_port->comp.port_info.p_key_violations & p_rec->port_info.
 	     p_key_violations)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0088: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0088: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected p_key_violations 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3940,8 +3765,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     q_key_violations) !=
 	    (p_port->comp.port_info.q_key_violations & p_rec->port_info.
 	     q_key_violations)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0089: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0089: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected q_key_violations 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3954,8 +3778,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	if ((p_port->comp.port_info.guid_cap & p_port->rec.port_info.
 	     guid_cap) !=
 	    (p_port->comp.port_info.guid_cap & p_rec->port_info.guid_cap)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0090: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0090: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected guid_cap 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3969,8 +3792,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     subnet_timeout) !=
 	    (p_port->comp.port_info.subnet_timeout & p_rec->port_info.
 	     subnet_timeout)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0091: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0091: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected subnet_timeout 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3984,8 +3806,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     resp_time_value) !=
 	    (p_port->comp.port_info.resp_time_value & p_rec->port_info.
 	     resp_time_value)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0092: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0092: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected resp_time_value 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -3999,8 +3820,7 @@ osmtest_validate_port_data(IN osmtest_t * const p_osmt,
 	     error_threshold) !=
 	    (p_port->comp.port_info.error_threshold & p_rec->port_info.
 	     error_threshold)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_data: ERR 0093: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0093: "
 			"Field mismatch port LID 0x%X Num:0x%X\n"
 			"\t\t\t\tExpected error_threshold 0x%X, received 0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num,
@@ -4036,8 +3856,7 @@ osmtest_validate_port_rec(IN osmtest_t * const p_osmt,
 	    (port_t *) cl_qmap_get(p_tbl,
 				   port_gen_id(p_rec->lid, p_rec->port_num));
 	if (p_port == (port_t *) cl_qmap_end(p_tbl)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_port_rec: ERR 0094: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0094: "
 			"Unexpected port LID 0x%X, Num:0x%X\n",
 			cl_ntoh16(p_rec->lid), p_rec->port_num);
 		status = IB_ERROR;
@@ -4069,8 +3888,7 @@ osmtest_validate_path_rec(IN osmtest_t * const p_osmt,
 	p_tbl = &p_osmt->exp_subn.path_tbl;
 	p_path = (path_t *) cl_qmap_get(p_tbl, osmtest_path_rec_key_get(p_rec));
 	if (p_path == (path_t *) cl_qmap_end(p_tbl)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_path_rec: ERR 0095: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0095: "
 			"Unexpected path SLID 0x%X to DLID 0x%X\n",
 			cl_ntoh16(p_rec->slid), cl_ntoh16(p_rec->dlid));
 		status = IB_ERROR;
@@ -4109,8 +3927,7 @@ osmtest_validate_all_node_recs(IN osmtest_t * const p_osmt)
 				      sizeof(*p_rec), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_all_node_recs: ERR 0096: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0096: "
 			"osmtest_get_all_recs failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -4118,11 +3935,8 @@ osmtest_validate_all_node_recs(IN osmtest_t * const p_osmt)
 
 	num_recs = context.result.result_cnt;
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_all_node_recs: "
-			"Received %zu records\n", num_recs);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Received %zu records\n",
+		num_recs);
 
 	/*
 	 * Compare the received records to the database.
@@ -4135,8 +3949,7 @@ osmtest_validate_all_node_recs(IN osmtest_t * const p_osmt)
 
 		status = osmtest_validate_node_rec(p_osmt, p_rec);
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_all_node_recs: ERR 0097: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0097: "
 				"osmtest_valid_node_rec failed (%s)\n",
 				ib_get_err_str(status));
 			goto Exit;
@@ -4147,8 +3960,7 @@ osmtest_validate_all_node_recs(IN osmtest_t * const p_osmt)
 
 	status = osmtest_check_missing_nodes(p_osmt);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_all_node_recs: ERR 0098: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0098: "
 			"osmtest_check_missing_nodes failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -4189,8 +4001,7 @@ osmtest_validate_all_guidinfo_recs(IN osmtest_t * const p_osmt)
 				      sizeof(*p_rec), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_all_guidinfo_recs: ERR 0099: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0099: "
 			"osmtest_get_all_recs failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -4198,11 +4009,8 @@ osmtest_validate_all_guidinfo_recs(IN osmtest_t * const p_osmt)
 
 	num_recs = context.result.result_cnt;
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_all_guidinfo_recs: "
-			"Received %zu records\n", num_recs);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Received %zu records\n",
+		num_recs);
 
 	/* No validation as yet */
 
@@ -4242,8 +4050,7 @@ osmtest_validate_all_path_recs(IN osmtest_t * const p_osmt)
 				      sizeof(*p_rec), &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_all_path_recs: ERR 009A: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 009A: "
 			"osmtest_get_all_recs failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -4251,11 +4058,8 @@ osmtest_validate_all_path_recs(IN osmtest_t * const p_osmt)
 
 	num_recs = context.result.result_cnt;
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_all_path_recs: "
-			"Received %zu records\n", num_recs);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "Received %zu records\n",
+		num_recs);
 
 	/*
 	 * Compare the received records to the database.
@@ -4268,8 +4072,7 @@ osmtest_validate_all_path_recs(IN osmtest_t * const p_osmt)
 
 		status = osmtest_validate_path_rec(p_osmt, p_rec);
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_all_path_recs: ERR 0100: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0100: "
 				"osmtest_validate_path_rec failed (%s)\n",
 				ib_get_err_str(status));
 			goto Exit;
@@ -4278,8 +4081,7 @@ osmtest_validate_all_path_recs(IN osmtest_t * const p_osmt)
 
 	status = osmtest_check_missing_paths(p_osmt);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_all_path_recs: ERR 0101: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0101: "
 			"osmtest_check_missing_paths failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -4316,12 +4118,9 @@ osmtest_get_link_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_get_link_rec_by_lid: "
-			"Getting link record from LID 0x%02X to LID 0x%02X\n",
-			cl_ntoh16(from_lid), cl_ntoh16(to_lid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting link record from LID 0x%02X to LID 0x%02X\n",
+		cl_ntoh16(from_lid), cl_ntoh16(to_lid));
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -4356,8 +4155,7 @@ osmtest_get_link_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_link_rec_by_lid: ERR 007A: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 007A: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -4365,14 +4163,13 @@ osmtest_get_link_rec_by_lid(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_link_rec_by_lid: ERR 007B: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 007B: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
 			p_mad =
 			    osm_madw_get_mad_ptr(p_context->result.
 						 p_result_madw);
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"osmtest_get_link_rec_by_lid: "
 				"Remote error = %s\n",
 				ib_get_mad_status_str(p_mad));
@@ -4404,12 +4201,8 @@ osmtest_get_guidinfo_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_get_guidinfo_rec_by_lid: "
-			"Getting GUIDInfo record for LID 0x%02X\n",
-			cl_ntoh16(lid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting GUIDInfo record for LID 0x%02X\n", cl_ntoh16(lid));
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -4441,8 +4234,7 @@ osmtest_get_guidinfo_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_guidinfo_rec_by_lid: ERR 007C: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 007C: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -4450,15 +4242,13 @@ osmtest_get_guidinfo_rec_by_lid(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_guidinfo_rec_by_lid: ERR 007D: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 007D: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
 			p_mad =
 			    osm_madw_get_mad_ptr(p_context->result.
 						 p_result_madw);
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_guidinfo_rec_by_lid: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(p_mad));
 
@@ -4490,12 +4280,8 @@ osmtest_get_pkeytbl_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_get_pkeytbl_rec_by_lid: "
-			"Getting PKeyTable record for LID 0x%02X\n",
-			cl_ntoh16(lid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting PKeyTable record for LID 0x%02X\n", cl_ntoh16(lid));
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -4527,8 +4313,7 @@ osmtest_get_pkeytbl_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_pkeytbl_rec_by_lid: ERR 007E: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 007E: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -4536,15 +4321,13 @@ osmtest_get_pkeytbl_rec_by_lid(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_pkeytbl_rec_by_lid: ERR 007F: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 007F: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
 			p_mad =
 			    osm_madw_get_mad_ptr(p_context->result.
 						 p_result_madw);
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_pkeytbl_rec_by_lid: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(p_mad));
 
@@ -4575,12 +4358,8 @@ osmtest_get_sw_info_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_get_sw_info_rec_by_lid: "
-			"Getting SwitchInfo record for LID 0x%02X\n",
-			cl_ntoh16(lid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting SwitchInfo record for LID 0x%02X\n", cl_ntoh16(lid));
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -4613,8 +4392,7 @@ osmtest_get_sw_info_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_sw_info_rec_by_lid: ERR 006C: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 006C: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -4622,15 +4400,13 @@ osmtest_get_sw_info_rec_by_lid(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_sw_info_rec_by_lid: ERR 006D: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 006D: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
 			p_mad =
 			    osm_madw_get_mad_ptr(p_context->result.
 						 p_result_madw);
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_sw_info_rec_by_lid: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(p_mad));
 
@@ -4661,11 +4437,8 @@ osmtest_get_lft_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_get_lft_rec_by_lid: "
-			"Getting LFT record for LID 0x%02X\n", cl_ntoh16(lid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting LFT record for LID 0x%02X\n", cl_ntoh16(lid));
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -4698,8 +4471,7 @@ osmtest_get_lft_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_lft_rec_by_lid: ERR 008A: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 008A: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -4707,15 +4479,13 @@ osmtest_get_lft_rec_by_lid(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_lft_rec_by_lid: ERR 008B: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 008B: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
 			p_mad =
 			    osm_madw_get_mad_ptr(p_context->result.
 						 p_result_madw);
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_lft_rec_by_lid: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(p_mad));
 
@@ -4746,11 +4516,8 @@ osmtest_get_mft_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_get_mft_rec_by_lid: "
-			"Getting MFT record for LID 0x%02X\n", cl_ntoh16(lid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Getting MFT record for LID 0x%02X\n", cl_ntoh16(lid));
 
 	/*
 	 * Do a blocking query for this record in the subnet.
@@ -4783,8 +4550,7 @@ osmtest_get_mft_rec_by_lid(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_mft_rec_by_lid: ERR 009B: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 009B: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -4792,15 +4558,13 @@ osmtest_get_mft_rec_by_lid(IN osmtest_t * const p_osmt,
 	status = p_context->result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_mft_rec_by_lid: ERR 009C: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 009C: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		if (status == IB_REMOTE_ERROR) {
 			p_mad =
 			    osm_madw_get_mad_ptr(p_context->result.
 						 p_result_madw);
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_mft_rec_by_lid: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(p_mad));
 
@@ -4880,8 +4644,7 @@ osmtest_sminfo_record_request(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_sminfo_record_request: ERR 008C: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 008C: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -4890,8 +4653,7 @@ osmtest_sminfo_record_request(IN osmtest_t * const p_osmt,
 
 	if (status != IB_SUCCESS) {
 		if (status != IB_INVALID_PARAMETER) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_sminfo_record_request: ERR 008D: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 008D: "
 				"ib_query failed (%s)\n",
 				ib_get_err_str(status));
 		}
@@ -4899,8 +4661,7 @@ osmtest_sminfo_record_request(IN osmtest_t * const p_osmt,
 			p_mad =
 			    osm_madw_get_mad_ptr(p_context->result.
 						 p_result_madw);
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_sminfo_record_request: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(p_mad));
 
@@ -4996,8 +4757,7 @@ osmtest_informinfo_request(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_informinfo_request: ERR 008E: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 008E: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -5006,8 +4766,7 @@ osmtest_informinfo_request(IN osmtest_t * const p_osmt,
 
 	if (status != IB_SUCCESS) {
 		if (status != IB_INVALID_PARAMETER) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_informinfo_request: ERR 008F: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 008F: "
 				"ib_query failed (%s)\n",
 				ib_get_err_str(status));
 		}
@@ -5015,8 +4774,7 @@ osmtest_informinfo_request(IN osmtest_t * const p_osmt,
 			p_mad =
 			    osm_madw_get_mad_ptr(p_context->result.
 						 p_result_madw);
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_informinfo_request: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(p_mad));
 
@@ -5051,16 +4809,14 @@ osmtest_validate_single_path_rec_lid_pair(IN osmtest_t * const p_osmt,
 						  p_path->rec.slid,
 						  p_path->rec.dlid, &context);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_path_rec_lid_pair: ERR 0102: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0102: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
 
 	num_recs = context.result.result_cnt;
 	if (num_recs != 1) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_path_rec_lid_pair: ERR 0103: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0103: "
 			"Too many records. Expected 1, received %zu\n",
 			num_recs);
 
@@ -5071,8 +4827,7 @@ osmtest_validate_single_path_rec_lid_pair(IN osmtest_t * const p_osmt,
 
 		status = osmtest_validate_path_data(p_osmt, p_path, p_rec);
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_single_path_rec_lid_pair: ERR 0104: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0104: "
 				"osmtest_validate_path_data failed (%s)\n",
 				ib_get_err_str(status));
 		}
@@ -5110,12 +4865,8 @@ osmtest_validate_single_node_rec_lid(IN osmtest_t * const p_osmt,
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-		osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-			"osmtest_validate_single_node_rec_lid: "
-			"Getting NodeRecord for node with LID 0x%X\n",
-			cl_ntoh16(lid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+		"Getting NodeRecord for node with LID 0x%X\n", cl_ntoh16(lid));
 
 	memset(&context, 0, sizeof(context));
 	memset(&req, 0, sizeof(req));
@@ -5142,8 +4893,7 @@ osmtest_validate_single_node_rec_lid(IN osmtest_t * const p_osmt,
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_node_rec_lid: ERR 0105: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0105: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -5151,13 +4901,11 @@ osmtest_validate_single_node_rec_lid(IN osmtest_t * const p_osmt,
 	status = context.result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_node_rec_lid: ERR 0106: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0106: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_single_node_rec_lid: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (context.result.
@@ -5167,8 +4915,7 @@ osmtest_validate_single_node_rec_lid(IN osmtest_t * const p_osmt,
 	}
 
 	num_recs = context.result.result_cnt;
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_validate_single_node_rec_lid: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Received %d nodes\n", num_recs);
 
 	for (i = 0; i < num_recs; i++) {
@@ -5177,8 +4924,7 @@ osmtest_validate_single_node_rec_lid(IN osmtest_t * const p_osmt,
 
 		status = osmtest_validate_node_rec(p_osmt, p_rec);
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_single_node_rec_lid: ERR 0107: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0107: "
 				"osmtest_validate_node_data failed (%s)\n",
 				ib_get_err_str(status));
 			goto Exit;
@@ -5219,8 +4965,7 @@ osmtest_validate_single_port_rec_lid(IN osmtest_t * const p_osmt,
 				    p_port->rec.lid,
 				    p_port->rec.port_num, &context);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_port_rec_lid: ERR 0108: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0108: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		goto Exit;
@@ -5230,8 +4975,7 @@ osmtest_validate_single_port_rec_lid(IN osmtest_t * const p_osmt,
 	p_rec = osmv_get_query_portinfo_rec(context.result.p_result_madw, 0);
 	status = osmtest_validate_port_rec(p_osmt, p_rec);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_port_rec_lid: ERR 0109: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0109: "
 			"osmtest_validate_port_data failed (%s)\n",
 			ib_get_err_str(status));
 	}
@@ -5270,14 +5014,10 @@ osmtest_validate_single_path_rec_guid_pair(IN osmtest_t * const p_osmt,
 	memset(&req, 0, sizeof(req));
 	memset(&context, 0, sizeof(context));
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_path_rec_guid_pair: "
-			"\n\t\t\t\tChecking src 0x%016" PRIx64
-			" to dest 0x%016" PRIx64 "\n",
-			cl_ntoh64(p_pair->src_guid),
-			cl_ntoh64(p_pair->dest_guid));
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+		"\n\t\t\t\tChecking src 0x%016" PRIx64
+		" to dest 0x%016" PRIx64 "\n",
+		cl_ntoh64(p_pair->src_guid), cl_ntoh64(p_pair->dest_guid));
 
 	context.p_osmt = p_osmt;
 
@@ -5293,8 +5033,7 @@ osmtest_validate_single_path_rec_guid_pair(IN osmtest_t * const p_osmt,
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_path_rec_guid_pair: ERR 0110: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0110: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
@@ -5302,13 +5041,11 @@ osmtest_validate_single_path_rec_guid_pair(IN osmtest_t * const p_osmt,
 	status = context.result.status;
 
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_path_rec_guid_pair: ERR 0111: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0111: "
 			"ib_query failed (%s)\n", ib_get_err_str(status));
 
 		if (status == IB_REMOTE_ERROR) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_single_path_rec_guid_pair: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				"Remote error = %s\n",
 				ib_get_mad_status_str(osm_madw_get_mad_ptr
 						      (context.result.
@@ -5318,9 +5055,7 @@ osmtest_validate_single_path_rec_guid_pair(IN osmtest_t * const p_osmt,
 	}
 
 	num_recs = context.result.result_cnt;
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_validate_single_path_rec_guid_pair: %zu records\n",
-		num_recs);
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "%zu records\n", num_recs);
 
 	for (i = 0; i < num_recs; i++) {
 		p_rec =
@@ -5330,8 +5065,7 @@ osmtest_validate_single_path_rec_guid_pair(IN osmtest_t * const p_osmt,
 		 * Make sure the GUID values are correct
 		 */
 		if (p_rec->dgid.unicast.interface_id != p_pair->dest_guid) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_single_path_rec_guid_pair: ERR 0112: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0112: "
 				"Destination GUID mismatch\n"
 				"\t\t\t\texpected 0x%016" PRIx64
 				", received 0x%016" PRIx64 "\n",
@@ -5341,8 +5075,7 @@ osmtest_validate_single_path_rec_guid_pair(IN osmtest_t * const p_osmt,
 		}
 
 		if (p_rec->sgid.unicast.interface_id != p_pair->src_guid) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_single_path_rec_guid_pair: ERR 0113: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0113: "
 				"Source GUID mismatch\n"
 				"\t\t\t\texpected 0x%016" PRIx64
 				", received 0x%016" PRIx64 ".\n",
@@ -5353,8 +5086,7 @@ osmtest_validate_single_path_rec_guid_pair(IN osmtest_t * const p_osmt,
 
 		status = osmtest_validate_path_rec(p_osmt, p_rec);
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_single_path_rec_guid_pair: ERR 0114: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0114: "
 				"osmtest_validate_path_rec failed (%s)\n",
 				ib_get_err_str(status));
 			got_error = TRUE;
@@ -5397,11 +5129,8 @@ osmtest_validate_single_path_recs(IN osmtest_t * const p_osmt)
 
 	OSM_LOG_ENTER(&p_osmt->log);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_single_path_recs: "
-			"Validating individual path record queries\n");
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Validating individual path record queries\n");
 	p_path_tbl = &p_osmt->exp_subn.path_tbl;
 
 	osmtest_prepare_db(p_osmt);
@@ -5421,17 +5150,13 @@ osmtest_validate_single_path_recs(IN osmtest_t * const p_osmt)
 		p_path = (path_t *) cl_qmap_next(&p_path->map_item);
 	}
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_single_path_recs: "
-			"Total of %u path records validated using LID based query\n",
-			cnt);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Total of %u path records validated using LID based query\n",
+		cnt);
 
 	status = osmtest_check_missing_paths(p_osmt);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_path_recs: ERR 0115: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0115: "
 			"osmtest_check_missing_paths failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -5456,17 +5181,13 @@ osmtest_validate_single_path_recs(IN osmtest_t * const p_osmt)
 		p_path = (path_t *) cl_qmap_next(&p_path->map_item);
 	}
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_single_path_recs: "
-			"Total of %u path records validated using GUID based query\n",
-			cnt);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Total of %u path records validated using GUID based query\n",
+		cnt);
 
 	status = osmtest_check_missing_paths(p_osmt);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_path_recs: ERR 0116: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0116: "
 			"osmtest_check_missing_paths failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -5493,11 +5214,8 @@ osmtest_validate_single_node_recs(IN osmtest_t * const p_osmt)
 
 	osmtest_prepare_db(p_osmt);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_single_node_recs: "
-			"Validating individual node record queries\n");
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Validating individual node record queries\n");
 
 	/*
 	 * Walk the list of all node records, and ask for each one
@@ -5509,8 +5227,7 @@ osmtest_validate_single_node_recs(IN osmtest_t * const p_osmt)
 							      (ib_net16_t)
 							      cl_qmap_key((cl_map_item_t *) p_node), p_node);
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_single_node_recs: ERR 011A: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 011A: "
 				"osmtest_validate_single_node_rec_lid (%s)\n",
 				ib_get_err_str(status));
 			goto Exit;
@@ -5519,16 +5236,12 @@ osmtest_validate_single_node_recs(IN osmtest_t * const p_osmt)
 		p_node = (node_t *) cl_qmap_next(&p_node->map_item);
 	}
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_single_node_recs: "
-			"Total of %u node records validated\n", cnt);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Total of %u node records validated\n", cnt);
 
 	status = osmtest_check_missing_nodes(p_osmt);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_node_recs: ERR 0117: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0117: "
 			"osmtest_check_missing_nodes (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -5555,11 +5268,8 @@ osmtest_validate_single_port_recs(IN osmtest_t * const p_osmt)
 
 	osmtest_prepare_db(p_osmt);
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_single_port_recs: "
-			"Validating individual port record queries\n");
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Validating individual port record queries\n");
 
 	/*
 	 * Walk the list of all port records, and ask for each one
@@ -5569,8 +5279,7 @@ osmtest_validate_single_port_recs(IN osmtest_t * const p_osmt)
 	while (p_port != (port_t *) cl_qmap_end(p_port_key_tbl)) {
 		status = osmtest_validate_single_port_rec_lid(p_osmt, p_port);
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_validate_single_port_recs: ERR 011B: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 011B: "
 				"osmtest_validate_single_port_rec_lid (%s)\n",
 				ib_get_err_str(status));
 			goto Exit;
@@ -5579,16 +5288,12 @@ osmtest_validate_single_port_recs(IN osmtest_t * const p_osmt)
 		p_port = (port_t *) cl_qmap_next(&p_port->map_item);
 	}
 
-	if (osm_log_is_active(&p_osmt->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-			"osmtest_validate_single_port_recs: "
-			"Total of %u port records validated\n", cnt);
-	}
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
+		"Total of %u port records validated\n", cnt);
 
 	status = osmtest_check_missing_ports(p_osmt);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_validate_single_port_recs: ERR 0118: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0118: "
 			"osmtest_check_missing_paths failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -5681,16 +5386,13 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 	memset(&context, 0, sizeof(context));
 	memset(&request, 0, sizeof(request));
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_get_multipath_rec: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmtest_get_multipath_rec(p_osmt, &request, &context);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_multipath_rec: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 			"Got error %s\n", ib_get_err_str(status));
 	}
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_get_multipath_rec: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status == IB_SUCCESS) {
 		status = IB_ERROR;
@@ -5703,16 +5405,13 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 	request.sgid_count = 1;
 	ib_gid_set_default(&request.gids[0], portguid);
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_get_multipath_rec: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmtest_get_multipath_rec(p_osmt, &request, &context);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_multipath_rec: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 			"Got error %s\n", ib_get_err_str(status));
 	}
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_get_multipath_rec: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status == IB_SUCCESS) {
 		status = IB_ERROR;
@@ -5730,16 +5429,13 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 	request.gids[1].unicast.prefix = CL_HTON64(0xff12401bffff0000ULL);
 	request.gids[1].unicast.interface_id = CL_HTON64(0x00000000ffffffffULL);
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_get_multipath_rec: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmtest_get_multipath_rec(p_osmt, &request, &context);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_multipath_rec: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 			"Got error %s\n", ib_get_err_str(status));
 	}
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_get_multipath_rec: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status == IB_SUCCESS) {
 		status = IB_ERROR;
@@ -5756,16 +5452,13 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 	request.gids[0].unicast.interface_id = CL_HTON64(0x00000000ffffffffULL);
 	ib_gid_set_default(&request.gids[1], portguid);
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_get_multipath_rec: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmtest_get_multipath_rec(p_osmt, &request, &context);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_multipath_rec: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 			"Got error %s\n", ib_get_err_str(status));
 	}
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_get_multipath_rec: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status == IB_SUCCESS) {
 		status = IB_ERROR;
@@ -5837,16 +5530,13 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 
 	memset(&context, 0, sizeof(context));
 
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_get_multipath_rec: " EXPECTING_ERRORS_START "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_START "\n");
 	status = osmtest_get_pkeytbl_rec_by_lid(p_osmt, test_lid, 0, &context);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_get_multipath_rec: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 			"Got error %s\n", ib_get_err_str(status));
 	}
-	osm_log(&p_osmt->log, OSM_LOG_ERROR,
-		"osmtest_get_multipath_rec: " EXPECTING_ERRORS_END "\n");
+	OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");
 
 	if (status == IB_SUCCESS) {
 		status = IB_ERROR;
@@ -5927,8 +5617,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		status = IB_ERROR;
 		goto Exit;
 	} else {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_sminfo_request: " "IS EXPECTED ERROR ^^^^\n");
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "IS EXPECTED ERROR ^^^^\n");
 	}
 
 	memset(&sm_info_rec_opt, 0, sizeof(sm_info_rec_opt));
@@ -5983,8 +5672,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 	}
 
 	/* InformInfoRecord tests */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfoRecord "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfoRecord "
 		"Sending a BAD - Set Unsubscribe request\n");
 	memset(&inform_info_opt, 0, sizeof(inform_info_opt));
 	memset(&inform_info_rec_opt, 0, sizeof(inform_info_rec_opt));
@@ -5997,13 +5685,11 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		status = IB_ERROR;
 		goto Exit;
 	} else {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_informinfo_request: InformInfoRecord "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "InformInfoRecord "
 			"IS EXPECTED ERROR ^^^^\n");
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfoRecord "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfoRecord "
 		"Sending a Good - Empty GetTable request\n");
 	memset(&context, 0, sizeof(context));
 	status =
@@ -6014,8 +5700,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		goto Exit;
 
 	/* InformInfo tests */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfo "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfo "
 		"Sending a BAD - Empty Get request "
 		"(should fail with NO_RECORDS)\n");
 	memset(&context, 0, sizeof(context));
@@ -6026,13 +5711,11 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		status = IB_ERROR;
 		goto Exit;
 	} else {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_informinfo_request: InformInfo "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "InformInfo "
 			"IS EXPECTED ERROR ^^^^\n");
 	}
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfo "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfo "
 		"Sending a BAD - Set Unsubscribe request\n");
 	memset(&context, 0, sizeof(context));
 	status = osmtest_informinfo_request(p_osmt, IB_MAD_ATTR_INFORM_INFO,
@@ -6042,14 +5725,12 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		status = IB_ERROR;
 		goto Exit;
 	} else {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_informinfo_request: InformInfo UnSubscribe "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "InformInfo UnSubscribe "
 			"IS EXPECTED ERROR ^^^^\n");
 	}
 
 	/* Now subscribe */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfo "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfo "
 		"Sending a Good - Set Subscribe request\n");
 	inform_info_opt.subscribe = TRUE;
 	memset(&context, 0, sizeof(context));
@@ -6060,8 +5741,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		goto Exit;
 
 	/* Now unsubscribe (QPN needs to be 1 to work) */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfo "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfo "
 		"Sending a Good - Set Unsubscribe request\n");
 	inform_info_opt.subscribe = FALSE;
 	inform_info_opt.qpn = 1;
@@ -6073,8 +5753,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		goto Exit;
 
 	/* Now subscribe again */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfo "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfo "
 		"Sending a Good - Set Subscribe request\n");
 	inform_info_opt.subscribe = TRUE;
 	inform_info_opt.qpn = 1;
@@ -6086,8 +5765,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		goto Exit;
 
 	/* Subscribe over existing subscription */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfo "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfo "
 		"Sending a Good - Set Subscribe (again) request\n");
 	inform_info_opt.qpn = 0;
 	memset(&context, 0, sizeof(context));
@@ -6099,8 +5777,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 
 	/* More InformInfoRecord tests */
 	/* RID lookup (with currently invalid enum) */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfoRecord "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfoRecord "
 		"Sending a Good - GetTable by GID\n");
 	ib_gid_set_default(&inform_info_rec_opt.subscriber_gid,
 			   p_osmt->local_port.port_guid);
@@ -6114,8 +5791,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		goto Exit;
 
 	/* Enum lookup */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfoRecord "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfoRecord "
 		"Sending a Good - GetTable (subscriber_enum == 0) request\n");
 	inform_info_rec_opt.subscriber_enum = 0;
 	memset(&context, 0, sizeof(context));
@@ -6127,8 +5803,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		goto Exit;
 
 	/* Get all InformInfoRecords */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfoRecord "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfoRecord "
 		"Sending a Good - GetTable (ALL records) request\n");
 	memset(&inform_info_rec_opt, 0, sizeof(inform_info_rec_opt));
 	memset(&context, 0, sizeof(context));
@@ -6140,8 +5815,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		goto Exit;
 
 	/* Another subscription */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfo "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfo "
 		"Sending another Good - Set Subscribe (again) request\n");
 	inform_info_opt.qpn = 0;
 	inform_info_opt.trap = 0x1234;
@@ -6153,8 +5827,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		goto Exit;
 
 	/* Get all InformInfoRecords again */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfoRecord "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfoRecord "
 		"Sending a Good - GetTable (ALL records) request\n");
 	memset(&inform_info_rec_opt, 0, sizeof(inform_info_rec_opt));
 	memset(&context, 0, sizeof(context));
@@ -6167,8 +5840,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 
 	/* Cleanup subscriptions before further testing */
 	/* Does order of deletion matter ? Test this !!! */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfo "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfo "
 		"Sending a Good - Set (cleanup) request\n");
 	inform_info_opt.subscribe = FALSE;
 	inform_info_opt.qpn = 1;
@@ -6180,8 +5852,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		goto Exit;
 
 	/* Get all InformInfoRecords again */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfoRecord "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfoRecord "
 		"Sending a Good - GetTable (ALL records) request\n");
 	memset(&inform_info_rec_opt, 0, sizeof(inform_info_rec_opt));
 	memset(&context, 0, sizeof(context));
@@ -6192,8 +5863,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 	if (status != IB_SUCCESS)
 		goto Exit;
 
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfo"
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfo"
 		"Sending a Good - Set (cleanup) request\n");
 	inform_info_opt.subscribe = FALSE;
 	inform_info_opt.qpn = 1;
@@ -6206,8 +5876,7 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 		goto Exit;
 
 	/* Get all InformInfoRecords a final time */
-	osm_log(&p_osmt->log, OSM_LOG_VERBOSE,
-		"osmtest_informinfo_request: InformInfoRecord "
+	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE, "InformInfoRecord "
 		"Sending a Good - GetTable (ALL records) request\n");
 	memset(&inform_info_rec_opt, 0, sizeof(inform_info_rec_opt));
 	memset(&context, 0, sizeof(context));
@@ -6294,20 +5963,17 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 				goto Exit;
 
 			memset(&context, 0, sizeof(context));
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_path_rec_by_lid_pair: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				EXPECTING_ERRORS_START "\n");
 			status =
 			    osmtest_get_path_rec_by_lid_pair(p_osmt, 0xffff,
 							     0xffff, &context);
 			if (status != IB_SUCCESS) {
-				osm_log(&p_osmt->log, OSM_LOG_ERROR,
-					"osmtest_get_path_rec_by_lid_pair: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 					"Got error %s\n",
 					ib_get_err_str(status));
 			}
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_path_rec_by_lid_pair: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				EXPECTING_ERRORS_END "\n");
 
 			if (status == IB_SUCCESS) {
@@ -6315,21 +5981,18 @@ static ib_api_status_t osmtest_validate_against_db(IN osmtest_t * const p_osmt)
 				goto Exit;
 			}
 
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_path_rec_by_lid_pair: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				EXPECTING_ERRORS_START "\n");
 
 			status =
 			    osmtest_get_path_rec_by_lid_pair(p_osmt, test_lid,
 							     0xffff, &context);
 			if (status != IB_SUCCESS) {
-				osm_log(&p_osmt->log, OSM_LOG_ERROR,
-					"osmtest_get_path_rec_by_lid_pair: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 					"Got error %s\n",
 					ib_get_err_str(status));
 			}
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_get_path_rec_by_lid_pair: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
 				EXPECTING_ERRORS_END "\n");
 
 			if (status == IB_SUCCESS) {
@@ -6430,8 +6093,7 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 			/*
 			 * End of file in the middle of a definition.
 			 */
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_node: ERR 0119: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0119: "
 				"Unexpected end of file\n");
 			status = IB_ERROR;
 			goto Exit;
@@ -6448,19 +6110,14 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 
 		p_tok = str_get_token(&line[offset]);
 		if (p_tok == NULL) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_node: ERR 0120: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0120: "
 				"Ignoring line %u with unknown token: %s\n",
 				*p_line_num, &line[offset]);
 			continue;
 		}
 
-		if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-			osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-				"osmtest_parse_node: "
-				"Found '%s' (line %u)\n", p_tok->str,
-				*p_line_num);
-		}
+		OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+			"Found '%s' (line %u)\n", p_tok->str, *p_line_num);
 
 		str_skip_token(line, &offset);
 
@@ -6473,73 +6130,53 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 			p_node->rec.lid =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"lid = 0x%X\n",
-					cl_ntoh16(p_node->rec.lid));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "lid = 0x%X\n",
+				cl_ntoh16(p_node->rec.lid));
 			break;
 
 		case OSMTEST_TOKEN_BASE_VERSION:
 			p_node->comp.node_info.base_version = 0xFF;
 			p_node->rec.node_info.base_version =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"base_version = 0x%X\n",
-					p_node->rec.node_info.base_version);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"base_version = 0x%X\n",
+				p_node->rec.node_info.base_version);
 			break;
 
 		case OSMTEST_TOKEN_CLASS_VERSION:
 			p_node->comp.node_info.class_version = 0xFF;
 			p_node->rec.node_info.class_version =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"class_version = 0x%X\n",
-					p_node->rec.node_info.class_version);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"class_version = 0x%X\n",
+				p_node->rec.node_info.class_version);
 			break;
 
 		case OSMTEST_TOKEN_NODE_TYPE:
 			p_node->comp.node_info.node_type = 0xFF;
 			p_node->rec.node_info.node_type =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"node_type = 0x%X\n",
-					p_node->rec.node_info.node_type);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"node_type = 0x%X\n",
+				p_node->rec.node_info.node_type);
 			break;
 
 		case OSMTEST_TOKEN_NUM_PORTS:
 			p_node->comp.node_info.num_ports = 0xFF;
 			p_node->rec.node_info.num_ports =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"num_ports = 0x%X\n",
-					p_node->rec.node_info.num_ports);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"num_ports = 0x%X\n",
+				p_node->rec.node_info.num_ports);
 			break;
 
 		case OSMTEST_TOKEN_SYS_GUID:
 			p_node->comp.node_info.sys_guid = 0xFFFFFFFFFFFFFFFFULL;
 			p_node->rec.node_info.sys_guid =
 			    cl_hton64(strtoull(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"sys_guid = 0x%016" PRIx64 "\n",
-					cl_ntoh64(p_node->rec.node_info.
-						  sys_guid));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"sys_guid = 0x%016" PRIx64 "\n",
+				cl_ntoh64(p_node->rec.node_info.sys_guid));
 			break;
 
 		case OSMTEST_TOKEN_NODE_GUID:
@@ -6547,13 +6184,9 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 			    0xFFFFFFFFFFFFFFFFULL;
 			p_node->rec.node_info.node_guid =
 			    cl_hton64(strtoull(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"node_guid = 0x%016" PRIx64 "\n",
-					cl_ntoh64(p_node->rec.node_info.
-						  node_guid));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"node_guid = 0x%016" PRIx64 "\n",
+				cl_ntoh64(p_node->rec.node_info.node_guid));
 			break;
 
 		case OSMTEST_TOKEN_PORT_GUID:
@@ -6561,13 +6194,9 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 			    0xFFFFFFFFFFFFFFFFULL;
 			p_node->rec.node_info.port_guid =
 			    cl_hton64(strtoull(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"port_guid = 0x%016" PRIx64 "\n",
-					cl_ntoh64(p_node->rec.node_info.
-						  port_guid));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"port_guid = 0x%016" PRIx64 "\n",
+				cl_ntoh64(p_node->rec.node_info.port_guid));
 			break;
 
 		case OSMTEST_TOKEN_PARTITION_CAP:
@@ -6575,13 +6204,9 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 			p_node->rec.node_info.partition_cap =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"partition_cap = 0x%X\n",
-					cl_ntoh16(p_node->rec.node_info.
-						  partition_cap));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"partition_cap = 0x%X\n",
+				cl_ntoh16(p_node->rec.node_info.partition_cap));
 			break;
 
 		case OSMTEST_TOKEN_DEVICE_ID:
@@ -6591,26 +6216,18 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 								    (&line
 								     [offset],
 								     NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"device_id = 0x%X\n",
-					cl_ntoh16(p_node->rec.node_info.
-						  device_id));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"device_id = 0x%X\n",
+				cl_ntoh16(p_node->rec.node_info.device_id));
 			break;
 
 		case OSMTEST_TOKEN_REVISION:
 			p_node->comp.node_info.revision = 0xFFFFFFFF;
 			p_node->rec.node_info.revision =
 			    cl_hton32(strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"revision = 0x%X\n",
-					cl_ntoh32(p_node->rec.node_info.
-						  revision));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"revision = 0x%X\n",
+				cl_ntoh32(p_node->rec.node_info.revision));
 			break;
 
 		case OSMTEST_TOKEN_PORT_NUM:
@@ -6618,13 +6235,10 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 			    IB_NODE_INFO_PORT_NUM_MASK;
 			p_node->rec.node_info.port_num_vendor_id |=
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"local_port_num = 0x%X\n",
-					ib_node_info_get_local_port_num
-					(&p_node->rec.node_info));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"local_port_num = 0x%X\n",
+				ib_node_info_get_local_port_num
+				(&p_node->rec.node_info));
 			break;
 
 		case OSMTEST_TOKEN_VENDOR_ID:
@@ -6632,13 +6246,10 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 			    IB_NODE_INFO_VEND_ID_MASK;
 			p_node->rec.node_info.port_num_vendor_id |=
 			    cl_hton32(strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_node: "
-					"vendor_id = 0x%X\n",
-					cl_ntoh32(ib_node_info_get_vendor_id
-						  (&p_node->rec.node_info)));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"vendor_id = 0x%X\n",
+				cl_ntoh32(ib_node_info_get_vendor_id
+					  (&p_node->rec.node_info)));
 			break;
 
 		case OSMTEST_TOKEN_END:
@@ -6646,8 +6257,7 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 			break;
 
 		default:
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_node: ERR 0121: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0121: "
 				"Ignoring line %u with unknown token: %s\n",
 				*p_line_num, &line[offset]);
 
@@ -6660,8 +6270,7 @@ osmtest_parse_node(IN osmtest_t * const p_osmt,
 	 * add this object to the database.
 	 */
 	if (p_node->comp.lid == 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_parse_node: ERR 0122: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0122: "
 			"LID must be specified for defined nodes\n");
 		node_delete(p_node);
 		goto Exit;
@@ -6710,8 +6319,7 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			/*
 			 * End of file in the middle of a definition.
 			 */
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_port: ERR 0123: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0123: "
 				"Unexpected end of file\n");
 			status = IB_ERROR;
 			goto Exit;
@@ -6728,19 +6336,14 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 
 		p_tok = str_get_token(&line[offset]);
 		if (p_tok == NULL) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_port: ERR 0124: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0124: "
 				"Ignoring line %u with unknown token: %s\n",
 				*p_line_num, &line[offset]);
 			continue;
 		}
 
-		if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-			osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-				"osmtest_parse_port: "
-				"Found '%s' (line %u)\n", p_tok->str,
-				*p_line_num);
-		}
+		OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+			"Found '%s' (line %u)\n", p_tok->str, *p_line_num);
 
 		str_skip_token(line, &offset);
 
@@ -6753,36 +6356,25 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			p_port->rec.lid =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"lid = 0x%X\n",
-					cl_ntoh16(p_port->rec.lid));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "lid = 0x%X\n",
+				cl_ntoh16(p_port->rec.lid));
 			break;
 
 		case OSMTEST_TOKEN_PORT_NUM:
 			p_port->comp.port_num = 0xFF;
 			p_port->rec.port_num =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"port_num = 0x%u\n",
-					p_port->rec.port_num);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"port_num = 0x%u\n", p_port->rec.port_num);
 			break;
 
 		case OSMTEST_TOKEN_MKEY:
 			p_port->comp.port_info.m_key = 0xFFFFFFFFFFFFFFFFULL;
 			p_port->rec.port_info.m_key =
 			    cl_hton64(strtoull(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"m_key = 0x%016" PRIx64 "\n",
-					cl_ntoh64(p_port->rec.port_info.m_key));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"m_key = 0x%016" PRIx64 "\n",
+				cl_ntoh64(p_port->rec.port_info.m_key));
 			break;
 
 		case OSMTEST_TOKEN_SUBN_PREF:
@@ -6790,13 +6382,9 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			    0xFFFFFFFFFFFFFFFFULL;
 			p_port->rec.port_info.subnet_prefix =
 			    cl_hton64(strtoull(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"subnet_prefix = 0x%016" PRIx64 "\n",
-					cl_ntoh64(p_port->rec.port_info.
-						  subnet_prefix));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"subnet_prefix = 0x%016" PRIx64 "\n",
+				cl_ntoh64(p_port->rec.port_info.subnet_prefix));
 			break;
 
 		case OSMTEST_TOKEN_BASE_LID:
@@ -6804,13 +6392,9 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			p_port->rec.port_info.base_lid =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"base_lid = 0x%X\n",
-					cl_ntoh16(p_port->rec.port_info.
-						  base_lid));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"base_lid = 0x%X\n",
+				cl_ntoh16(p_port->rec.port_info.base_lid));
 			break;
 
 		case OSMTEST_TOKEN_SM_BASE_LID:
@@ -6818,13 +6402,9 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			p_port->rec.port_info.master_sm_base_lid =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"master_sm_base_lid = 0x%X\n",
-					cl_ntoh16(p_port->rec.port_info.
-						  master_sm_base_lid));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"master_sm_base_lid = 0x%X\n",
+				cl_ntoh16(p_port->rec.port_info.master_sm_base_lid));
 			break;
 
 		case OSMTEST_TOKEN_CAP_MASK:
@@ -6832,13 +6412,9 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			p_port->rec.port_info.capability_mask =
 			    cl_hton32((uint32_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"capability_mask = 0x%X\n",
-					cl_ntoh32(p_port->rec.port_info.
-						  capability_mask));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"capability_mask = 0x%X\n",
+				cl_ntoh32(p_port->rec.port_info.capability_mask));
 			break;
 
 		case OSMTEST_TOKEN_DIAG_CODE:
@@ -6846,13 +6422,9 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			p_port->rec.port_info.diag_code =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"diag_code = 0x%X\n",
-					cl_ntoh16(p_port->rec.port_info.
-						  diag_code));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"diag_code = 0x%X\n",
+				cl_ntoh16(p_port->rec.port_info.diag_code));
 			break;
 
 		case OSMTEST_TOKEN_MKEY_LEASE_PER:
@@ -6860,64 +6432,45 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			p_port->rec.port_info.m_key_lease_period =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"m_key_lease_period = 0x%X\n",
-					cl_ntoh16(p_port->rec.port_info.
-						  m_key_lease_period));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"m_key_lease_period = 0x%X\n",
+				cl_ntoh16(p_port->rec.port_info.m_key_lease_period));
 			break;
 
 		case OSMTEST_TOKEN_LOC_PORT_NUM:
 			p_port->comp.port_info.local_port_num = 0xFF;
 			p_port->rec.port_info.local_port_num =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"local_port_num = 0x%u\n",
-					p_port->rec.port_info.local_port_num);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"local_port_num = 0x%u\n",
+				p_port->rec.port_info.local_port_num);
 			break;
 
 		case OSMTEST_TOKEN_LINK_WID_EN:
 			p_port->comp.port_info.link_width_enabled = 0xFF;
 			p_port->rec.port_info.link_width_enabled =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"link_width_enabled = 0x%u\n",
-					p_port->rec.port_info.
-					link_width_enabled);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"link_width_enabled = 0x%u\n",
+				p_port->rec.port_info.link_width_enabled);
 			break;
 
 		case OSMTEST_TOKEN_LINK_WID_SUP:
 			p_port->comp.port_info.link_width_supported = 0xFF;
 			p_port->rec.port_info.link_width_supported =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"link_width_supported = 0x%u\n",
-					p_port->rec.port_info.
-					link_width_supported);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"link_width_supported = 0x%u\n",
+				p_port->rec.port_info.link_width_supported);
 			break;
 
 		case OSMTEST_TOKEN_LINK_WID_ACT:
 			p_port->comp.port_info.link_width_active = 0xFF;
 			p_port->rec.port_info.link_width_active =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"link_width_active = 0x%u\n",
-					p_port->rec.port_info.
-					link_width_active);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"link_width_active = 0x%u\n",
+				p_port->rec.port_info.link_width_active);
 			break;
 
 		case OSMTEST_TOKEN_LINK_SPEED_SUP:
@@ -6926,13 +6479,9 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 							strtoul(&line[offset],
 								NULL, 0),
 							&p_port->rec.port_info);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"link_speed_supported = 0x%u\n",
-					ib_port_info_get_link_speed_sup
-					(&p_port->rec.port_info));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"link_speed_supported = 0x%u\n",
+				ib_port_info_get_link_speed_sup(&p_port->rec.port_info));
 			break;
 
 		case OSMTEST_TOKEN_PORT_STATE:
@@ -6941,26 +6490,18 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			ib_port_info_set_port_state(&p_port->rec.port_info,
 						    ib_get_port_state_from_str
 						    (&line[offset]));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"port_state = 0x%u\n",
-					ib_port_info_get_port_state(&p_port->
-								    rec.
-								    port_info));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"port_state = 0x%u\n",
+				ib_port_info_get_port_state(&p_port->rec.port_info));
 			break;
 
 		case OSMTEST_TOKEN_STATE_INFO2:
 			p_port->comp.port_info.state_info2 = 0xFF;
 			p_port->rec.port_info.state_info2 =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"state_info2 = 0x%u\n",
-					p_port->rec.port_info.state_info2);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"state_info2 = 0x%u\n",
+				p_port->rec.port_info.state_info2);
 			break;
 
 		case OSMTEST_TOKEN_MKEY_PROT_BITS:
@@ -6968,13 +6509,8 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			ib_port_info_set_mpb(&p_port->rec.port_info,
 					     (uint8_t) strtoul(&line[offset],
 							       NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"mpb = 0x%u\n",
-					ib_port_info_get_mpb(&p_port->rec.
-							     port_info));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "mpb = 0x%u\n",
+				ib_port_info_get_mpb(&p_port->rec.port_info));
 			break;
 
 		case OSMTEST_TOKEN_LMC:
@@ -6982,122 +6518,87 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			ib_port_info_set_lmc(&p_port->rec.port_info,
 					     (uint8_t) strtoul(&line[offset],
 							       NULL, 0));
-
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"lmc = 0x%u\n",
-					ib_port_info_get_lmc(&p_port->rec.
-							     port_info));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "lmc = 0x%u\n",
+				ib_port_info_get_lmc(&p_port->rec.port_info));
 			break;
 
 		case OSMTEST_TOKEN_LINK_SPEED:
 			p_port->comp.port_info.link_speed = 0xFF;
 			p_port->rec.port_info.link_speed =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"link_speed = 0x%u\n",
-					p_port->rec.port_info.link_speed);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"link_speed = 0x%u\n",
+				p_port->rec.port_info.link_speed);
 			break;
 
 		case OSMTEST_TOKEN_MTU_SMSL:
 			p_port->comp.port_info.mtu_smsl = 0xFF;
 			p_port->rec.port_info.mtu_smsl =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"mtu_smsl = 0x%u\n",
-					p_port->rec.port_info.mtu_smsl);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"mtu_smsl = 0x%u\n",
+				p_port->rec.port_info.mtu_smsl);
 			break;
 
 		case OSMTEST_TOKEN_VL_CAP:
 			p_port->comp.port_info.vl_cap = 0xFF;
 			p_port->rec.port_info.vl_cap =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"vl_cap = 0x%u\n",
-					p_port->rec.port_info.vl_cap);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "vl_cap = 0x%u\n",
+				p_port->rec.port_info.vl_cap);
 			break;
 
 		case OSMTEST_TOKEN_VL_HIGH_LIMIT:
 			p_port->comp.port_info.vl_high_limit = 0xFF;
 			p_port->rec.port_info.vl_high_limit =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"vl_high_limit = 0x%u\n",
-					p_port->rec.port_info.vl_high_limit);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"vl_high_limit = 0x%u\n",
+				p_port->rec.port_info.vl_high_limit);
 			break;
 
 		case OSMTEST_TOKEN_VL_ARB_HIGH_CAP:
 			p_port->comp.port_info.vl_arb_high_cap = 0xFF;
 			p_port->rec.port_info.vl_arb_high_cap =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"vl_arb_high_cap = 0x%u\n",
-					p_port->rec.port_info.vl_arb_high_cap);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"vl_arb_high_cap = 0x%u\n",
+				p_port->rec.port_info.vl_arb_high_cap);
 			break;
 
 		case OSMTEST_TOKEN_VL_ARB_LOW_CAP:
 			p_port->comp.port_info.vl_arb_low_cap = 0xFF;
 			p_port->rec.port_info.vl_arb_low_cap =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"vl_arb_low_cap = 0x%u\n",
-					p_port->rec.port_info.vl_arb_low_cap);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"vl_arb_low_cap = 0x%u\n",
+				p_port->rec.port_info.vl_arb_low_cap);
 			break;
 
 		case OSMTEST_TOKEN_MTU_CAP:
 			p_port->comp.port_info.mtu_cap = 0xFF;
 			p_port->rec.port_info.mtu_cap =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"mtu_cap = 0x%u\n",
-					p_port->rec.port_info.mtu_cap);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "mtu_cap = 0x%u\n",
+				p_port->rec.port_info.mtu_cap);
 			break;
 
 		case OSMTEST_TOKEN_VL_STALL_LIFE:
 			p_port->comp.port_info.vl_stall_life = 0xFF;
 			p_port->rec.port_info.vl_stall_life =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"vl_stall_life = 0x%u\n",
-					p_port->rec.port_info.vl_stall_life);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"vl_stall_life = 0x%u\n",
+				p_port->rec.port_info.vl_stall_life);
 			break;
 
 		case OSMTEST_TOKEN_VL_ENFORCE:
 			p_port->comp.port_info.vl_enforce = 0xFF;
 			p_port->rec.port_info.vl_enforce =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"vl_enforce = 0x%u\n",
-					p_port->rec.port_info.vl_enforce);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"vl_enforce = 0x%u\n",
+				p_port->rec.port_info.vl_enforce);
 			break;
 
 		case OSMTEST_TOKEN_MKEY_VIOL:
@@ -7105,13 +6606,9 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			p_port->rec.port_info.m_key_violations =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"m_key_violations = 0x%X\n",
-					cl_ntoh16(p_port->rec.port_info.
-						  m_key_violations));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"m_key_violations = 0x%X\n",
+				cl_ntoh16(p_port->rec.port_info.m_key_violations));
 			break;
 
 		case OSMTEST_TOKEN_PKEY_VIOL:
@@ -7119,13 +6616,9 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			p_port->rec.port_info.p_key_violations =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"p_key_violations = 0x%X\n",
-					cl_ntoh16(p_port->rec.port_info.
-						  p_key_violations));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"p_key_violations = 0x%X\n",
+				cl_ntoh16(p_port->rec.port_info.p_key_violations));
 			break;
 
 		case OSMTEST_TOKEN_QKEY_VIOL:
@@ -7133,62 +6626,45 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			p_port->rec.port_info.q_key_violations =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"q_key_violations = 0x%X\n",
-					cl_ntoh16(p_port->rec.port_info.
-						  q_key_violations));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"q_key_violations = 0x%X\n",
+				cl_ntoh16(p_port->rec.port_info.q_key_violations));
 			break;
 
 		case OSMTEST_TOKEN_GUID_CAP:
 			p_port->comp.port_info.guid_cap = 0xFF;
 			p_port->rec.port_info.guid_cap =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"guid_cap = 0x%u\n",
-					p_port->rec.port_info.guid_cap);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"guid_cap = 0x%u\n",
+				p_port->rec.port_info.guid_cap);
 			break;
 
 		case OSMTEST_TOKEN_SUBN_TIMEOUT:
 			p_port->comp.port_info.subnet_timeout = 0x1F;
 			p_port->rec.port_info.subnet_timeout =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"subnet_timeout = 0x%u\n",
-					ib_port_info_get_timeout(&p_port->rec.
-								 port_info));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"subnet_timeout = 0x%u\n",
+				ib_port_info_get_timeout(&p_port->rec.port_info));
 			break;
 
 		case OSMTEST_TOKEN_RESP_TIME_VAL:
 			p_port->comp.port_info.resp_time_value = 0xFF;
 			p_port->rec.port_info.resp_time_value =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"resp_time_value = 0x%u\n",
-					p_port->rec.port_info.resp_time_value);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"resp_time_value = 0x%u\n",
+				p_port->rec.port_info.resp_time_value);
 			break;
 
 		case OSMTEST_TOKEN_ERR_THRESHOLD:
 			p_port->comp.port_info.error_threshold = 0xFF;
 			p_port->rec.port_info.error_threshold =
 			    (uint8_t) strtoul(&line[offset], NULL, 0);
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_port: "
-					"error_threshold = 0x%u\n",
-					p_port->rec.port_info.error_threshold);
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"error_threshold = 0x%u\n",
+				p_port->rec.port_info.error_threshold);
 			break;
 
 		case OSMTEST_TOKEN_END:
@@ -7196,8 +6672,7 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 			break;
 
 		default:
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_port: ERR 0125: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0125: "
 				"Ignoring line %u with unknown token: %s\n",
 				*p_line_num, &line[offset]);
 			break;
@@ -7209,8 +6684,7 @@ osmtest_parse_port(IN osmtest_t * const p_osmt,
 	 * add this object to the database.
 	 */
 	if (p_port->comp.lid == 0) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_parse_port: ERR 0126: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0126: "
 			"LID must be specified for defined ports\n");
 		port_delete(p_port);
 		status = IB_ERROR;
@@ -7253,8 +6727,7 @@ osmtest_parse_path(IN osmtest_t * const p_osmt,
 			/*
 			 * End of file in the middle of a definition.
 			 */
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_path: ERR 0127: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0127: "
 				"Unexpected end of file\n");
 			status = IB_ERROR;
 			goto Exit;
@@ -7271,20 +6744,15 @@ osmtest_parse_path(IN osmtest_t * const p_osmt,
 
 		p_tok = str_get_token(&line[offset]);
 		if (p_tok == NULL) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_path: ERR 0128: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0128: "
 				"Ignoring line %u with unknown token: %s\n",
 				*p_line_num, &line[offset]);
 			got_error = TRUE;
 			continue;
 		}
 
-		if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-			osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-				"osmtest_parse_path: "
-				"Found '%s' (line %u)\n", p_tok->str,
-				*p_line_num);
-		}
+		OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+			"Found '%s' (line %u)\n", p_tok->str, *p_line_num);
 
 		str_skip_token(line, &offset);
 
@@ -7305,16 +6773,10 @@ osmtest_parse_path(IN osmtest_t * const p_osmt,
 			p_path->rec.dgid.unicast.interface_id =
 			    cl_hton64(strtoull(&line[offset], NULL, 0));
 
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_path: "
-					"dgid = 0x%016" PRIx64 " 0x%016" PRIx64
-					"\n",
-					cl_ntoh64(p_path->rec.dgid.unicast.
-						  prefix),
-					cl_ntoh64(p_path->rec.dgid.unicast.
-						  interface_id));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"dgid = 0x%016" PRIx64 " 0x%016" PRIx64 "\n",
+				cl_ntoh64(p_path->rec.dgid.unicast.prefix),
+				cl_ntoh64(p_path->rec.dgid.unicast.interface_id));
 			break;
 
 		case OSMTEST_TOKEN_SGID:
@@ -7330,16 +6792,10 @@ osmtest_parse_path(IN osmtest_t * const p_osmt,
 			p_path->rec.sgid.unicast.interface_id =
 			    cl_hton64(strtoull(&line[offset], NULL, 0));
 
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_path: "
-					"sgid = 0x%016" PRIx64 " 0x%016" PRIx64
-					"\n",
-					cl_ntoh64(p_path->rec.sgid.unicast.
-						  prefix),
-					cl_ntoh64(p_path->rec.sgid.unicast.
-						  interface_id));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+				"sgid = 0x%016" PRIx64 " 0x%016" PRIx64 "\n",
+				cl_ntoh64(p_path->rec.sgid.unicast.prefix),
+				cl_ntoh64(p_path->rec.sgid.unicast.interface_id));
 			break;
 
 		case OSMTEST_TOKEN_DLID:
@@ -7347,12 +6803,8 @@ osmtest_parse_path(IN osmtest_t * const p_osmt,
 			p_path->rec.dlid =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_path: "
-					"dlid = 0x%X\n",
-					cl_ntoh16(p_path->rec.dlid));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "dlid = 0x%X\n",
+				cl_ntoh16(p_path->rec.dlid));
 			break;
 
 		case OSMTEST_TOKEN_SLID:
@@ -7360,12 +6812,8 @@ osmtest_parse_path(IN osmtest_t * const p_osmt,
 			p_path->rec.slid =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_path: "
-					"slid = 0x%X\n",
-					cl_ntoh16(p_path->rec.slid));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "slid = 0x%X\n",
+				cl_ntoh16(p_path->rec.slid));
 			break;
 
 		case OSMTEST_TOKEN_PKEY:
@@ -7373,12 +6821,8 @@ osmtest_parse_path(IN osmtest_t * const p_osmt,
 			p_path->rec.pkey =
 			    cl_hton16((uint16_t)
 				      strtoul(&line[offset], NULL, 0));
-			if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-				osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-					"osmtest_parse_path: "
-					"pkey = 0x%X\n",
-					cl_ntoh16(p_path->rec.pkey));
-			}
+			OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "pkey = 0x%X\n",
+				cl_ntoh16(p_path->rec.pkey));
 			break;
 
 		case OSMTEST_TOKEN_END:
@@ -7386,8 +6830,7 @@ osmtest_parse_path(IN osmtest_t * const p_osmt,
 			break;
 
 		default:
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_path: ERR 0129: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0129: "
 				"Ignoring line %u with unknown token: %s\n",
 				*p_line_num, &line[offset]);
 			got_error = TRUE;
@@ -7441,8 +6884,7 @@ osmtest_parse_link(IN osmtest_t * const p_osmt,
 			/*
 			 * End of file in the middle of a definition.
 			 */
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_link: ERR 012A: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 012A: "
 				"Unexpected end of file\n");
 			status = IB_ERROR;
 			goto Exit;
@@ -7459,20 +6901,15 @@ osmtest_parse_link(IN osmtest_t * const p_osmt,
 
 		p_tok = str_get_token(&line[offset]);
 		if (p_tok == NULL) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_link: ERR 012B: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 012B: "
 				"Ignoring line %u with unknown token: %s\n",
 				*p_line_num, &line[offset]);
 			got_error = TRUE;
 			continue;
 		}
 
-		if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-			osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-				"osmtest_parse_link: "
-				"Found '%s' (line %u)\n", p_tok->str,
-				*p_line_num);
-		}
+		OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+			"Found '%s' (line %u)\n", p_tok->str, *p_line_num);
 
 		str_skip_token(line, &offset);
 
@@ -7489,8 +6926,7 @@ osmtest_parse_link(IN osmtest_t * const p_osmt,
 			break;
 
 		default:
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_parse_link: ERR 012C: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 012C: "
 				"Ignoring line %u with unknown token: %s\n",
 				*p_line_num, &line[offset]);
 			got_error = TRUE;
@@ -7522,8 +6958,7 @@ static ib_api_status_t osmtest_create_db(IN osmtest_t * const p_osmt)
 
 	fh = fopen(p_osmt->opt.file_name, "r");
 	if (fh == NULL) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_create_db: ERR 0130: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0130: "
 			"Unable to open inventory file (%s)\n",
 			p_osmt->opt.file_name);
 		status = IB_ERROR;
@@ -7545,19 +6980,15 @@ static ib_api_status_t osmtest_create_db(IN osmtest_t * const p_osmt)
 
 		p_tok = str_get_token(&line[offset]);
 		if (p_tok == NULL) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_create_db: ERR 0131: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0131: "
 				"Ignoring line %u: %s\n", line_num,
 				&line[offset]);
 			got_error = TRUE;
 			continue;
 		}
 
-		if (osm_log_is_active(&p_osmt->log, OSM_LOG_DEBUG)) {
-			osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-				"osmtest_create_db: "
-				"Found '%s' (line %u)\n", p_tok->str, line_num);
-		}
+		OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
+			"Found '%s' (line %u)\n", p_tok->str, line_num);
 
 		switch (p_tok->val) {
 		case OSMTEST_TOKEN_COMMENT:
@@ -7580,8 +7011,7 @@ static ib_api_status_t osmtest_create_db(IN osmtest_t * const p_osmt)
 			break;
 
 		default:
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_create_db: ERR 0132: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0132: "
 				"Ignoring line %u: %s\n", line_num,
 				&line[offset]);
 			got_error = TRUE;
@@ -7592,8 +7022,7 @@ static ib_api_status_t osmtest_create_db(IN osmtest_t * const p_osmt)
 			status = IB_ERROR;
 
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_create_db: ERR 0133: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0133: "
 				"Bad status received during parsing (%s)\n",
 				ib_get_err_str(status));
 			fclose(fh);
@@ -7677,8 +7106,7 @@ osmtest_bind(IN osmtest_t * p_osmt,
 	status = osm_vendor_get_all_port_attr(p_osmt->p_vendor,
 					      attr_array, &num_ports);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_bind: ERR 0134: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0134: "
 			"Failure getting local port attributes (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -7693,8 +7121,7 @@ osmtest_bind(IN osmtest_t * p_osmt,
 		    osmtest_get_user_port(p_osmt, attr_array, num_ports);
 
 		if (num_ports == 0) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_bind: ERR 0135: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0135: "
 				"No local ports.  Unable to proceed\n");
 			goto Exit;
 		}
@@ -7706,8 +7133,7 @@ osmtest_bind(IN osmtest_t * p_osmt,
 		}
 
 		if (port_index == num_ports) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_bind: ERR 0136: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0136: "
 				"No local port with guid 0x%016" PRIx64 "\n",
 				cl_ntoh64(guid));
 			status = IB_NOT_FOUND;
@@ -7722,8 +7148,7 @@ osmtest_bind(IN osmtest_t * p_osmt,
 	       sizeof(p_osmt->local_port));
 
 	/* bind to the SA */
-	osm_log(&p_osmt->log, OSM_LOG_DEBUG,
-		"osmtest_bind: "
+	OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG,
 		"Using port with SM LID:0x%04X\n", p_osmt->local_port.sm_lid);
 	p_osmt->max_lid = max_lid;
 
@@ -7731,8 +7156,8 @@ osmtest_bind(IN osmtest_t * p_osmt,
 	    osmv_bind_sa(p_osmt->p_vendor, &p_osmt->mad_pool, guid);
 
 	if (p_osmt->h_bind == OSM_BIND_INVALID_HANDLE) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_bind: ERR 0137: " "Unable to bind to SA\n");
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0137: "
+			"Unable to bind to SA\n");
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -7752,8 +7177,7 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 
 	status = osmtest_validate_sa_class_port_info(p_osmt);
 	if (status != IB_SUCCESS) {
-		osm_log(&p_osmt->log, OSM_LOG_ERROR,
-			"osmtest_run: ERR 0138: "
+		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0138: "
 			"Could not obtain SA ClassPortInfo (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -7765,8 +7189,7 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 		 */
 		status = osmtest_create_inventory_file(p_osmt);
 		if (status != IB_SUCCESS) {
-			osm_log(&p_osmt->log, OSM_LOG_ERROR,
-				"osmtest_run: ERR 0139: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0139: "
 				"Inventory file create failed (%s)\n",
 				ib_get_err_str(status));
 			goto Exit;
@@ -7781,8 +7204,8 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 			case 1:	/* small response SA query stress */
 				status = osmtest_stress_small_rmpp(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0140: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0140: "
 						"Small RMPP stress test failed (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
@@ -7791,8 +7214,8 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 			case 2:	/* large response SA query stress */
 				status = osmtest_stress_large_rmpp(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0141: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0141: "
 						"Large RMPP stress test failed (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
@@ -7801,8 +7224,8 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 			case 3:	/* large response Path Record SA query stress */
 				status = osmtest_create_db(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0142: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0142: "
 						"Database creation failed (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
@@ -7810,16 +7233,16 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 
 				status = osmtest_stress_large_rmpp_pr(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0143: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0143: "
 						"Large RMPP stress test failed (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
 				}
 				break;
 			default:
-				osm_log(&p_osmt->log, OSM_LOG_ERROR,
-					"osmtest_run: ERR 0144: "
+				OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+					"ERR 0144: "
 					"Unknown stress test value %u\n",
 					p_osmt->opt.stress);
 				break;
@@ -7836,8 +7259,8 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 				 */
 				status = osmtest_create_db(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0145: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0145: "
 						"Database creation failed (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
@@ -7845,8 +7268,8 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 
 				status = osmtest_validate_against_db(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0146: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0146: "
 						"SA validation database failure (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
@@ -7856,8 +7279,8 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 			if (p_osmt->opt.flow == OSMT_FLOW_ALL) {
 				status = osmtest_wrong_sm_key_ignored(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0147: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0147: "
 						"Try wrong SM_Key failed (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
@@ -7872,8 +7295,8 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 				 */
 				status = osmt_run_service_records_flow(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0148: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0148: "
 						"Service Flow failed (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
@@ -7889,15 +7312,15 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 				status = osmt_run_inform_info_flow(p_osmt);
 
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0149: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0149: "
 						"Inform Info Flow failed: (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
 				}
 #else
-				osm_log(&p_osmt->log, OSM_LOG_INFO,
-					"osmtest_run: The event forwarding flow "
+				OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+					"The event forwarding flow "
 					"is not implemented yet!\n");
 				status = IB_SUCCESS;
 				goto Exit;
@@ -7912,8 +7335,8 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 				 */
 				status = osmtest_create_db(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 014A: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 014A: "
 						"Database creation failed (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
@@ -7923,8 +7346,8 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 				    osmt_run_slvl_and_vlarb_records_flow
 				    (p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0150: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0150: "
 						"Failed to get SLtoVL and VL Arbitration Tables (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
@@ -7938,15 +7361,15 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 #ifdef OSM_VENDOR_INTF_MTL
 				status = osmt_run_trap64_65_flow(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0151: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0151: "
 						"Trap 64/65 Flow failed: (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
 				}
 #else
-				osm_log(&p_osmt->log, OSM_LOG_INFO,
-					"osmtest_run: The event forwarding flow "
+				OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+					"The event forwarding flow "
 					"is not implemented yet!\n");
 				status = IB_SUCCESS;
 				goto Exit;
@@ -7960,16 +7383,15 @@ ib_api_status_t osmtest_run(IN osmtest_t * const p_osmt)
 				 */
 				status = osmt_run_mcast_flow(p_osmt);
 				if (status != IB_SUCCESS) {
-					osm_log(&p_osmt->log, OSM_LOG_ERROR,
-						"osmtest_run: ERR 0152: "
+					OSM_LOG(&p_osmt->log, OSM_LOG_ERROR,
+						"ERR 0152: "
 						"Multicast Flow failed: (%s)\n",
 						ib_get_err_str(status));
 					goto Exit;
 				}
 			}
 
-			osm_log(&p_osmt->log, OSM_LOG_INFO,
-				"osmtest_run: "
+			OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
 				"\n\n***************** ALL TESTS PASS *****************\n\n");
 
 		}
-- 
1.5.5.1.178.g1f811




More information about the general mailing list