summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-09-06 02:56:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:43 -0500
commit839e17019f5f9fecac986c003590eb444ad83497 (patch)
tree09a23dee7d4e90c602f725ba1197522da3e966de /source4
parent2d95d738877cec6870223f4418cfecf4c2a01467 (diff)
downloadsamba-839e17019f5f9fecac986c003590eb444ad83497.tar.gz
samba-839e17019f5f9fecac986c003590eb444ad83497.tar.bz2
samba-839e17019f5f9fecac986c003590eb444ad83497.zip
r24972: Try to rat out this SAMR failure with some more cross-tests, and
format checks. Andrew Bartlett (This used to be commit 33deecbfc339c571cc043085f8aa87053dbd4c72)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/samr.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index a5b171a773..dada316a39 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -227,8 +227,8 @@ static BOOL test_SetUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
#define INT_EQUAL(i1, i2, field) \
if (i1 != i2) { \
- printf("Failed to set %s to 0x%x - got 0x%x (%s)\n", \
- #field, i2, i1, __location__); \
+ printf("Failed to set %s to 0x%llx - got 0x%llx (%s)\n", \
+ #field, (unsigned long long)i2, (unsigned long long)i1, __location__); \
ret = False; \
break; \
}
@@ -373,18 +373,31 @@ static BOOL test_SetUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
TEST_USERINFO_STRING(14, workstations, 21, workstations, "14workstation21", 0);
TEST_USERINFO_STRING(21, workstations, 21, workstations, "21workstation21",
SAMR_FIELD_WORKSTATIONS);
+ TEST_USERINFO_STRING(21, workstations, 3, workstations, "21workstation3",
+ SAMR_FIELD_WORKSTATIONS);
+ TEST_USERINFO_STRING(21, workstations, 5, workstations, "21workstation5",
+ SAMR_FIELD_WORKSTATIONS);
+ TEST_USERINFO_STRING(21, workstations, 14, workstations, "21workstation14",
+ SAMR_FIELD_WORKSTATIONS);
TEST_USERINFO_STRING(20, parameters, 21, parameters, "xx20-21 parameters", 0);
TEST_USERINFO_STRING(21, parameters, 21, parameters, "xx21-21 parameters",
SAMR_FIELD_PARAMETERS);
+ TEST_USERINFO_STRING(21, parameters, 20, parameters, "xx21-20 parameters",
+ SAMR_FIELD_PARAMETERS);
+ TEST_USERINFO_INT(2, country_code, 2, country_code, __LINE__, 0);
TEST_USERINFO_INT(2, country_code, 21, country_code, __LINE__, 0);
TEST_USERINFO_INT(21, country_code, 21, country_code, __LINE__,
SAMR_FIELD_COUNTRY_CODE);
+ TEST_USERINFO_INT(21, country_code, 2, country_code, __LINE__,
+ SAMR_FIELD_COUNTRY_CODE);
TEST_USERINFO_INT(2, code_page, 21, code_page, __LINE__, 0);
TEST_USERINFO_INT(21, code_page, 21, code_page, __LINE__,
SAMR_FIELD_CODE_PAGE);
+ TEST_USERINFO_INT(21, code_page, 2, code_page, __LINE__,
+ SAMR_FIELD_CODE_PAGE);
TEST_USERINFO_INT(17, acct_expiry, 21, acct_expiry, __LINE__, 0);
TEST_USERINFO_INT(17, acct_expiry, 5, acct_expiry, __LINE__, 0);
@@ -3357,8 +3370,8 @@ static BOOL test_GetDisplayEnumerationIndex2(struct dcerpc_pipe *p, TALLOC_CTX *
}
#define INT_EQUAL_QUERY(s1, s2, user) \
if (s1 != s2) { \
- printf("%s mismatch for %s: 0x%x != 0x%x (%s)\n", \
- #s1, user.string, (unsigned int)s1, (unsigned int)s2, __location__); \
+ printf("%s mismatch for %s: 0x%llx != 0x%llx (%s)\n", \
+ #s1, user.string, (unsigned long long)s1, (unsigned long long)s2, __location__); \
ret = False; \
}