diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-02-29 08:48:57 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-02-29 08:48:57 +1100 |
commit | 3eef0664c59c7afef117132c1d2ebccf22ad748e (patch) | |
tree | 17f4ae2a47cc7d3bac266f5ca2033140e6a4e81e /source4/torture | |
parent | 3abf47fe87e72b18c94157c3f993b7f2fca8c248 (diff) | |
parent | 2ba62662f8e2578153be3125eb557b9349ccfd3b (diff) | |
download | samba-3eef0664c59c7afef117132c1d2ebccf22ad748e.tar.gz samba-3eef0664c59c7afef117132c1d2ebccf22ad748e.tar.bz2 samba-3eef0664c59c7afef117132c1d2ebccf22ad748e.zip |
Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local
(This used to be commit 04db9b184491415b3479fd79e1c07ba738818eb9)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/ldap/cldap.c | 4 | ||||
-rw-r--r-- | source4/torture/ldap/cldapbench.c | 2 | ||||
-rw-r--r-- | source4/torture/nbt/dgram.c | 9 | ||||
-rw-r--r-- | source4/torture/nbt/query.c | 3 | ||||
-rw-r--r-- | source4/torture/nbt/register.c | 6 | ||||
-rw-r--r-- | source4/torture/nbt/wins.c | 2 | ||||
-rw-r--r-- | source4/torture/nbt/winsbench.c | 2 | ||||
-rw-r--r-- | source4/torture/nbt/winsreplication.c | 32 | ||||
-rw-r--r-- | source4/torture/rpc/dssync.c | 2 | ||||
-rw-r--r-- | source4/torture/t_strcmp.c | 20 |
10 files changed, 34 insertions, 48 deletions
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c index 4e58059770..dbe9d2f9a4 100644 --- a/source4/torture/ldap/cldap.c +++ b/source4/torture/ldap/cldap.c @@ -38,7 +38,7 @@ */ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest) { - struct cldap_socket *cldap = cldap_socket_init(tctx, NULL); + struct cldap_socket *cldap = cldap_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); NTSTATUS status; struct cldap_netlogon search, empty_search; union nbt_cldap_netlogon n1; @@ -244,7 +244,7 @@ static void cldap_dump_results(struct cldap_search *search) */ static bool test_cldap_generic(struct torture_context *tctx, const char *dest) { - struct cldap_socket *cldap = cldap_socket_init(tctx, NULL); + struct cldap_socket *cldap = cldap_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); NTSTATUS status; struct cldap_search search; const char *attrs1[] = { "currentTime", "highestCommittedUSN", NULL }; diff --git a/source4/torture/ldap/cldapbench.c b/source4/torture/ldap/cldapbench.c index c57ed6d48a..83e505e164 100644 --- a/source4/torture/ldap/cldapbench.c +++ b/source4/torture/ldap/cldapbench.c @@ -51,7 +51,7 @@ static void request_handler(struct cldap_request *req) */ static bool bench_cldap(struct torture_context *tctx, const char *address) { - struct cldap_socket *cldap = cldap_socket_init(tctx, NULL); + struct cldap_socket *cldap = cldap_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); int num_sent=0; struct timeval tv = timeval_current(); bool ret = true; diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c index 0315989d66..e1680877e8 100644 --- a/source4/torture/nbt/dgram.c +++ b/source4/torture/nbt/dgram.c @@ -64,7 +64,8 @@ static void netlogon_handler(struct dgram_mailslot_handler *dgmslot, static bool nbt_test_netlogon(struct torture_context *tctx) { struct dgram_mailslot_handler *dgmslot; - struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL); + struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL, + lp_iconv_convenience(tctx->lp_ctx)); struct socket_address *dest; const char *myaddress; struct nbt_netlogon_packet logon; @@ -146,7 +147,8 @@ static bool nbt_test_netlogon(struct torture_context *tctx) static bool nbt_test_netlogon2(struct torture_context *tctx) { struct dgram_mailslot_handler *dgmslot; - struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL); + struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL, + lp_iconv_convenience(tctx->lp_ctx)); struct socket_address *dest; const char *myaddress; struct nbt_netlogon_packet logon; @@ -255,7 +257,8 @@ static void ntlogon_handler(struct dgram_mailslot_handler *dgmslot, static bool nbt_test_ntlogon(struct torture_context *tctx) { struct dgram_mailslot_handler *dgmslot; - struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL); + struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL, + lp_iconv_convenience(tctx->lp_ctx)); struct socket_address *dest; struct test_join *join_ctx; struct cli_credentials *machine_credentials; diff --git a/source4/torture/nbt/query.c b/source4/torture/nbt/query.c index 78210a2a07..1ba6172e5c 100644 --- a/source4/torture/nbt/query.c +++ b/source4/torture/nbt/query.c @@ -47,7 +47,8 @@ static void increment_handler(struct nbt_name_request *req) */ static bool bench_namequery(struct torture_context *tctx) { - struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL); + struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL, + lp_iconv_convenience(tctx->lp_ctx)); int num_sent=0; struct result_struct *result; struct nbt_name_query io; diff --git a/source4/torture/nbt/register.c b/source4/torture/nbt/register.c index 508c6b4840..b9f06c479d 100644 --- a/source4/torture/nbt/register.c +++ b/source4/torture/nbt/register.c @@ -44,7 +44,8 @@ static bool nbt_register_own(struct torture_context *tctx) { struct nbt_name_register io; NTSTATUS status; - struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL); + struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL, + lp_iconv_convenience(tctx->lp_ctx)); struct socket_address *socket_address; struct nbt_name name; const char *address; @@ -113,7 +114,8 @@ static bool nbt_refresh_own(struct torture_context *tctx) { struct nbt_name_refresh io; NTSTATUS status; - struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL); + struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL, + lp_iconv_convenience(tctx->lp_ctx)); const char *myaddress; struct socket_address *socket_address; struct nbt_name name; diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c index cf115fcd75..059b2dc919 100644 --- a/source4/torture/nbt/wins.c +++ b/source4/torture/nbt/wins.c @@ -53,7 +53,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address struct nbt_name_refresh_wins refresh; struct nbt_name_release release; NTSTATUS status; - struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL); + struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); const char *myaddress; struct socket_address *socket_address; struct interface *ifaces; diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c index 1488c17757..ea4abaf21b 100644 --- a/source4/torture/nbt/winsbench.c +++ b/source4/torture/nbt/winsbench.c @@ -225,7 +225,7 @@ static void generate_request(struct nbt_name_socket *nbtsock, struct wins_state */ static bool bench_wins(struct torture_context *tctx) { - struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL); + struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); int num_sent=0; struct timeval tv = timeval_current(); bool ret = true; diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c index d96ed3e931..470eee8310 100644 --- a/source4/torture/nbt/winsreplication.c +++ b/source4/torture/nbt/winsreplication.c @@ -103,14 +103,14 @@ static bool test_assoc_ctx1(struct torture_context *tctx) torture_comment(tctx, "Test if assoc_ctx is only valid on the conection it was created on\n"); - wrepl_socket1 = wrepl_socket_init(tctx, NULL); - wrepl_socket2 = wrepl_socket_init(tctx, NULL); + wrepl_socket1 = wrepl_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); + wrepl_socket2 = wrepl_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); torture_comment(tctx, "Setup 2 wrepl connections\n"); - status = wrepl_connect(wrepl_socket1, lp_resolve_context(tctx->lp_ctx), NULL, address); + status = wrepl_connect(wrepl_socket1, lp_resolve_context(tctx->lp_ctx), wrepl_best_ip(tctx->lp_ctx, address), address); CHECK_STATUS(tctx, status, NT_STATUS_OK); - status = wrepl_connect(wrepl_socket2, lp_resolve_context(tctx->lp_ctx), NULL, address); + status = wrepl_connect(wrepl_socket2, lp_resolve_context(tctx->lp_ctx), wrepl_best_ip(tctx->lp_ctx, address), address); CHECK_STATUS(tctx, status, NT_STATUS_OK); torture_comment(tctx, "Send a start association request (conn1)\n"); @@ -186,10 +186,10 @@ static bool test_assoc_ctx2(struct torture_context *tctx) torture_comment(tctx, "Test if we always get back the same assoc_ctx\n"); - wrepl_socket = wrepl_socket_init(tctx, NULL); + wrepl_socket = wrepl_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); torture_comment(tctx, "Setup wrepl connections\n"); - status = wrepl_connect(wrepl_socket, lp_resolve_context(tctx->lp_ctx), NULL, address); + status = wrepl_connect(wrepl_socket, lp_resolve_context(tctx->lp_ctx), wrepl_best_ip(tctx->lp_ctx, address), address); CHECK_STATUS(tctx, status, NT_STATUS_OK); torture_comment(tctx, "Send 1st start association request\n"); @@ -255,10 +255,10 @@ static bool test_wins_replication(struct torture_context *tctx) torture_comment(tctx, "Test one pull replication cycle\n"); - wrepl_socket = wrepl_socket_init(tctx, NULL); + wrepl_socket = wrepl_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); torture_comment(tctx, "Setup wrepl connections\n"); - status = wrepl_connect(wrepl_socket, lp_resolve_context(tctx->lp_ctx), NULL, address); + status = wrepl_connect(wrepl_socket, lp_resolve_context(tctx->lp_ctx), wrepl_best_ip(tctx->lp_ctx, address), address); CHECK_STATUS(tctx, status, NT_STATUS_OK); torture_comment(tctx, "Send a start association request\n"); @@ -553,11 +553,11 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx( if (!ctx) return NULL; ctx->address = address; - ctx->pull = wrepl_socket_init(ctx, NULL); + ctx->pull = wrepl_socket_init(ctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); if (!ctx->pull) return NULL; torture_comment(tctx, "Setup wrepl conflict pull connection\n"); - status = wrepl_connect(ctx->pull, lp_resolve_context(tctx->lp_ctx), NULL, ctx->address); + status = wrepl_connect(ctx->pull, lp_resolve_context(tctx->lp_ctx), wrepl_best_ip(tctx->lp_ctx, ctx->address), ctx->address); if (!NT_STATUS_IS_OK(status)) return NULL; status = wrepl_associate(ctx->pull, &associate); @@ -610,7 +610,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx( talloc_free(pull_table.out.partners); - ctx->nbtsock = nbt_name_socket_init(ctx, NULL); + ctx->nbtsock = nbt_name_socket_init(ctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); if (!ctx->nbtsock) return NULL; load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces); @@ -628,7 +628,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx( status = socket_listen(ctx->nbtsock->sock, ctx->myaddr, 0, 0); if (!NT_STATUS_IS_OK(status)) return NULL; - ctx->nbtsock_srv = nbt_name_socket_init(ctx, NULL); + ctx->nbtsock_srv = nbt_name_socket_init(ctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); if (!ctx->nbtsock_srv) return NULL; /* Make a port 137 version of ctx->myaddr */ @@ -645,13 +645,13 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx( } if (ctx->myaddr2 && ctx->nbtsock_srv) { - ctx->nbtsock2 = nbt_name_socket_init(ctx, NULL); + ctx->nbtsock2 = nbt_name_socket_init(ctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); if (!ctx->nbtsock2) return NULL; status = socket_listen(ctx->nbtsock2->sock, ctx->myaddr2, 0, 0); if (!NT_STATUS_IS_OK(status)) return NULL; - ctx->nbtsock_srv2 = nbt_name_socket_init(ctx, ctx->nbtsock_srv->event_ctx); + ctx->nbtsock_srv2 = nbt_name_socket_init(ctx, ctx->nbtsock_srv->event_ctx, lp_iconv_convenience(tctx->lp_ctx)); if (!ctx->nbtsock_srv2) return NULL; /* Make a port 137 version of ctx->myaddr2 */ @@ -722,9 +722,9 @@ static bool test_wrepl_update_one(struct torture_context *tctx, uint32_t assoc_ctx; NTSTATUS status; - wrepl_socket = wrepl_socket_init(ctx, NULL); + wrepl_socket = wrepl_socket_init(ctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); - status = wrepl_connect(wrepl_socket, lp_resolve_context(tctx->lp_ctx), NULL, ctx->address); + status = wrepl_connect(wrepl_socket, lp_resolve_context(tctx->lp_ctx), wrepl_best_ip(tctx->lp_ctx, ctx->address), ctx->address); CHECK_STATUS(tctx, status, NT_STATUS_OK); status = wrepl_associate(wrepl_socket, &associate); diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c index 4417285e04..b28e429a75 100644 --- a/source4/torture/rpc/dssync.c +++ b/source4/torture/rpc/dssync.c @@ -255,7 +255,7 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx) struct drsuapi_DsNameString names[1]; bool ret = true; - struct cldap_socket *cldap = cldap_socket_init(ctx, NULL); + struct cldap_socket *cldap = cldap_socket_init(ctx, NULL, lp_iconv_convenience(tctx->lp_ctx)); struct cldap_netlogon search; r.in.bind_handle = &ctx->admin.drsuapi.bind_handle; diff --git a/source4/torture/t_strcmp.c b/source4/torture/t_strcmp.c deleted file mode 100644 index 15d000c98f..0000000000 --- a/source4/torture/t_strcmp.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2003 by Martin Pool - * - * Test harness for strcasecmp_m - */ - -#include "includes.h" - -int main(int argc, char *argv[]) -{ - if (argc != 3) { - fprintf(stderr, "usage: %s STRING1 STRING2\nCompares two strings\n", - argv[0]); - return 2; - } - - printf("%d\n", strcasecmp_m(argv[1], argv[2])); - - return 0; -} |