summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-01-11 12:25:49 +0100
committerKarolin Seeger <kseeger@samba.org>2018-11-06 09:10:23 +0100
commit5a01f6c746229c2005a18a4f4a9f91aebced4a2e (patch)
tree5c3cc8af772c2b3c0fd0653692f1ff550191f909 /source4/torture
parent45d55dc25b11bf83323b4465a88dc1945a232bdd (diff)
downloadsamba-5a01f6c746229c2005a18a4f4a9f91aebced4a2e.tar.gz
s4/test: fix AAPL size check
A recent commit changed the ModelString from "Samba" to "MacSamba". Bug: https://bugzilla.samba.org/show_bug.cgi?id=13646 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 11589a26ba40e9da90822a85b21327f49a69afda)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/vfs/fruit.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
index b0bec2afe5b..6843d120f18 100644
--- a/source4/torture/vfs/fruit.c
+++ b/source4/torture/vfs/fruit.c
@@ -2301,6 +2301,7 @@ static bool test_aapl(struct torture_context *tctx,
unsigned int count;
union smb_search_data *d;
uint64_t rfork_len;
+ bool is_osx_server = torture_setting_bool(tctx, "osx", false);
smb2_deltree(tree, BASEDIR);
@@ -2357,7 +2358,10 @@ static bool test_aapl(struct torture_context *tctx,
goto done;
}
- if (aapl->data.length != 50) {
+ if (!is_osx_server) {
+ size_t expected_aapl_ctx_size;
+ bool size_ok;
+
/*
* uint32_t CommandCode = kAAPL_SERVER_QUERY
* uint32_t Reserved = 0;
@@ -2370,11 +2374,12 @@ static bool test_aapl(struct torture_context *tctx,
* kAAPL_CASE_SENSITIVE;
* uint32_t Pad2 = 0;
* uint32_t ModelStringLen = 10;
- * ucs2_t ModelString[5] = "Samba";
+ * ucs2_t ModelString[5] = "MacSamba";
*/
- torture_warning(tctx,
- "(%s) unexpected AAPL context length: %zd, expected 50",
- __location__, aapl->data.length);
+ expected_aapl_ctx_size = strlen("MacSamba") * 2 + 40;
+
+ size_ok = aapl->data.length == expected_aapl_ctx_size;
+ torture_assert_goto(tctx, size_ok, ret, done, "bad AAPL size");
}
aapl_cmd = IVAL(aapl->data.data, 0);