diff options
author | Volker Lendecke <vl@samba.org> | 2012-04-18 18:05:24 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-04-18 19:47:53 +0200 |
commit | b0aaa49e3fd25261500c9367fd59ff02d20af2f0 (patch) | |
tree | 6d8eb63c60508d063ab0baa861c76130775a1980 /source4/torture | |
parent | 03291270a6fc1ccc9cdd67700dcc2da46b33429c (diff) | |
download | samba-b0aaa49e3fd25261500c9367fd59ff02d20af2f0.tar.gz samba-b0aaa49e3fd25261500c9367fd59ff02d20af2f0.tar.bz2 samba-b0aaa49e3fd25261500c9367fd59ff02d20af2f0.zip |
s4-torture: Fix the raw.notify mask test
When we do the notify triggers via a different client connection, adding the
notify record becomes subject to a race. Add a dummy operation after the
initial changenotify request was sent to make sure the notify record actually
arrived.
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Apr 18 19:47:53 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/raw/notify.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c index c1ef9dc8e8..2a16d6ee3c 100644 --- a/source4/torture/raw/notify.c +++ b/source4/torture/raw/notify.c @@ -585,6 +585,7 @@ static bool test_notify_mask(struct torture_context *tctx, NTSTATUS status; union smb_notify notify; union smb_open io; + union smb_chkpath chkpath; int fnum, fnum2; uint32_t mask; int i; @@ -621,6 +622,8 @@ static bool test_notify_mask(struct torture_context *tctx, notify.nttrans.in.buffer_size = 1000; notify.nttrans.in.recursive = true; + chkpath.chkpath.in.path = "\\"; + #define NOTIFY_MASK_TEST(test_name, setup, op, cleanup, Action, expected, nchanges) \ do { \ smbcli_getatr(cli->tree, test_name, NULL, NULL, NULL); \ @@ -633,6 +636,7 @@ static bool test_notify_mask(struct torture_context *tctx, notify.nttrans.in.file.fnum = fnum; \ notify.nttrans.in.completion_filter = (1<<i); \ req = smb_raw_changenotify_send(cli->tree, ¬ify); \ + smb_raw_chkpath(cli->tree, &chkpath); \ op \ smb_msleep(200); smb_raw_ntcancel(req); \ status = smb_raw_changenotify_recv(req, tctx, ¬ify); \ |