1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

626 Commits

Author SHA1 Message Date
Tim Prouty
5c13a90abe s4 torture: close handle instead of using exit 2009-12-17 17:58:34 -08:00
Aravind Srinivasan
b85f6f63e6 s4 torture: Add new RAW-SEARCH test to explore strange max count behavior
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-15 09:51:36 -08:00
Aravind Srinivasan
8ba02d9ed9 s4 torture: Update RAW-QFILEINFO to only test info levels that are supported by the server
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-15 09:40:05 -08:00
Zach Loafman
5930f770d2 s4 torture: Convert RAW-OPEN to suite form 2009-12-15 09:13:24 -08:00
Stefan Metzmacher
d3d2e3988f RAW-STREAMS: convert failing tests to torture api
This is needed as we want to mark failing tests as
known failures.

metze
2009-12-08 13:50:15 +01:00
Tim Prouty
1bf825b6f8 s4 torture: Cleanup RAW-ACLS a bit
Don't check SEC_DESC_DACL_AUTO_INHERITED right now
Disable RAW-ACLS-INHERITFLAGS for the short term
Update samba4's knownfail accordingly
2009-12-07 17:59:28 -08:00
Tim Prouty
f717a79eff s4 torture: Add a new torture:hide_on_access_denied parameter
It appears some newer versions of windows return
NT_STATUS_OBJECT_NAME_NOT_FOUND on a createfile when access is denied
rather than NT_STATUS_ACCESS_DENIED.  I'm not sure how this translates
to directory enumeration yet, but for now make this a parameter that
can be checked in the various torture tests.

This also gets RAW-ACLS and SMB2-CREATE passing against win7.
2009-12-07 16:54:17 -08:00
Zack Kirsch
1724273ab9 s4 torture: RAW-ACL Improvements
- Change RAW-ACLS test suite so each test can be run individually.
- Add verify_sd() and verify_attrib() helper functions.
- Change test_nttrans_create() to work for both files and directories.
- Fix a segfault in test_inheritance() when the test errors out early.
- test_sd_get_set() does not pass against XP or Vista, so it is no longer added
  to the RAW-ACLS test suite.
- Minor fixes to test_inheritance().
- New INHERITFLAGS test, which tests the auto inheritance flags a bit more.
- printf -> torture_comment / torture_warning / torture_result
2009-12-07 16:54:16 -08:00
Tim Prouty
919440a2aa s4 torture: Convert RAW-STREAMS to a set of test suites rather than a monolithic test 2009-12-07 16:52:16 -08:00
Tim Prouty
6bc8a2bf0a s4 torture: Update RAW-RENAME to pass against win7 2009-12-07 16:52:15 -08:00
Tim Prouty
cd72301efa s4 torture: Add a new RAW-STREAMS test to simulate the summary tab 2009-12-07 16:52:15 -08:00
Tim Prouty
5d66d43667 s4 torture: Fix the streams create disposition tests to actually return an error on failure 2009-12-07 16:52:15 -08:00
Steven Danneman
47f5aac39d s4/torture: add test for zero byte read contention with byte range locks 2009-12-07 16:10:25 -08:00
Steven Danneman
b4c72e44a8 s4/torture: fix >80 column spacing issues 2009-12-07 16:10:24 -08:00
Jeremy Allison
1d3942c534 Make smbtorture4 match Windows behavior.
Jeremy.
2009-12-04 14:02:52 -08:00
Zachary Loafman
3507350ad2 s4 torture: Fix call to smbcli_open
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:46:29 -08:00
Zachary Loafman
a3df55b26f s4 torture: Make RAW-SEARCH pass against win7
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:46:25 -08:00
Zachary Loafman
2dc5bd19d4 s4 torture: Parameterize WRITE_AND_CLOSE support
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:21:22 -08:00
Zachary Loafman
f26a500d9f s4 torture: Add lockread_supported based off of CAP_LOCK_AND_READ
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:21:22 -08:00
Zachary Loafman
5882282dea s4 torture: Allow READ to be parameterized, add more readx tests
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:21:22 -08:00
Tim Prouty
15e1c61027 s4 torture: Add a new RAW-OPLOCK test: BATCH26
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-03 18:54:52 -08:00
Tim Prouty
8f7e5732ef s4 torture: Close the third handle in RAW-OPLOCK-BATCH22 2009-12-03 18:54:52 -08:00
Tim Prouty
522d6bc588 s4 torture: Convert an error to a warning in RAW-OPLOCK-BATCH22
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-03 18:54:52 -08:00
Tim Prouty
fc7832602d s4 torture: Convert to a more modern version of read in RAW-OPLOCK-BATCH4 2009-12-03 18:54:52 -08:00
Tim Prouty
af8b7857ca s4 torture: Allow some implementations to break from level1 to none with two breaks 2009-12-03 18:54:52 -08:00
Steven Danneman
48358b3eaa s4/torture: add multiple lock cancel test
See what happens when we have multiple outstanding lock requests and
we try to cancel both of them within a single LockingAndX.

On Windows, it seems only the first lock in the array is cancelled,
and the second is left pending.  Though, this behavior goes against
the MS-CIFS spec.
2009-12-02 17:28:52 -08:00
Steven Danneman
ad9c5a7b88 s4/torture: add addition multiple lock tests
* test that 2 locks in a single LockAndX are transactional
* test that 1 unlock and 1 lock in a single LockAndX are not
  transactional
