svn commit: samba r11673 - in branches/SAMBA_4_0/source/torture/nbt: .

metze at samba.org metze at samba.org
Fri Nov 11 08:56:38 GMT 2005


Author: metze
Date: 2005-11-11 08:56:38 +0000 (Fri, 11 Nov 2005)
New Revision: 11673

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11673

Log:
- 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
Modified:
   branches/SAMBA_4_0/source/torture/nbt/winsreplication.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/nbt/winsreplication.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/winsreplication.c	2005-11-11 08:02:50 UTC (rev 11672)
+++ branches/SAMBA_4_0/source/torture/nbt/winsreplication.c	2005-11-11 08:56:38 UTC (rev 11673)
@@ -802,9 +802,9 @@
 }
 
 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 @@
 		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 @@
  * 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 @@
 			.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;



More information about the samba-cvs mailing list