summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-11-11 08:56:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:11 -0500
commit6c4be5073de177668d8c8fc05de625d3c9125268 (patch)
tree3a445cccefb55da5155344d61351900db7f0d0ea
parent087577e47b5c8800494b867ef191b228b7eb64f8 (diff)
downloadsamba-6c4be5073de177668d8c8fc05de625d3c9125268.tar.gz
samba-6c4be5073de177668d8c8fc05de625d3c9125268.tar.bz2
samba-6c4be5073de177668d8c8fc05de625d3c9125268.zip
r11673: - update the max_version of the owner when we get some records
in the sgroup_merge test, so that we don't see old records as new ones - finish the owned,sgroup,active vs. sgroup * section metze (This used to be commit 534e34a1a1c822e72bf863e8acc396168b849b93)
-rw-r--r--source4/torture/nbt/winsreplication.c199
1 files changed, 196 insertions, 3 deletions
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index eb09909184..9f4cc8af75 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -802,9 +802,9 @@ done:
}
static BOOL test_wrepl_sgroup_merged(struct test_wrepl_conflict_conn *ctx,
- const struct wrepl_wins_owner *owner1,
+ struct wrepl_wins_owner *owner1,
uint32_t num_ips1, const struct wrepl_ip *ips1,
- const struct wrepl_wins_owner *owner2,
+ struct wrepl_wins_owner *owner2,
uint32_t num_ips2, const struct wrepl_ip *ips2,
const struct wrepl_wins_name *name2)
{
@@ -845,6 +845,10 @@ static BOOL test_wrepl_sgroup_merged(struct test_wrepl_conflict_conn *ctx,
name = &names[i];
}
+ if (pull_names.out.num_names > 0 ) {
+ owner1->max_version = names[pull_names.out.num_names-1].version_id;
+ }
+
if (!name) {
printf("%s: Name '%s' not found\n", __location__, nbt_name_string(ctx, name2->name));
return False;
@@ -7983,7 +7987,7 @@ static BOOL test_conflict_owned_active_vs_replica(struct test_wrepl_conflict_con
* special group vs. special group merging section
*/
/*
- * sgroup,active vs. sgroup,active with same ip(s)
+ * sgroup,active vs. sgroup,active with different ip(s)
*/
{
.line = __location__,
@@ -8010,6 +8014,195 @@ static BOOL test_conflict_owned_active_vs_replica(struct test_wrepl_conflict_con
.sgroup_merge = True
},
},
+ /*
+ * sgroup,active vs. sgroup,active with same ip(s)
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL),
+ .skip = (ctx->addresses_all_num < 3),
+ .wins = {
+ .nb_flags = NBT_NM_GROUP,
+ .mhomed = False,
+ .num_ips = ctx->addresses_mhomed_num,
+ .ips = ctx->addresses_mhomed,
+ .apply_expected = True
+ },
+ .defend = {
+ .timeout = 0,
+ },
+ .replica= {
+ .type = WREPL_TYPE_SGROUP,
+ .state = WREPL_STATE_ACTIVE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ctx->addresses_mhomed_num,
+ .ips = ctx->addresses_mhomed,
+ .sgroup_merge = True
+ },
+ },
+ /*
+ * sgroup,active vs. sgroup,active with superset ip(s)
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL),
+ .skip = (ctx->addresses_all_num < 3),
+ .wins = {
+ .nb_flags = NBT_NM_GROUP,
+ .mhomed = False,
+ .num_ips = ctx->addresses_mhomed_num,
+ .ips = ctx->addresses_mhomed,
+ .apply_expected = True
+ },
+ .defend = {
+ .timeout = 0,
+ },
+ .replica= {
+ .type = WREPL_TYPE_SGROUP,
+ .state = WREPL_STATE_ACTIVE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ctx->addresses_all_num,
+ .ips = ctx->addresses_all,
+ .sgroup_merge = True
+ },
+ },
+ /*
+ * sgroup,active vs. sgroup,active with subset ip(s)
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL),
+ .skip = (ctx->addresses_all_num < 3),
+ .wins = {
+ .nb_flags = NBT_NM_GROUP,
+ .mhomed = False,
+ .num_ips = ctx->addresses_mhomed_num,
+ .ips = ctx->addresses_mhomed,
+ .apply_expected = True
+ },
+ .defend = {
+ .timeout = 0,
+ },
+ .replica= {
+ .type = WREPL_TYPE_SGROUP,
+ .state = WREPL_STATE_ACTIVE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ctx->addresses_best_num,
+ .ips = ctx->addresses_best,
+ .sgroup_merge = True
+ },
+ },
+ /*
+ * sgroup,active vs. sgroup,tombstone with different ip(s)
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL),
+ .skip = (ctx->addresses_all_num < 3),
+ .wins = {
+ .nb_flags = NBT_NM_GROUP,
+ .mhomed = False,
+ .num_ips = ctx->addresses_mhomed_num,
+ .ips = ctx->addresses_mhomed,
+ .apply_expected = True
+ },
+ .defend = {
+ .timeout = 0,
+ },
+ .replica= {
+ .type = WREPL_TYPE_SGROUP,
+ .state = WREPL_STATE_TOMBSTONE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ARRAY_SIZE(addresses_B_3_4),
+ .ips = addresses_B_3_4,
+ .apply_expected = False
+ },
+ },
+ /*
+ * sgroup,active vs. sgroup,tombstone with same ip(s)
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL),
+ .skip = (ctx->addresses_all_num < 3),
+ .wins = {
+ .nb_flags = NBT_NM_GROUP,
+ .mhomed = False,
+ .num_ips = ctx->addresses_mhomed_num,
+ .ips = ctx->addresses_mhomed,
+ .apply_expected = True
+ },
+ .defend = {
+ .timeout = 0,
+ },
+ .replica= {
+ .type = WREPL_TYPE_SGROUP,
+ .state = WREPL_STATE_TOMBSTONE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ctx->addresses_mhomed_num,
+ .ips = ctx->addresses_mhomed,
+ .apply_expected = False
+ },
+ },
+ /*
+ * sgroup,active vs. sgroup,tombstone with superset ip(s)
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL),
+ .skip = (ctx->addresses_all_num < 3),
+ .wins = {
+ .nb_flags = NBT_NM_GROUP,
+ .mhomed = False,
+ .num_ips = ctx->addresses_mhomed_num,
+ .ips = ctx->addresses_mhomed,
+ .apply_expected = True
+ },
+ .defend = {
+ .timeout = 0,
+ },
+ .replica= {
+ .type = WREPL_TYPE_SGROUP,
+ .state = WREPL_STATE_TOMBSTONE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ctx->addresses_all_num,
+ .ips = ctx->addresses_all,
+ .apply_expected = False
+ },
+ },
+ /*
+ * sgroup,active vs. sgroup,tombstone with subset ip(s)
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL),
+ .skip = (ctx->addresses_all_num < 3),
+ .wins = {
+ .nb_flags = NBT_NM_GROUP,
+ .mhomed = False,
+ .num_ips = ctx->addresses_mhomed_num,
+ .ips = ctx->addresses_mhomed,
+ .apply_expected = True
+ },
+ .defend = {
+ .timeout = 0,
+ },
+ .replica= {
+ .type = WREPL_TYPE_SGROUP,
+ .state = WREPL_STATE_TOMBSTONE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ctx->addresses_best_num,
+ .ips = ctx->addresses_best,
+ .apply_expected = False
+ },
+ },
};
if (!ctx) return False;