* test that SMB2 doesn't like mixed lock/unlock in a single
  PDU
2009-12-02 17:28:52 -08:00
Steven Danneman
dfbb92e2a1 s4/torture: fix build warnings by removing unecessary const 2009-12-02 17:28:51 -08:00
Steven Danneman
438b7c41ae s4/torture: Add target functionality parameters to SMBv1 BRL tests
Abstract the server requirements to pass some BRL tests.

* The new default for >64bit lock tests, is that the server should
  return STATUS_INVALID_LOCK_RANGE.
* Add parameter for targets that don't implement DENY_DOS
2009-12-02 17:28:51 -08:00
Tim Prouty
4e8b6c5992 s4 torture: Change oplock to use passthrough for exclusive3/batch11
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-12-01 11:12:51 -08:00
Tim Prouty
5035a90005 s4 torture: Update RAW-SFILEINFO-END-OF-FILE to test some additional corner cases
It turns out setting the end-of-file with Trans2SetPathInfo using the
snia spec's info level will attempt to open the file, enforcing share
modes, but then subsequentlys fail the setpathinfo with a dos error of
INVALID_LEVEL.  Doing a Trans2SetFileInfo with either end-of-file info
level succeeds as expected.
2009-12-01 11:12:51 -08:00
Tim Prouty
66bf780e6e s4 torture: Change RAW-SFILEINFO-END-OF-FILE to check for share modes by default
Since the windows behavior appears to be a bug, only check for
the windows-style share mode bug if target=<windows variant> is
specified
2009-12-01 11:12:51 -08:00
Tim Prouty
2738e31674 s4 torture: Move target macros to a common header instead of redefining them in multiple files 2009-12-01 11:12:51 -08:00
Matthias Dieter Wallnöfer
2d1bd87f73 s4:torture/raw/lock - Fix "discard const" warnings by introducing "discard_const_p"s 2009-12-01 16:48:47 +11:00
Andrew Tridgell
7359a22219 s4-torture: mark s4 as doing valid lock range tests on SMB 2009-11-27 19:42:10 +11:00
Tim Prouty
b6f972222f s4 torture: Change RAW-OPLOCK to use the documented version of 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-11-25 08:45:58 -08:00
Tim Prouty
6074a058df s4 torture: Add two new setfileinfo tests
These tests expose a potential bug in winXP, win7, and likely others.
There is also a bug in samba where share modes aren't being enforced
where they should.

For more details see:
http://lists.samba.org/archive/cifs-protocol/2009-November/001130.html
2009-11-25 08:45:14 -08:00
Tim Prouty
ce9ac3a685 s4 torture: Split up the torture suite setup for RAW-SFILEINFO
A side effect of this change is that RAW-SFILEINFO now runs the whole
suite instead of just the first test.  I changed the name of the first
test to RAW-SFILEINFO-BASE and changed all of the selftest scripts
that call it.
2009-11-25 08:45:14 -08:00
Stefan Metzmacher
23d81904eb RAW-PING-PONG: use timeval_current/timeval_elapsed instead of start_timer/end_timer
metze
2009-11-24 11:47:31 +01:00
Matthias Dieter Wallnöfer
5dc478e390 s4:torture/raw/unlink - Remove unused variable and label 2009-11-21 17:37:40 +01:00
Matthias Dieter Wallnöfer
3caaf6a84c s4:torture/raw/samba3misc - Add "discard_const_p" macro before a string 2009-11-02 16:36:51 +11:00
Jeremy Allison
e2c84f67a3 Change RAW-STREAMS for s3 to allow rename over an existing stream,
we need to file a CAR to find out why Windows gives INVALID_PARAMETER
for this.
Jeremy.
2009-10-29 16:38:34 -07:00
Andrew Tridgell
84d0047377 s4-torture: ran minimal_includes.pl over source4/torture
This reduces compile time somewhat.
2009-10-20 16:04:46 +11:00
Andrew Tridgell
9ae4daeb96 s4-torture: fixed the streams tests for Samba4
In some cases we were not doing streams tests on s4 that we should. In
others, we were calling tests that are known to fail on s4. Some of
those are a bit puzzling.
2009-10-18 15:06:13 +11:00
Jeremy Allison
d6351adca9 Fix the smbtorture4 build. root_fid is a "union smb_handle". tridge
please check.
Jeremy.
2009-10-17 12:56:15 -07:00
Jeremy Allison
7c51fa6d69 Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba 2009-10-17 10:36:33 -07:00
Andrew Tridgell
dbebe0f621 s4-torture: fixed the default ACL for s4
s4 returns group and world ACEs in the default acl, based on unix
permissions
2009-10-17 13:01:04 +11:00
Andrew Tridgell
05f5f22361 s4-torture: minor debugging enhancements 2009-10-17 13:01:04 +11:00
Andrew Tridgell
7226ba73a0 s4-torture: add a special check for administrators and privileges
lsa privileges calls don't expand groups. darn.
2009-10-17 13:01:03 +11:00
Andrew Tridgell
3c028ff88b s4-smb: declare root_fid as a file handle
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-15 20:03:00 +11:00