summaryrefslogtreecommitdiff
path: root/source4/torture/raw/oplock.c
Commit message (Collapse)AuthorAgeFilesLines
* s4: popt: Global replace of cmdline_credentials -> ↵Jeremy Allison2017-05-111-1/+2
| | | | | | | | | | | popt_get_cmdline_credentials(). Add one use of popt_set_cmdline_credentials(). Fix 80 column limits when cmdline_credentials changes to popt_get_cmdline_credentials(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:torture: Add smb2.oplock test batch9a and raw.oplock test batch9aJeremy Allison2014-11-071-0/+121
| | | | | | | | | | Shows attribute(stat) access open can create a file, and subsequent attribute(stat) opens don't break oplocks. Can be extended to explore more varients. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: Extend the raw.oplock.level_ii_1 testVolker Lendecke2013-10-231-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
* torture: Add a test showing we have to break L2 at open timeVolker Lendecke2013-10-231-0/+105
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: Add oplock break to l2/none testsVolker Lendecke2013-10-231-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>
* torture: Check break level in raw.oplock.exclusive5Volker Lendecke2013-10-231-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>
* torture: Add reproducer for bug 10216Volker Lendecke2013-10-231-0/+12
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: Extend raw.oplock.batch10Volker Lendecke2013-10-151-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>
* torture: Extend the raw.oplock.doc1 testVolker Lendecke2013-10-111-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>
* smbd: Remove FORCE_OPLOCK_BREAK_TO_NONEVolker Lendecke2013-09-061-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
* torture: Adapt raw.oplock to w2k12Volker Lendecke2013-09-051-6/+18
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture: fix error reporting in the raw.oplock-brl3 testMichael Adam2012-09-141-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
* smbtorture: Test that delete requests are not specialVolker Lendecke2012-09-101-0/+78
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s4-torture: Improve torture test boilerplate, use torture_assert()Andrew Bartlett2012-05-181-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
* s4:torture: use tctx->ev as event context for pollingStefan Metzmacher2011-11-291-2/+1
| | | | metze
* Fix a bunch of "warning: variable ‘XXXX’ set but not used ↵Jeremy Allison2011-11-211-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
* torture: use tevent_ functions names instead of the legacy event_ onesSimo Sorce2011-08-131-3/+3
|
* source4/torture/raw: Fix prototypes for all functions.Jelmer Vernooij2011-03-191-0/+1
|
* smbtorture4 test for bug #7928 - Samba problems with kernel oplocks option ↵Pavel Shilovsky2011-01-311-0/+95
| | | | set to "no"
* s4-smbtorture: Make test names lowercase and dot-separated.Jelmer Vernooij2010-12-111-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
* s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell2010-07-161-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>
* Finish removal of iconv_convenience in public API's.Jelmer Vernooij2010-05-181-1/+0
|
* Now we behave as Windows does, remove a Samba3 specific test return.Jeremy Allison2010-05-131-1/+7
| | | | Jeremy.
* s4 torture: Add RAW-OPLOCK-EXCLUSIVE7 which is similar to BATCH19Tim Prouty2009-12-211-0/+171
|
* s4 torture: Update raw oplock to use win7 as the baseline for rename oplock ↵Tim Prouty2009-12-211-13/+66
| | | | break behavior
* s4 torture: Be more permissive with share modes for oplock testingTim Prouty2009-12-211-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
* s4 torture: Do a better job of closing open files in RAW-OPLOCK.Tim Prouty2009-12-211-5/+4
|
* s4 torture: Add a new RAW-OPLOCK test: BATCH26Tim Prouty2009-12-031-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.
* s4 torture: Close the third handle in RAW-OPLOCK-BATCH22Tim Prouty2009-12-031-2/+5
|
* s4 torture: Convert an error to a warning in RAW-OPLOCK-BATCH22Tim Prouty2009-12-031-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.
* s4 torture: Convert to a more modern version of read in RAW-OPLOCK-BATCH4Tim Prouty2009-12-031-5/+7
|
* s4 torture: Allow some implementations to break from level1 to none with two ↵Tim Prouty2009-12-031-7/+13
| | | | breaks
* s4 torture: Change oplock to use passthrough for exclusive3/batch11Tim Prouty2009-12-011-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
* s4 torture: Change RAW-OPLOCK to use the documented version of ↵Tim Prouty2009-11-251-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.
* s4-torture: ran minimal_includes.pl over source4/tortureAndrew Tridgell2009-10-201-5/+0
| | | | This reduces compile time somewhat.
* s4-smb: declare root_fid as a file handleAndrew Tridgell2009-10-151-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.
* s4/torture: fix typo in test commentSteven Danneman2009-10-011-1/+1
|
* s4/torture: fix RAW-OPLOCK-STREAM1 test after commit a11bb14Steven Danneman2009-09-291-11/+12
| | | | | We were pulling junk memory for our stream names after the reordering of the struct definition.
* s4/torture: Allow receiving of oplock break requests in any orderSteven Danneman2009-09-291-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.
* s4/torture: convert printf to torture_comment()Aravind Srinivasan2009-09-291-2/+4
| | | | Allows "make test" and other harnesses to print cleaner output.
* s4/torture: don't mix declarations and codeAndrew Tridgell2009-09-101-22/+22
|
* s4/torture: add new SMB oplock testsAravind Srinivasan2009-09-091-2/+397
| | | | | * test if oplocks are granted when requesting delete-on-close * test how oplocks are broken by byte-range-lock requests
* s4/torture: convert printf to torture_comment()Aravind Srinivasan2009-09-091-6/+9
| | | | Allows "make test" and other harnesses to print cleaner output.
* s4 torture: Add new streams oplock testTim Prouty2009-04-011-0/+176
|
* s4 torture: Change nttransrename to use a normal access maskTim Prouty2009-02-101-1/+1
| | | | batch9 already tests for stat-only opens
* s4:libcliraw: s/private/private_dataStefan Metzmacher2009-02-021-1/+1
| | | | metze
* s4:torture: s/private/private_dataStefan Metzmacher2009-02-021-10/+10
| | | | metze
* s4:lib/tevent: rename structsStefan Metzmacher2008-12-291-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
* Samba3 smbd now passes test BATCH23 (with the fix for bug #5979), only ↵Jeremy Allison2008-12-171-4/+0
| | | | | | BATCH22 left to fix. Jeremy.
* Remove another use of global_loadparm.Jelmer Vernooij2008-11-021-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.