[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Sat Apr 30 04:46:04 MDT 2011


The branch, master has been updated
       via  b832234 s4:torture/nbt/winsreplication: ignore incoming broadcast messages
       via  9d738ad s4:torture/nbt/winsreplication: assert the nbt name before the type
      from  897af93 s3-build Add popt dep to fix build on FreeBSD

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b83223476c7b6b9aea4efe01d923f009a09cd7d0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 30 10:14:54 2011 +0200

    s4:torture/nbt/winsreplication: ignore incoming broadcast messages
    
    This will hopefully fix the flakey behavior of the
    samba4.nbt.winsreplication.owned test.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Sat Apr 30 12:45:01 CEST 2011 on sn-devel-104

commit 9d738adcf854fb2e01892298d3c350a1ee06bbd0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 30 09:40:11 2011 +0200

    s4:torture/nbt/winsreplication: assert the nbt name before the type
    
    I hope that will make it easier to find problems
    with the flakey samba4.nbt.winsreplication.owned test.
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source4/torture/nbt/winsreplication.c |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index 757ea54..e30bfdd 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -9618,8 +9618,8 @@ static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_
 
 	name = &req_packet->questions[0].name;
 
-	_NBT_ASSERT(name->type, rec->name.type);
 	_NBT_ASSERT_STRING(name->name, rec->name.name);
+	_NBT_ASSERT(name->type, rec->name.type);
 	_NBT_ASSERT_STRING(name->scope, rec->name.scope);
 
 	_NBT_ASSERT(rec->defend.expect_release, false);
@@ -9717,8 +9717,8 @@ static void test_conflict_owned_active_vs_replica_handler_release(
 
 	name = &req_packet->questions[0].name;
 
-	_NBT_ASSERT(name->type, rec->name.type);
 	_NBT_ASSERT_STRING(name->name, rec->name.name);
+	_NBT_ASSERT(name->type, rec->name.type);
 	_NBT_ASSERT_STRING(name->scope, rec->name.scope);
 
 	_NBT_ASSERT(rec->defend.expect_release, true);
@@ -9764,6 +9764,17 @@ static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
 {
 	struct test_conflict_owned_active_vs_replica_struct *rec = 
 		(struct test_conflict_owned_active_vs_replica_struct *)nbtsock->incoming.private_data;
+	struct nbt_name *name = &req_packet->questions[0].name;
+
+	if (req_packet->operation & NBT_FLAG_BROADCAST) {
+		torture_comment(rec->tctx,
+			"%s: incoming packet name[%s] flags[0x%08X] from[%s]\n",
+			__location__,
+			nbt_name_string(rec->tctx, name),
+			req_packet->operation,
+			src->addr);
+		return;
+	}
 
 	rec->defend.ret = false;
 
@@ -9775,8 +9786,14 @@ static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
 		test_conflict_owned_active_vs_replica_handler_release(nbtsock, req_packet, src);
 		break;
 	default:
-		printf("%s: unexpected incoming packet\n", __location__);
-		return;
+		torture_comment(rec->tctx,
+			"%s: unexpected packet name[%s] flags[0x%08X] from[%s]\n",
+			__location__,
+			nbt_name_string(rec->tctx, name),
+			req_packet->operation,
+			src->addr);
+		_NBT_ASSERT((req_packet->operation & NBT_OPCODE), NBT_OPCODE_QUERY);
+		break;
 	}
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list