mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
r13627: split the NBT-WINSREPLICATION tests into multiple tests
metze (This used to be commit ae559920e1d227e4e787fe34d908a965b922b284)
This commit is contained in:
parent
e68802a2a6
commit
f2f3e1801b
@ -21,7 +21,15 @@ export PATH
|
||||
testit "nmblookup -U $SERVER $SERVER" bin/nmblookup $TORTURE_OPTIONS -U $SERVER $SERVER || failed=`expr $failed + 1`
|
||||
testit "nmblookup $SERVER" bin/nmblookup $TORTURE_OPTIONS $SERVER || failed=`expr $failed + 1`
|
||||
|
||||
for f in NBT-REGISTER NBT-WINS NBT-WINSREPLICATION NET-API-LOOKUP NET-API-LOOKUPHOST NET-API-LOOKUPPDC; do
|
||||
NBT_TESTS="NBT-REGISTER NBT-WINS"
|
||||
NBT_TESTS="$NBT_TESTS NBT-WINSREPLICATION-SIMPLE"
|
||||
NBT_TESTS="$NBT_TESTS NBT-WINSREPLICATION-REPLICA"
|
||||
if [ "$TORTURE_QUICK"x = "yes"x ]; then
|
||||
NBT_TESTS="$NBT_TESTS NBT-WINSREPLICATION-OWNED"
|
||||
fi
|
||||
NBT_TESTS="$NBT_TESTS NET-API-LOOKUP NET-API-LOOKUPHOST NET-API-LOOKUPPDC"
|
||||
|
||||
for f in $NBT_TESTS; do
|
||||
testit "$f" bin/smbtorture $TORTURE_OPTIONS //$SERVER/_none_ $f || failed=`expr $failed + 1`
|
||||
done
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:quick=yes"
|
||||
TORTURE_QUICK="yes"
|
||||
|
||||
$SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD || failed=`expr $failed + $?`
|
||||
$SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD || failed=`expr $failed + $?`
|
||||
|
@ -9619,9 +9619,42 @@ static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
|
||||
}
|
||||
|
||||
/*
|
||||
test WINS replication operations
|
||||
test simple WINS replication operations
|
||||
*/
|
||||
BOOL torture_nbt_winsreplication(void)
|
||||
BOOL torture_nbt_winsreplication_simple(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);
|
||||
|
||||
ret &= test_wins_replication(mem_ctx, address);
|
||||
|
||||
done:
|
||||
talloc_free(mem_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
test WINS replication replica conflicts operations
|
||||
*/
|
||||
BOOL torture_nbt_winsreplication_replica(void)
|
||||
{
|
||||
const char *address;
|
||||
struct nbt_name name;
|
||||
@ -9641,18 +9674,44 @@ BOOL torture_nbt_winsreplication(void)
|
||||
return False;
|
||||
}
|
||||
|
||||
ret &= test_assoc_ctx1(mem_ctx, address);
|
||||
ret &= test_assoc_ctx2(mem_ctx, address);
|
||||
|
||||
ret &= test_wins_replication(mem_ctx, address);
|
||||
|
||||
if (lp_parm_bool(-1, "torture", "quick", False)) goto done;
|
||||
|
||||
ctx = test_create_conflict_ctx(mem_ctx, address);
|
||||
if (!ctx) return False;
|
||||
|
||||
ret &= test_conflict_same_owner(ctx);
|
||||
ret &= test_conflict_different_owner(ctx);
|
||||
|
||||
done:
|
||||
talloc_free(mem_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
test WINS replication owned conflicts operations
|
||||
*/
|
||||
BOOL torture_nbt_winsreplication_owned(void)
|
||||
{
|
||||
const char *address;
|
||||
struct nbt_name name;
|
||||
TALLOC_CTX *mem_ctx = talloc_new(NULL);
|
||||
NTSTATUS status;
|
||||
BOOL ret = True;
|
||||
struct test_wrepl_conflict_conn *ctx;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
ctx = test_create_conflict_ctx(mem_ctx, address);
|
||||
if (!ctx) return False;
|
||||
|
||||
ret &= test_conflict_owned_released_vs_replica(ctx);
|
||||
ret &= test_conflict_owned_active_vs_replica(ctx);
|
||||
|
||||
|
@ -2346,8 +2346,10 @@ static struct {
|
||||
{"NBT-REGISTER", torture_nbt_register, 0},
|
||||
{"NBT-WINS", torture_nbt_wins, 0},
|
||||
{"NBT-DGRAM", torture_nbt_dgram, 0},
|
||||
{"NBT-WINSREPLICATION", torture_nbt_winsreplication, 0},
|
||||
{"NBT-BROWSE", torture_nbt_browse, 0},
|
||||
{"NBT-WINSREPLICATION-SIMPLE", torture_nbt_winsreplication_simple, 0},
|
||||
{"NBT-WINSREPLICATION-REPLICA", torture_nbt_winsreplication_replica, 0},
|
||||
{"NBT-WINSREPLICATION-OWNED", torture_nbt_winsreplication_owned, 0},
|
||||
|
||||
/* libnet tests */
|
||||
{"NET-USERINFO", torture_userinfo, 0},
|
||||
|
Loading…
x
Reference in New Issue
Block a user