1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

226 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
5b824eb17b s4:torture - remove unused variables 2010-04-06 14:54:11 +02:00
Andrew Tridgell
b690fedef5 s4-waf: removed the AUTOGENERATED markers
we won't be using the mk -> wscript generator again
2010-04-06 20:27:16 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
844acb2260 build: waf quicktest nearly works
Rewrote wafsamba using a new dependency handling system, and started
adding the waf test code
2010-04-06 20:26:48 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00
Steven Danneman
2523b20349 s4/torture/smb2: Add two new SMB2 compound tests
These tests server behavior when a client compounds both synchronous
and asynchronous requests.
2010-02-23 13:15:45 -08:00
Andrew Tridgell
700f464951 s4-torture: use TYPESAFE_QSORT() in smbtorture 2010-02-13 22:36:12 +11:00
Andrew Tridgell
f692c6dbc4 s4-torture: more useful error message in SMB2-DIR 2010-02-08 11:05:00 +11:00
Matt Kraai
d8071e7ed7 Change uint_t to unsigned int in source4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Jelmer Vernooij
f679def4f2 s4: Fix a few warnings. 2010-01-21 16:15:11 +13: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
Tim Prouty
f4aa47b5ab s4 torture: win 7 doesn't like the sequential_only flag for directories
Remove it for now
2009-12-07 16:54:16 -08:00
Zack Kirsch
d252d23ff1 s4 torture: Port RAW-ACLS tests to SMB2
- The smblsa calls had to be commented out for now and should be fixed
  later, but they aren't crucial to the test.
- The first two tests from RAW-ACLS were already ported to
  torture_smb2_setinfo() and test_create_acl(). Modifications were
  made similar to the RAW-ACLS changes.
- test_sd_get_set() was ported, but does not pass against XP or Vista;
  it is not added to the SMB2-ACLS test suite.
- printf -> torture_comment / torture_warning / torture_result
2009-12-07 16:54:16 -08:00
Zack Kirsch
8ceb428c55 s4 torure: Add SMB2 utility functions
- Add a torture_setup_dir() equivalent in SMB2, called smb2_util_setup_dir().
- Add verify_sd() and verify_attrib() helper functions for SMB2.
2009-12-07 16:54:16 -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
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
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
Andrew Tridgell
9f3ac810a6 s4-torture: fixed error code for s4 in SMB2-LOCK test
s4 returns NETWORK_NAME_DELETED if you attempt to use an invalid tree connection
for a lock. This test (correctly I think) happens before we validate the file handle.
That implies that when you pass both a closed handle and a invalid tree you
should get NT_STATUS_NETWORK_NAME_DELETED.
2009-11-27 19:42:11 +11:00
Andrew Tridgell
f6ecb4efb0 s4-torture: fixed expected error codes for s4 in SMB2-LOCK
I think the error/success codes returned by windows for these tests
are quite bogus. The ones s4 gives are much more reasonable. The
locking ones returning NT_STATUS_SUCCESS could lead to data loss, as
an application thinks it has a file locked correctly when it fact it
doesn't, so it could do an unsafe modify.
2009-11-27 16:05:06 +11:00
Andrew Tridgell
056473d588 torture: fixed SMB2-LOCK valgrind error 2009-11-27 16:05:05 +11:00
Steven Danneman
f66612f62e s4/torture: port SMBv1 RAW-LOCK tests to SMBv2
RAW-LOCK ported as:

RAW-LOCK-LOCK, RAW-LOCK-LOCKX -> SMB2-LOCK-LOCK
RAW-PIDHIGH -> removed, no longer relevant
RAW-ASYNC -> SMB2-LOCK-ASYNC, SMB2-LOCK-CANCEL, SMB2-LOCK-CANCEL-TDIS, SMB2-LOCK-CANCEL-LOGOFF
RAW-ERRORCODE -> SMB2-LOCK-ERRORCODE
RAW-CHANGETYPE -> removed, no longer relevant
RAW-ZEROBYTELOCKS -> SMB2-LOCK->ZEROBYTELENGTH
RAW-UNLOCK -> SMB2-LOCK-UNLOCK
RAW-MULTIPLE_UNLOCK -> SMB2-LOCK-MULTIPLE-UNLOCK
RAW-STACKING -> SMB2-LOCK-STACKING

