diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-10-15 12:30:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:44:47 -0500 |
commit | f8a3335cb427320770a0164b0a4e6bf33ba893af (patch) | |
tree | 574575fd538498c03c319b4f58db2fc6cdea128a | |
parent | 42ef193dd22518b50e0af27b963078440f02b510 (diff) | |
download | samba-f8a3335cb427320770a0164b0a4e6bf33ba893af.tar.gz samba-f8a3335cb427320770a0164b0a4e6bf33ba893af.tar.bz2 samba-f8a3335cb427320770a0164b0a4e6bf33ba893af.zip |
r11091: add a NBT-WINSREPLICATION-QUICK test that passed the current samba4 server
metze
(This used to be commit 772467c8d487578b3541ffd1b1e07516097d1325)
-rw-r--r-- | source4/torture/nbt/winsreplication.c | 30 | ||||
-rw-r--r-- | source4/torture/torture.c | 3 |
2 files changed, 32 insertions, 1 deletions
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c index dec1a21ca3..62a4b9f9ba 100644 --- a/source4/torture/nbt/winsreplication.c +++ b/source4/torture/nbt/winsreplication.c @@ -1487,6 +1487,36 @@ static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx) /* test WINS replication operations */ +BOOL torture_nbt_winsreplication_quick(void) +{ + const char *address; + struct nbt_name name; + TALLOC_CTX *mem_ctx = talloc_new(NULL); + NTSTATUS status; + BOOL ret = True; + + make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host")); + + /* do an initial name resolution to find its IP */ + status = resolve_name(&name, mem_ctx, &address, NULL); + if (!NT_STATUS_IS_OK(status)) { + printf("Failed to resolve %s - %s\n", + name.name, nt_errstr(status)); + talloc_free(mem_ctx); + return False; + } + + ret &= test_assoc_ctx1(mem_ctx, address); + ret &= test_assoc_ctx2(mem_ctx, address); + + talloc_free(mem_ctx); + + return ret; +} + +/* + test WINS replication operations +*/ BOOL torture_nbt_winsreplication(void) { const char *address; diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 5941af978a..ef59cdb378 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -2340,8 +2340,9 @@ static struct { /* nbt tests */ {"NBT-REGISTER", torture_nbt_register, 0}, {"NBT-WINS", torture_nbt_wins, 0}, - {"NBT-WINSREPLICATION", torture_nbt_winsreplication, 0}, {"NBT-DGRAM", torture_nbt_dgram, 0}, + {"NBT-WINSREPLICATION-QUICK", torture_nbt_winsreplication_quick, 0}, + {"NBT-WINSREPLICATION", torture_nbt_winsreplication, 0}, /* libnet tests */ {"NET-USERINFO", torture_userinfo, 0}, |