summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-10-01 18:52:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:34 -0500
commit2f3551ca7cee59d4d053cceb87abdf1da1b3a1ad (patch)
tree2d02f6e998c150cca5323e574ffb8094fffc288f /source4/torture
parent4d7273715f109db82a4ee4852855927a32bb4073 (diff)
downloadsamba-2f3551ca7cee59d4d053cceb87abdf1da1b3a1ad.tar.gz
samba-2f3551ca7cee59d4d053cceb87abdf1da1b3a1ad.tar.bz2
samba-2f3551ca7cee59d4d053cceb87abdf1da1b3a1ad.zip
r25446: Merge some changes I made on the way home from SFO:
2007-09-29 More higher-level passing around of lp_ctx. 2007-09-29 Fix warning. 2007-09-29 Pass loadparm contexts on a higher level. 2007-09-29 Avoid using global loadparm context. (This used to be commit 3468952e771ab31f90b6c374ade01c5550810f42)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/ldap/schema.c4
-rw-r--r--source4/torture/ldap/uptodatevector.c4
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c6
-rw-r--r--source4/torture/local/dbspeed.c3
-rw-r--r--source4/torture/local/irpc.c2
-rw-r--r--source4/torture/local/messaging.c11
-rw-r--r--source4/torture/rpc/spoolss.c2
-rw-r--r--source4/torture/torture.c2
-rw-r--r--source4/torture/winbind/struct_based.c3
9 files changed, 25 insertions, 12 deletions
diff --git a/source4/torture/ldap/schema.c b/source4/torture/ldap/schema.c
index f754880d0b..4da758cac4 100644
--- a/source4/torture/ldap/schema.c
+++ b/source4/torture/ldap/schema.c
@@ -31,6 +31,8 @@
#include "torture/torture.h"
#include "torture/ldap/proto.h"
+#include "param/param.h"
+
struct test_rootDSE {
const char *defaultdn;
const char *rootdn;
@@ -374,7 +376,7 @@ BOOL torture_ldap_schema(struct torture_context *torture)
url = talloc_asprintf(torture, "ldap://%s/", host);
- ldb = ldb_wrap_connect(torture, url,
+ ldb = ldb_wrap_connect(torture, global_loadparm, url,
NULL,
cmdline_credentials,
0, NULL);
diff --git a/source4/torture/ldap/uptodatevector.c b/source4/torture/ldap/uptodatevector.c
index 0ff9948cad..f8d00eaa4d 100644
--- a/source4/torture/ldap/uptodatevector.c
+++ b/source4/torture/ldap/uptodatevector.c
@@ -34,6 +34,8 @@
#include "librpc/ndr/libndr.h"
#include "librpc/gen_ndr/ndr_drsblobs.h"
+#include "param/param.h"
+
static bool test_check_uptodatevector(struct torture_context *torture,
struct ldb_context *ldb,
struct ldb_dn *partition_dn)
@@ -158,7 +160,7 @@ BOOL torture_ldap_uptodatevector(struct torture_context *torture)
url = talloc_asprintf(torture, "ldap://%s/", host);
if (!url) goto failed;
- ldb = ldb_wrap_connect(torture, url,
+ ldb = ldb_wrap_connect(torture, global_loadparm, url,
NULL,
cmdline_credentials,
0, NULL);
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index c5372eff08..5738e5c620 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -256,7 +256,7 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data,
DEBUG(0,("Open the SAM LDB with system credentials: %s\n", s->path.samdb_ldb));
- s->ldb = ldb_wrap_connect(s, s->path.samdb_ldb,
+ s->ldb = ldb_wrap_connect(s, global_loadparm, s->path.samdb_ldb,
system_session(s),
NULL, 0, NULL);
if (!s->ldb) {
@@ -484,7 +484,7 @@ static NTSTATUS test_apply_schema(struct test_become_dc_state *s,
s->schema = NULL;
DEBUG(0,("Reopen the SAM LDB with system credentials and a already stored schema: %s\n", s->path.samdb_ldb));
- s->ldb = ldb_wrap_connect(s, s->path.samdb_ldb,
+ s->ldb = ldb_wrap_connect(s, global_loadparm, s->path.samdb_ldb,
system_session(s),
NULL, 0, NULL);
if (!s->ldb) {
@@ -817,7 +817,7 @@ BOOL torture_net_become_dc(struct torture_context *torture)
s->schema = NULL;
DEBUG(0,("Reopen the SAM LDB with system credentials and all replicated data: %s\n", s->path.samdb_ldb));
- s->ldb = ldb_wrap_connect(s, s->path.samdb_ldb,
+ s->ldb = ldb_wrap_connect(s, global_loadparm, s->path.samdb_ldb,
system_session(s),
NULL, 0, NULL);
if (!s->ldb) {
diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c
index fb4e5c3c3a..b6c1a43d48 100644
--- a/source4/torture/local/dbspeed.c
+++ b/source4/torture/local/dbspeed.c
@@ -26,6 +26,7 @@
#include "lib/ldb/include/ldb_errors.h"
#include "lib/db_wrap.h"
#include "torture/torture.h"
+#include "param/param.h"
float tdb_speed;
@@ -174,7 +175,7 @@ static BOOL test_ldb_speed(struct torture_context *torture, const void *_data)
torture_comment(torture, "Testing ldb speed for sidmap\n");
- ldb = ldb_wrap_connect(tmp_ctx, "tdb://test.ldb",
+ ldb = ldb_wrap_connect(tmp_ctx, global_loadparm, "tdb://test.ldb",
NULL, NULL, LDB_FLG_NOSYNC, NULL);
if (!ldb) {
unlink("./test.ldb");
diff --git a/source4/torture/local/irpc.c b/source4/torture/local/irpc.c
index ad1b22ca6f..70f9ac1e5f 100644
--- a/source4/torture/local/irpc.c
+++ b/source4/torture/local/irpc.c
@@ -220,11 +220,13 @@ static BOOL irpc_setup(struct torture_context *tctx, void **_data)
data->ev = tctx->ev;
torture_assert(tctx, data->msg_ctx1 =
messaging_init(tctx,
+ lp_messaging_path(tctx, global_loadparm),
cluster_id(MSG_ID1), data->ev),
"Failed to init first messaging context");
torture_assert(tctx, data->msg_ctx2 =
messaging_init(tctx,
+ lp_messaging_path(tctx, global_loadparm),
cluster_id(MSG_ID2), data->ev),
"Failed to init second messaging context");
diff --git a/source4/torture/local/messaging.c b/source4/torture/local/messaging.c
index 6834c82fae..bf2b83a0e4 100644
--- a/source4/torture/local/messaging.c
+++ b/source4/torture/local/messaging.c
@@ -72,16 +72,21 @@ static bool test_ping_speed(struct torture_context *tctx)
ev = tctx->ev;
- msg_server_ctx = messaging_init(mem_ctx, cluster_id(1), ev);
+ msg_server_ctx = messaging_init(mem_ctx,
+ lp_messaging_path(tctx, global_loadparm),
+ 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);
- msg_client_ctx = messaging_init(mem_ctx, cluster_id(2), ev);
+ msg_client_ctx = messaging_init(mem_ctx,
+ lp_messaging_path(mem_ctx, global_loadparm),
+ cluster_id(2), ev);
- torture_assert(tctx, msg_client_ctx != NULL, "msg_client_ctx messaging_init() failed");
+ torture_assert(tctx, msg_client_ctx != NULL,
+ "msg_client_ctx messaging_init() failed");
messaging_register_tmp(msg_client_ctx, &pong_count, pong_message, &msg_pong);
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 0a0abc5740..278228f731 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -68,7 +68,7 @@ struct test_spoolss_context {
#endif
#define COMPARE_UINT32(tctx, c, r, e) do {\
- _CHECK_FIELD_SIZE(c, r, e,uint32_t); \
+ _CHECK_FIELD_SIZE(c, r, e, uint32_t); \
torture_assert_int_equal(tctx, c.e, r.e, "invalid value"); \
} while(0)
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 2a1e731303..44a0d3b4c2 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -65,7 +65,7 @@ struct torture_context *torture_context_init(TALLOC_CTX *mem_ctx,
int torture_init(void)
{
init_module_fn static_init[] = STATIC_torture_MODULES;
- init_module_fn *shared_init = load_samba_modules(NULL, "torture");
+ init_module_fn *shared_init = load_samba_modules(NULL, global_loadparm, "torture");
run_init_functions(static_init);
run_init_functions(shared_init);
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index a375158060..d7e7c164b6 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -141,7 +141,8 @@ static bool torture_winbind_struct_priv_pipe_dir(struct torture_context *torture
torture_assert(torture, got_dir, "NULL WINBINDD_PRIV_PIPE_DIR\n");
- default_dir = lock_path(torture, WINBINDD_PRIV_SOCKET_SUBDIR);
+ default_dir = lock_path(torture, global_loadparm,
+ WINBINDD_PRIV_SOCKET_SUBDIR);
expected_dir = torture_setting_string(torture,
"winbindd private pipe dir",
default_dir);