BASE-LOCK ported as:

BASE-LOCK-LOCK1 -> SMB2-LOCK-ERRORCODE, timeout is no longer relevant
BASE-LOCK-LOCK2 -> SMB2-LOCK-CONTEND, SMB2-LOCK-LOCK, SMB2-LOCK-CONTEXT
BASE-LOCK-LOCK3 -> SMB2-LOCK-RANGE
BASE-LOCK-LOCK4 -> SMB2-LOCK-OVERLAP
BASE-LOCK-LOCK5 -> SMB2-LOCK-STACKING
BASE-LOCK-LOCK6 -> SMB2-LOCK-CANCEL, change_locktype no longer relevant
BASE-LOCK-LOCK7 -> SMB2-LOCK-RW-SHARED, SMB2-LOCK-RW-EXCLUSIVE
2009-11-25 12:55:48 -08:00
Steven Danneman
7f14388721 s4/libcli: rename previously reserved field in SMB2 LOCK struct
The lock.in.reserved field has been renamed lock_sequence in the
SMB 2.1 dialect.  See MS-SMB 2.2.26.
2009-11-25 12:55:48 -08:00
Matthias Dieter Wallnöfer
e406c17b2f s4:torture/smb2/oplock - Remove unneeded "status" redeclarations 2009-11-21 17:37:42 +01:00
Matthias Dieter Wallnöfer
ec49360778 s4:torture/smb2/notify - Rename nested "fname" variable to prevent warnings 2009-11-21 17:37:41 +01:00
Stefan Metzmacher
c2a29967ea SMB2-LOCK: make use of torture_assert_*()
This is needed in order to mark tests as known failures.

metze
2009-11-18 08:24:13 +01:00
Aravind Srinivasan
15d93a5d8e s4/torture: Port SMBv1 Change Notify tests to SMBv2
* Ported all tests from raw/notify.c to smb2/notify.c
* Parameterized the max_buffer_size so it can be set on a
  per-target basis.
* Fixed CHECK macros to use torture_result
* Created a SMB2-NOTIFY test suite
2009-11-17 17:06:26 -08:00
Steven Danneman
c14b0cea48 torture/smb2: make SMB2 BRL tests pass against W2K8R2
The BRL tests previously based their results off several bugs in the
W2K8 byte range lock code.  I've fixed up the tests to pass against
Win7 which has fixed these bugs, and assume that the Win7 behavior
is the default.

I have inverted the test behavior for >63-bit lock requests.  The
tests previously expected NT_STATUS_OK as their default in this
case.  I've changed that default to expect STATUS_INVALID_LOCK_RANGE.
This may requires some changing of make test to compensate.

I've also removed a few test scenarios from VALID-REQUEST in preparation
of replacing them with separate tests ported from RAW-LOCK.
2009-11-17 17:06:26 -08: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
Andrew Tridgell
d1efaf39f5 smb2-torture: samba4 allows SEC_FLAG_SECURITY to be used with privileges 2009-10-18 07:13:47 +11:00
Steven Danneman
622bffce47 s4/torture: fix build break "implicit declaration of function 'isprint'" 2009-10-09 15:13:40 -07:00
Aravind Srinivasan
2f379d70ff s4/torture: Ported SMBv1 RAW-OPEN tests to SMB2-CREATE
Four tests were ported from raw/open.c

One new tests added LEADING-SLASH, which tests that a server provides
the proper error when a relative path is given to a CREATE PDU
with a leading "/".
2009-10-07 14:20:25 -07:00
Aravind Srinivasan
0bff2ced79 s4/torture: convert all printf to torture_comments 2009-10-07 12:18:44 -07:00
Aravind Srinivasan
0ec8fe420f s4/torture: Ported SMBv1 RAW-STREAMS tests to SMB2-STREAMS 2009-10-07 12:16:27 -07:00
Matthias Dieter Wallnöfer
44df2488e3 s4: fix various warnings (not "const" related ones) 2009-10-02 15:33:48 +02:00
Steven Danneman
c38c99af91 s4/torture: second try on renaming oplocks.c to oplock.c
Forgot to "git add" the new file in commit b2bcfaae
2009-10-01 16:40:33 -07:00
Steven Danneman
b2bcfaaeed s4/torture: rename oplocks.c to oplock.c to match SMB1 file layout 2009-10-01 14:59:52 -07:00
Steven Danneman
1160d68062 s4/torture: Ported SMB oplock torture tests to SMB2
I've ported all applicable SMB oplock torture tests to SMB2, giving us
a good base for SMB2 oplock testing.

