From cfbf62dbfd18465d1a3f699cd22a35f9303f87fe Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Thu, 17 Dec 2009 13:42:24 -0800 Subject: s4 torture: RAW-STREAMS-NAMES Make sure the create time of the streams are different from the base file --- source4/torture/raw/streams.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source4/torture') diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c index 6e5479d967..79cacffe10 100644 --- a/source4/torture/raw/streams.c +++ b/source4/torture/raw/streams.c @@ -704,6 +704,30 @@ static bool test_stream_names(struct torture_context *tctx, snamer2 = talloc_asprintf(tctx, "%s:%s:$DATA", fname, "AfterRename"); printf("(%s) testing stream names\n", __location__); + io.generic.level = RAW_OPEN_NTCREATEX; + io.ntcreatex.in.root_fid.fnum = 0; + io.ntcreatex.in.flags = 0; + io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA; + io.ntcreatex.in.create_options = 0; + io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; + io.ntcreatex.in.share_access = 0; + io.ntcreatex.in.alloc_size = 0; + io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE; + io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS; + io.ntcreatex.in.security_flags = 0; + io.ntcreatex.in.fname = fname; + + status = smb_raw_open(cli->tree, tctx, &io); + CHECK_STATUS(status, NT_STATUS_OK); + fnum1 = io.ntcreatex.out.file.fnum; + + /* + * Make sure the create time of the streams are different from the + * base file. + */ + sleep(2); + smbcli_close(cli->tree, fnum1); + io.generic.level = RAW_OPEN_NTCREATEX; io.ntcreatex.in.root_fid.fnum = 0; io.ntcreatex.in.flags = 0; -- cgit