summaryrefslogtreecommitdiff
path: root/source4/lib/messaging/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 21:25:06 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:42 +0100
commit2f8dc4f48f1802baa3405e7803563f6840e0d1b3 (patch)
treea479c7df067cb698134616bc6be8fa2fd76c7452 /source4/lib/messaging/tests
parentc9f0011bc57e6536f4ec130784d15609e71aa694 (diff)
downloadsamba-2f8dc4f48f1802baa3405e7803563f6840e0d1b3.tar.gz
samba-2f8dc4f48f1802baa3405e7803563f6840e0d1b3.tar.bz2
samba-2f8dc4f48f1802baa3405e7803563f6840e0d1b3.zip
r26266: Remove more global_loadparm uses.
(This used to be commit 99113075c4a96679bcec4f4d6bba4acb3dee4245)
Diffstat (limited to 'source4/lib/messaging/tests')
-rw-r--r--source4/lib/messaging/tests/irpc.c4
-rw-r--r--source4/lib/messaging/tests/messaging.c13
2 files changed, 8 insertions, 9 deletions
diff --git a/source4/lib/messaging/tests/irpc.c b/source4/lib/messaging/tests/irpc.c
index aae6b4882e..28676c21c7 100644
--- a/source4/lib/messaging/tests/irpc.c
+++ b/source4/lib/messaging/tests/irpc.c
@@ -215,12 +215,12 @@ static bool irpc_setup(struct torture_context *tctx, void **_data)
*_data = data = talloc(tctx, struct irpc_test_data);
- lp_set_cmdline(global_loadparm, "pid directory", "piddir.tmp");
+ lp_set_cmdline(tctx->lp_ctx, "pid directory", "piddir.tmp");
data->ev = tctx->ev;
torture_assert(tctx, data->msg_ctx1 =
messaging_init(tctx,
- lp_messaging_path(tctx, global_loadparm),
+ lp_messaging_path(tctx, tctx->lp_ctx),
cluster_id(MSG_ID1), data->ev),
"Failed to init first messaging context");
diff --git a/source4/lib/messaging/tests/messaging.c b/source4/lib/messaging/tests/messaging.c
index bf2b83a0e4..ba3d2f91d6 100644
--- a/source4/lib/messaging/tests/messaging.c
+++ b/source4/lib/messaging/tests/messaging.c
@@ -66,23 +66,22 @@ static bool test_ping_speed(struct torture_context *tctx)
struct timeval tv;
int timelimit = torture_setting_int(tctx, "timelimit", 10);
uint32_t msg_ping, msg_exit;
- TALLOC_CTX *mem_ctx = tctx;
- lp_set_cmdline(global_loadparm, "pid directory", "piddir.tmp");
+ lp_set_cmdline(tctx->lp_ctx, "pid directory", "piddir.tmp");
ev = tctx->ev;
- msg_server_ctx = messaging_init(mem_ctx,
- lp_messaging_path(tctx, global_loadparm),
+ msg_server_ctx = messaging_init(tctx,
+ lp_messaging_path(tctx, tctx->lp_ctx),
cluster_id(1), ev);
torture_assert(tctx, msg_server_ctx != NULL, "Failed to init ping messaging context");
messaging_register_tmp(msg_server_ctx, NULL, ping_message, &msg_ping);
- messaging_register_tmp(msg_server_ctx, mem_ctx, exit_message, &msg_exit);
+ messaging_register_tmp(msg_server_ctx, tctx, exit_message, &msg_exit);
- msg_client_ctx = messaging_init(mem_ctx,
- lp_messaging_path(mem_ctx, global_loadparm),
+ msg_client_ctx = messaging_init(tctx,
+ lp_messaging_path(tctx, tctx->lp_ctx),
cluster_id(2), ev);
torture_assert(tctx, msg_client_ctx != NULL,