From 70be12593ab69849b4c26f93e0064b5b4f844c42 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 17 Oct 2005 14:12:54 +0000 Subject: r11117: add a normal group vs. normal group section metze (This used to be commit 9a7689c745e9fa9f40c46fa041a502967fd93ccc) --- source4/torture/nbt/winsreplication.c | 233 +++++++++++++++++++++++++++++++++- 1 file changed, 232 insertions(+), 1 deletion(-) diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c index bb4ba8976e..bb85cc0790 100644 --- a/source4/torture/nbt/winsreplication.c +++ b/source4/torture/nbt/winsreplication.c @@ -1691,6 +1691,237 @@ static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx) } }, +/* + * normal groups vs normal groups section, + */ + /* + * group,active vs. group,active + * => should NOT be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->a, + .type = WREPL_TYPE_GROUP, + .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_GROUP, + .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 + } + }, + + /* + * group,active vs. group,tombstone + * => should NOT be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->a, + .type = WREPL_TYPE_GROUP, + .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_GROUP, + .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 + } + }, + + /* + * group,released vs. group,active + * => should be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->a, + .type = WREPL_TYPE_GROUP, + .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_GROUP, + .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 + } + }, + + /* + * group,released vs. group,released + * => should NOT be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->b, + .type = WREPL_TYPE_GROUP, + .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_GROUP, + .state = WREPL_STATE_RELEASED, + .node = WREPL_NODE_B, + .is_static = False, + .num_ips = ARRAY_SIZE(addresses_A_1), + .ips = addresses_A_1, + .apply_expected = True + } + }, + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .cleanup= True, + .r1 = { + .owner = &ctx->b, + .type = WREPL_TYPE_UNIQUE, + .state = WREPL_STATE_TOMBSTONE, + .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_UNIQUE, + .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 + } + }, + + /* + * group,released vs. group,tombstone + * => should be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->a, + .type = WREPL_TYPE_GROUP, + .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_GROUP, + .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 + } + }, + + /* + * group,tombstone vs. group,active + * => should be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->b, + .type = WREPL_TYPE_GROUP, + .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_GROUP, + .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 + } + }, + + /* + * group,tombstone vs. group,tombstone + * => should NOT be replaced + */ + { + .line = __location__, + .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL), + .r1 = { + .owner = &ctx->a, + .type = WREPL_TYPE_GROUP, + .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_GROUP, + .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 + } + }, + /* * This should be the last record in this array, * we need to make sure the we leave a tombstoned unique entry @@ -1701,7 +1932,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->a, + .owner = &ctx->b, .type = WREPL_TYPE_UNIQUE, .state = WREPL_STATE_TOMBSTONE, .node = WREPL_NODE_B, -- cgit