svn commit: samba r12639 - in
branches/SAMBA_4_0/source/torture/nbt: .
metze at samba.org
metze at samba.org
Sat Dec 31 08:42:01 GMT 2005
Author: metze
Date: 2005-12-31 08:42:01 +0000 (Sat, 31 Dec 2005)
New Revision: 12639
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12639
Log:
- do some tests with 0x20 0x1B names
- do some tests with 0xBF and 0xBE, this shows that the '+' padding
should be done by the client
metze
Modified:
branches/SAMBA_4_0/source/torture/nbt/wins.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/nbt/wins.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/wins.c 2005-12-31 08:19:48 UTC (rev 12638)
+++ branches/SAMBA_4_0/source/torture/nbt/wins.c 2005-12-31 08:42:01 UTC (rev 12639)
@@ -25,8 +25,8 @@
#define CHECK_VALUE(v, correct) do { \
if ((v) != (correct)) { \
- printf("(%s) Incorrect value %s=%d - should be %d\n", \
- __location__, #v, v, correct); \
+ printf("(%s) Incorrect value %s=%d (0x%X) - should be %d (0x%X)\n", \
+ __location__, #v, v, v, correct, correct); \
ret = False; \
}} while (0)
@@ -40,7 +40,7 @@
#define CHECK_NAME(_name, correct) do { \
CHECK_STRING((_name).name, (correct).name); \
- CHECK_VALUE((_name).type, (correct).type); \
+ CHECK_VALUE((uint8_t)(_name).type, (uint8_t)(correct).type); \
CHECK_STRING((_name).scope, (correct).scope); \
} while (0)
@@ -293,7 +293,7 @@
uint32_t r = (uint32_t)(random() % (100000));
name.name = talloc_asprintf(mem_ctx, "_TORTURE-%5u", r);
-
+
name.type = NBT_NAME_CLIENT;
name.scope = NULL;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
@@ -303,12 +303,24 @@
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H | NBT_NM_GROUP);
+ name.type = NBT_NAME_SERVER;
+ ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
+
name.type = NBT_NAME_LOGON;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H | NBT_NM_GROUP);
name.type = NBT_NAME_BROWSER;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H | NBT_NM_GROUP);
+ name.type = NBT_NAME_PDC;
+ ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
+
+ name.type = 0xBF;
+ ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
+
+ name.type = 0xBE;
+ ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
+
name.scope = "example";
name.type = 0x72;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
More information about the samba-cvs
mailing list