From 4043d03ef06abefc400914aa1200975dd39f5298 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 19 Oct 2005 07:24:36 +0000 Subject: r11176: - add multi homed vs. special group section metze (This used to be commit 62ddca0e1f3d7484b32df7f5a56eca4761289c00) --- source4/torture/nbt/winsreplication.c | 180 +++++++++++++++++++++++++++++++++- 1 file changed, 179 insertions(+), 1 deletion(-) diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c index ec9d690ba3..a987890e07 100644 --- a/source4/torture/nbt/winsreplication.c +++ b/source4/torture/nbt/winsreplication.c @@ -3159,6 +3159,184 @@ static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx) } }, +/* + * multi homed vs. special group section, + */ + /* + * mhomed,active vs. sgroup,active + * => should NOT be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->a, + .type = WREPL_TYPE_MHOMED, + .state = WREPL_STATE_ACTIVE, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_A_1), + .ips = addresses_A_1, + .apply_expected = True + }, + .r2 = { + .owner = &ctx->b, + .type = WREPL_TYPE_SGROUP, + .state = WREPL_STATE_ACTIVE, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_A_1), + .ips = addresses_A_1, + .apply_expected = False + } + }, + + /* + * mhomed,active vs. group,tombstone + * => should NOT be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->a, + .type = WREPL_TYPE_MHOMED, + .state = WREPL_STATE_ACTIVE, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_A_1), + .ips = addresses_A_1, + .apply_expected = True + }, + .r2 = { + .owner = &ctx->b, + .type = WREPL_TYPE_SGROUP, + .state = WREPL_STATE_TOMBSTONE, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_A_1), + .ips = addresses_A_1, + .apply_expected = False + } + }, + + /* + * mhomed,released vs. sgroup,active + * => should be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->a, + .type = WREPL_TYPE_MHOMED, + .state = WREPL_STATE_RELEASED, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_A_1), + .ips = addresses_A_1, + .apply_expected = False + }, + .r2 = { + .owner = &ctx->b, + .type = WREPL_TYPE_SGROUP, + .state = WREPL_STATE_ACTIVE, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_B_1), + .ips = addresses_B_1, + .apply_expected = True + } + }, + + /* + * mhomed,released vs. group,tombstone + * => should be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->b, + .type = WREPL_TYPE_MHOMED, + .state = WREPL_STATE_RELEASED, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_B_1), + .ips = addresses_B_1, + .apply_expected = False + }, + .r2 = { + .owner = &ctx->a, + .type = WREPL_TYPE_SGROUP, + .state = WREPL_STATE_TOMBSTONE, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_A_1), + .ips = addresses_A_1, + .apply_expected = True + } + }, + + /* + * mhomed,tombstone vs. sgroup,active + * => should be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->a, + .type = WREPL_TYPE_MHOMED, + .state = WREPL_STATE_TOMBSTONE, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_A_1), + .ips = addresses_A_1, + .apply_expected = True + }, + .r2 = { + .owner = &ctx->b, + .type = WREPL_TYPE_SGROUP, + .state = WREPL_STATE_ACTIVE, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_B_1), + .ips = addresses_B_1, + .apply_expected = True + } + }, + + /* + * mhomed,tombstone vs. group,tombstone + * => should be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->b, + .type = WREPL_TYPE_MHOMED, + .state = WREPL_STATE_TOMBSTONE, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_B_1), + .ips = addresses_B_1, + .apply_expected = True + }, + .r2 = { + .owner = &ctx->a, + .type = WREPL_TYPE_SGROUP, + .state = WREPL_STATE_TOMBSTONE, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_A_1), + .ips = addresses_A_1, + .apply_expected = True + } + }, + + #if 0 /* * special group vs special group section, @@ -3255,7 +3433,7 @@ static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx) .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), .cleanup= True, .r1 = { - .owner = &ctx->b, + .owner = &ctx->a, .type = WREPL_TYPE_UNIQUE, .state = WREPL_STATE_TOMBSTONE, .node = WREPL_NODE_B, -- cgit