summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-17 13:17:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:44:52 -0500
commit80cd8936fa1699833a6c40a1de3108486b157b1d (patch)
treeddbbec149abf895dd12b31cb7032467fc9601536 /source4/torture
parente7238b9306ac3854054ba5f1ef89e7a56bae2633 (diff)
downloadsamba-80cd8936fa1699833a6c40a1de3108486b157b1d.tar.gz
samba-80cd8936fa1699833a6c40a1de3108486b157b1d.tar.bz2
samba-80cd8936fa1699833a6c40a1de3108486b157b1d.zip
r11116: - don't display cleanup updates
- add unique vs. multi homed section metze (This used to be commit 7f8c26cd33a5dffd672d0995cf227177bc21a20e)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/nbt/winsreplication.c159
1 files changed, 156 insertions, 3 deletions
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index f4272ccc13..bb4ba8976e 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -649,7 +649,7 @@ static BOOL test_conflict_same_owner(struct test_wrepl_conflict_conn *ctx)
wins_name_cur = wins_name_tmp;
if (i > 0) {
- printf("%s,%s%s vs, %s,%s%s with %s ip(s) => %s\n",
+ printf("%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
wrepl_name_type_string(records[i-1].type),
wrepl_name_state_string(records[i-1].state),
(records[i-1].is_static?",static":""),
@@ -705,6 +705,7 @@ static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
struct {
const char *line; /* just better debugging */
struct nbt_name name;
+ BOOL cleanup;
struct {
struct wrepl_wins_owner *owner;
enum wrepl_name_type type;
@@ -724,6 +725,7 @@ static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
{
.line = __location__,
.name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
+ .cleanup= True,
.r1 = {
.owner = &ctx->b,
.type = WREPL_TYPE_UNIQUE,
@@ -1221,6 +1223,7 @@ static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
{
.line = __location__,
.name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
+ .cleanup= True,
.r1 = {
.owner = &ctx->b,
.type = WREPL_TYPE_UNIQUE,
@@ -1362,6 +1365,155 @@ static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
}
},
+
+/*
+ * unique vs multi homed section,
+ */
+ /*
+ * unique,active vs. mhomed,active with different ips
+ * => should be replaced
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
+ .r1 = {
+ .owner = &ctx->a,
+ .type = WREPL_TYPE_UNIQUE,
+ .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_MHOMED,
+ .state = WREPL_STATE_ACTIVE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ARRAY_SIZE(addresses_B_3_4),
+ .ips = addresses_B_3_4,
+ .apply_expected = True
+ }
+ },
+
+ /*
+ * unique,active vs. mhomed,tombstone with different ips
+ * => should NOT be replaced
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
+ .r1 = {
+ .owner = &ctx->b,
+ .type = WREPL_TYPE_UNIQUE,
+ .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
+ },
+ .r2 = {
+ .owner = &ctx->a,
+ .type = WREPL_TYPE_MHOMED,
+ .state = WREPL_STATE_TOMBSTONE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ARRAY_SIZE(addresses_A_3_4),
+ .ips = addresses_A_3_4,
+ .apply_expected = False
+ }
+ },
+
+ /*
+ * unique,active vs. mhomed,tombstone with same ips
+ * => should NOT be replaced
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
+ .r1 = {
+ .owner = &ctx->b,
+ .type = WREPL_TYPE_UNIQUE,
+ .state = WREPL_STATE_ACTIVE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ARRAY_SIZE(addresses_B_3_4),
+ .ips = addresses_B_3_4,
+ .apply_expected = True
+ },
+ .r2 = {
+ .owner = &ctx->a,
+ .type = WREPL_TYPE_MHOMED,
+ .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
+ }
+ },
+
+ /*
+ * unique,tombstone vs. mhomed,active with different ips
+ * => should be replaced
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
+ .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 = True
+ },
+ .r2 = {
+ .owner = &ctx->a,
+ .type = WREPL_TYPE_MHOMED,
+ .state = WREPL_STATE_ACTIVE,
+ .node = WREPL_NODE_B,
+ .is_static = False,
+ .num_ips = ARRAY_SIZE(addresses_A_3_4),
+ .ips = addresses_A_3_4,
+ .apply_expected = True
+ }
+ },
+
+ /*
+ * unique,tombstone vs. mhomed,tombstone with different ips
+ * => should be replaced
+ */
+ {
+ .line = __location__,
+ .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
+ .r1 = {
+ .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
+ },
+ .r2 = {
+ .owner = &ctx->b,
+ .type = WREPL_TYPE_MHOMED,
+ .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 = True
+ }
+ },
+
/*
* normal groups vs unique section,
*/
@@ -1547,6 +1699,7 @@ static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
{
.line = __location__,
.name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
+ .cleanup= True,
.r1 = {
.owner = &ctx->a,
.type = WREPL_TYPE_UNIQUE,
@@ -1578,8 +1731,8 @@ static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
for(i=0; ret && i < ARRAY_SIZE(records); i++) {
- if (i > 0) {
- printf("%s,%s%s vs, %s,%s%s with %s ip(s) => %s\n",
+ if (!records[i].cleanup) {
+ printf("%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
wrepl_name_type_string(records[i].r1.type),
wrepl_name_state_string(records[i].r1.state),
(records[i].r1.is_static?",static":""),