summaryrefslogtreecommitdiff
path: root/source4/torture/raw/oplock.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-23torture: Extend the raw.oplock.level_ii_1 testVolker Lendecke1-0/+14
smbd broke to none twice. Make sure this won't happen again :-) This used to happen before the MSG_SMB_BREAK_RESPONSE merge. In process_oplock_break_message we did not call remove_oplock, which would have prevented this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Oct 23 14:06:13 CEST 2013 on sn-devel-104
2013-10-23torture: Add a test showing we have to break L2 at open timeVolker Lendecke1-0/+105
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23torture: Add oplock break to l2/none testsVolker Lendecke1-0/+96
The level we have to break to depends on the create disposition of the second opener. If it's overwriting, break to none. If it's not, break to level2. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23torture: Check break level in raw.oplock.exclusive5Volker Lendecke1-0/+1
This is what Windows does in this case, we don't survive that. We break to LEVEL2 here. Fixes and more precise test to follow. We don't survive this anymore. Re-enable later. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23torture: Add reproducer for bug 10216Volker Lendecke1-0/+12
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-15torture: Extend raw.oplock.batch10Volker Lendecke1-0/+12
With FAKE_LEVEL_II_OPLOCKS around we did not grant LEVEL2 after a NO_OPLOCK file got written to. Windows does grant LEVEL2 in this case. With the have_level2_oplocks in brlocks.tdb we can now grant LEVEL2 in this case as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-11torture: Extend the raw.oplock.doc1 testVolker Lendecke1-7/+21
If delete_on_close is set, there is no oplock break. Check that. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-06smbd: Remove FORCE_OPLOCK_BREAK_TO_NONEVolker Lendecke1-0/+3
This flag existed to break an exclusive or batch oplock in just one instead of two steps down to "no oplock" when we did an allocation or file size change. Running raw.oplock against W2k12 differs in this respect from W2k3: W2k12 takes two steps (via level2) to break to none. This removes the special flag that we only had for compatibility with systems older than W2k12... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep 6 00:47:07 CEST 2013 on sn-devel-104
2013-09-05torture: Adapt raw.oplock to w2k12Volker Lendecke1-6/+18
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2012-09-14s4:torture: fix error reporting in the raw.oplock-brl3 testMichael Adam1-2/+1
Error was assigned to a variable that was not returned. Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Sep 14 14:05:20 CEST 2012 on sn-devel-104
2012-09-10smbtorture: Test that delete requests are not specialVolker Lendecke1-0/+78
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-18s4-torture: Improve torture test boilerplate, use torture_assert()Andrew Bartlett1-6/+2
This ensures that if this fails, it is reported as a subunit error correctly. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri May 18 09:35:13 CEST 2012 on sn-devel-104
2011-11-29s4:torture: use tctx->ev as event context for pollingStefan Metzmacher1-2/+1
metze
2011-11-21Fix a bunch of "warning: variable ‘XXXX’ set but not used ↵Jeremy Allison1-6/+0
[-Wunused-but-set-variable]" warnings from the new gcc. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Nov 21 23:39:08 CET 2011 on sn-devel-104
2011-08-13torture: use tevent_ functions names instead of the legacy event_ onesSimo Sorce1-3/+3
2011-03-19source4/torture/raw: Fix prototypes for all functions.Jelmer Vernooij1-0/+1
2011-01-31smbtorture4 test for bug #7928 - Samba problems with kernel oplocks option ↵Pavel Shilovsky1-0/+95
set to "no"
2010-12-11s4-smbtorture: Make test names lowercase and dot-separated.Jelmer Vernooij1-40/+40
This is consistent with the test names used by selftest, should make the names less confusing and easier to integrate with other tools. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-07-16s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell1-6/+6
this converts all callers that use the Samba4 loadparm lp_ calling convention to use the lpcfg_ prefix. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-05-18Finish removal of iconv_convenience in public API's.Jelmer Vernooij1-1/+0
2010-05-13Now we behave as Windows does, remove a Samba3 specific test return.Jeremy Allison1-1/+7
Jeremy.
2009-12-21s4 torture: Add RAW-OPLOCK-EXCLUSIVE7 which is similar to BATCH19Tim Prouty1-0/+171
2009-12-21s4 torture: Update raw oplock to use win7 as the baseline for rename oplock ↵Tim Prouty1-13/+66
break behavior
2009-12-21s4 torture: Be more permissive with share modes for oplock testingTim Prouty1-2/+4
Share modes are tested elsewhere, and there is currently an outstanding issue about share mode contention for nt-passthrough levels: http://lists.samba.org/archive/cifs-protocol/2009-December/001227.html
2009-12-21s4 torture: Do a better job of closing open files in RAW-OPLOCK.Tim Prouty1-5/+4
2009-12-03s4 torture: Add a new RAW-OPLOCK test: BATCH26Tim Prouty1-0/+108
Try a rename with a wide-open share mode on an already open file and the there is still share mode contention. For the reason why see: http://social.msdn.microsoft.com/Forums/en-US/os_fileservices/thread/3ca14dc9-da1f-4786-a8f7-a86e9903db0c Msft's anser: After further review, The reason for server to fail with sharing violation is that the windows server that executes a path-based rename request opens the file for DELETE access, but only with FILE_SHARED_READ as ShareAccess . Therefore, the existing open(frame 76), which has shared read/write/delete , is compatible with the Windows servers access mode (DELETE), but Windows servers open is not compatible with access mode in existing open. Note that it is correct to state that the logic in Windows server could have been written to allow shared read/write/delete in which case it would succeed as you mention. The behavior here is historical based on the existing implementation.
2009-12-03s4 torture: Close the third handle in RAW-OPLOCK-BATCH22Tim Prouty1-2/+5
2009-12-03s4 torture: Convert an error to a warning in RAW-OPLOCK-BATCH22Tim Prouty1-12/+27
Some servers choose to mark a client as bad if they fail an oplock break request by timing out (win7 is an example). Once the client is marked as bad, future oplock requests will timeout instantly. This causes subsequent runs of this test to fail, so rather than erroring out as a failure, a warning is printed instead. There is also a bug in w2k3 where it was incorrectly returning contending a share mode lock. It worked in XP and has been re-fixed in win7. This can also now be run against samba3.
2009-12-03s4 torture: Convert to a more modern version of read in RAW-OPLOCK-BATCH4Tim Prouty1-5/+7
2009-12-03s4 torture: Allow some implementations to break from level1 to none with two ↵Tim Prouty1-7/+13
breaks
2009-12-01s4 torture: Change oplock to use passthrough for exclusive3/batch11Tim Prouty1-2/+2
In light of the INVALID_LEVEL that is seen for RAW_SFILEINFO_END_OF_FILE_INFO requests on a path, I'm changing these back to using the passthrough RAW_SFILEINFO_END_OF_FILE_INFORMATION to test the oplock break behavior as originally intended
2009-11-25s4 torture: Change RAW-OPLOCK to use the documented version of ↵Tim Prouty1-4/+4
SET_END_OF_FILE_INFO The passtrhough version of SET_END_OF_FILE_INFO is tested in RAW-SFILEINFO-END-OF-FILE. Additionally, the first opener is changed to use SHARE_WRITE for the share mode since SET_END_OF_FILE_INFO actually writes data to the file via truncating/extending.
2009-10-20s4-torture: ran minimal_includes.pl over source4/tortureAndrew Tridgell1-5/+0
This reduces compile time somewhat.
2009-10-15s4-smb: declare root_fid as a file handleAndrew Tridgell1-40/+40
In order to implement root_fid in the s4 SMB server we need to declare it as a handle type, just as for other fnum values in SMB. This required some extensive (but simple) changes in many bits of code.
2009-10-01s4/torture: fix typo in test commentSteven Danneman1-1/+1
2009-09-29s4/torture: fix RAW-OPLOCK-STREAM1 test after commit a11bb14Steven Danneman1-11/+12
We were pulling junk memory for our stream names after the reordering of the struct definition.
2009-09-29s4/torture: Allow receiving of oplock break requests in any orderSteven Danneman1-88/+159
Previously, the oplock torture tests, being single threaded, required the server to return oplock break requests, and other SMB packets in a specific order for us to verify "correctness". Of course, in several cases the protocol allows the break packets, especially breaks to levelII to come back in any order. With tevent we're now able to wait for oplock breaks in the middle of a torture test. I've added a helper to do this, and modified all oplock tests to allow returning of oplock breaks in any order.
2009-09-29s4/torture: convert printf to torture_comment()Aravind Srinivasan1-2/+4
Allows "make test" and other harnesses to print cleaner output.
2009-09-10s4/torture: don't mix declarations and codeAndrew Tridgell1-22/+22
2009-09-09s4/torture: add new SMB oplock testsAravind Srinivasan1-2/+397
* test if oplocks are granted when requesting delete-on-close * test how oplocks are broken by byte-range-lock requests
2009-09-09s4/torture: convert printf to torture_comment()Aravind Srinivasan1-6/+9
Allows "make test" and other harnesses to print cleaner output.
2009-04-01s4 torture: Add new streams oplock testTim Prouty1-0/+176
2009-02-10s4 torture: Change nttransrename to use a normal access maskTim Prouty1-1/+1
batch9 already tests for stat-only opens
2009-02-02s4:libcliraw: s/private/private_dataStefan Metzmacher1-1/+1
metze
2009-02-02s4:torture: s/private/private_dataStefan Metzmacher1-10/+10
metze
2008-12-29s4:lib/tevent: rename structsStefan Metzmacher1-2/+2
list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze
2008-12-17Samba3 smbd now passes test BATCH23 (with the fix for bug #5979), only ↵Jeremy Allison1-4/+0
BATCH22 left to fix. Jeremy.
2008-11-02Remove another use of global_loadparm.Jelmer Vernooij1-1/+2
Eventually, we should move some of these parameters into a separate struct (perhaps into smb_transport_options?), to avoid the long lists of parameters.
2008-11-02Fix the build.Jelmer Vernooij1-1/+1
2008-10-24Eliminate another instance of global_loadparm.Jelmer Vernooij1-1/+2