diff options
author | Ralph Boehme <slow@samba.org> | 2018-10-10 12:47:07 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-11-06 09:10:24 +0100 |
commit | a14fe5b863b0d4c15bb30fbcc699861566e55706 (patch) | |
tree | 1c617a57c9e51a356346bfeed011ecd55199363a /source4/torture/vfs | |
parent | b58b0002802b86d8ee5e10893e8afc59c952d7b0 (diff) | |
download | samba-a14fe5b863b0d4c15bb30fbcc699861566e55706.tar.gz |
s4:torture/vfs/fruit: expand existing vfs_test "null afpinfo"
This adds a check that a read on a seperate handle also sees the
previously created AFP_AfpInfo stream.
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 6f428607e35055b9ce1a04a625d43740bf5c76b2)
Diffstat (limited to 'source4/torture/vfs')
-rw-r--r-- | source4/torture/vfs/fruit.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c index ac7b6682e6d..ff3ea274f65 100644 --- a/source4/torture/vfs/fruit.c +++ b/source4/torture/vfs/fruit.c @@ -4091,6 +4091,8 @@ static bool test_null_afpinfo(struct torture_context *tctx, AfpInfo *afpinfo = NULL; char *afpinfo_buf = NULL; const char *type_creator = "SMB,OLE!"; + struct smb2_handle handle2; + struct smb2_read r; torture_comment(tctx, "Checking create of AfpInfo stream\n"); @@ -4129,6 +4131,20 @@ static bool test_null_afpinfo(struct torture_context *tctx, status = smb2_read_recv(req[1], tree, &read); torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "smb2_read_recv failed"); + status = torture_smb2_testfile_access(tree, sname, &handle2, + SEC_FILE_READ_DATA); + torture_assert_ntstatus_ok_goto(tctx, status, ret, done, + "torture_smb2_testfile failed\n"); + r = (struct smb2_read) { + .in.file.handle = handle2, + .in.length = AFP_INFO_SIZE, + }; + + status = smb2_read(tree, tree, &r); + torture_assert_ntstatus_ok_goto(tctx, status, ret, done, + "torture_smb2_testfile failed\n"); + smb2_util_close(tree, handle2); + afpinfo = torture_afpinfo_new(mem_ctx); torture_assert_goto(tctx, afpinfo != NULL, ret, done, "torture_afpinfo_new failed"); |