There are several differences between oplocks in SMB and SMB2, mostly
because of differences in W2K3 and W2K8.  The existing SMB oplock
tests all pass against W2K3, but several fail against W2K8.  These
same tests were failing in SMB2, util I reworked them.

BATCH19, BATCH20: In W2K3/SMB a setfileinfo - rename command wouldn't
cause a sharing violation or break an existing oplock.  It appears that
in W2K8/SMB2 a sharing violation is raised.

BATCH22: In W2K3/SMB when a second opener was waiting the full timeout
of an oplock break, it would receive NT_STATUS_SHARING_VIOLATION after
about 35 seconds.  This bug has been fixed in W2K8/SMB2 and instead
the second opener succeeds.

LEVELII500: Added 1 new test checking that the server returns a proper
error code when a client improperly replies to a levelII to none break
notification.

STREAM1: W2K8 now grants oplocks on alternate data streams.
2009-10-01 14:59:52 -07:00
Steven Danneman
d5643a08e9 s4/torture/smb2: removed SMB2-FIND test
This test has been wholly replaced by the SMB2-DIR-ONE test found
in dir.c.
2009-09-08 13:43:06 -07:00
Steven Danneman
a38409ee4c s4/torture/smb2: Fix several small bugs and style issues in SMB2 dir tests
* removed all uses of printf, replaced with torture_comment
* replaced custom CHECK macros with new torture_assert_*_todo() helpers
* switched string dir name generation to generate_unique_strs() helper,
  to avoid non-deterministic test behavior where generate_rand_str()
  would cause file colissions in the same directory.
2009-09-08 13:43:06 -07:00
Andrew Tridgell
c28096636a s4: 'index' is a libc function 2009-09-08 11:52:44 +10:00
Stefan Metzmacher
f49129e592 torture/smb2: add missing new line to the new SMB2-DIR.FILE-INDEX test
Without this the subunit formated output would be invalid and make test
reports: "UNEXPECTED(error): samba4.smb2.dir (dc).FILE-INDEX"

metze
2009-07-15 12:17:06 +02:00
Stefan Metzmacher
d3be108637 SMB2-GETINFO: test SMB2_ALL_EAS
metze
2009-07-15 10:57:32 +02:00
Stefan Metzmacher
af3444e611 SMB2-CONNECT: unlink the test file at startup
This is needed to get reproducable results...

metze
2009-07-15 10:57:32 +02:00
Stefan Metzmacher
8cb44830e0 torture/smb2: fix crash bugs in the new SMB2-DIR tests
metze
2009-07-15 10:53:13 +02:00
Aravind
5334b79142 torture/smb2: Adding SMB2 Directory enumeration torture tests.
* Most of the tests were ported from SMB torture tests.
* Added one new tests which checks the behavior of the file_index field
  present in SMB2_FIND struct.
* Added one new test to check the enumeration of directories containing
  lots of files (~2000 files) with name lengths varying from 1 to 200 char.
2009-07-14 14:50:06 -07:00
Stefan Metzmacher
9216b2040c SMB2-NOTIFY: windows7 uses a different maximum buffer size
metze
2009-07-06 13:28:12 +02:00
Stefan Metzmacher
7c58a2f237 SMB2-COMPOUND: add some tests for invalid requests
TODO: check why the INVALID1 tests fails with --signing=required.

metze
2009-06-09 19:33:47 +02:00
Stefan Metzmacher
ba42cccf00 s4:torture: add SMB2-COMPOUND test
metze
2009-06-09 16:49:33 +02:00