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

734 Commits

Author SHA1 Message Date
Tim Prouty
fd0c3a2264 s4 torture: Do a better job of closing open files in RAW-OPLOCK. 2009-12-21 17:27:36 -08:00
Andrew Tridgell
87f28cc267 s4-torture: another unsigned comparison bug 2009-12-21 23:41:08 +11:00
Zachary Loafman
daa561d75b s4 torture: Add test to show archive bit behavior with directories
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-18 10:52:45 -08:00
Tim Prouty
9b869230a7 s4 torture: Fix RAW-STREAMS-DELETE to pass against samba3 2009-12-18 10:52:45 -08:00
Tim Prouty
cfbf62dbfd s4 torture: RAW-STREAMS-NAMES Make sure the create time of the streams are different from the base file 2009-12-17 18:13:54 -08:00
Tim Prouty
c3582f923e s4 torture: Add RAW-STREAMS-RENAME3 to show error when trying to overwrite a stream with an open handle
A normal file overwrite in this case would return NT_STATUS_ACCESS_DENIED,
but if a stream is the target NT_STATUS_INVALID_PARAMETER is returned.
2009-12-17 18:13:48 -08:00
Tim Prouty
f8bb5a60e7 s4 torture: Parameterize streams delete behavior rather than commenting out the check. 2009-12-17 17:58:35 -08:00
Tim Prouty
f02206d933 s4 torture: RAW-STREAMS-CREATEDISP Use a normal deny mode 2009-12-17 17:58:35 -08:00
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
Andrew Tridgell
893564bc64 torture: fixed socket leak in BENCH-TCON test
The BENCH-TCON test was leaving the socket open. A smbclie_tdis()
closes the tree connection, but does not close the socket.

This caused the build farm to run out of file descriptors
2009-10-12 16:11:53 +11:00
Jeremy Allison
46d1933240 Exteded RAW-RENAME test to catch regressions in bug 6781.
Jeremy.
2009-10-07 16:52:29 -07:00
Matthias Dieter Wallnöfer
44df2488e3 s4: fix various warnings (not "const" related ones) 2009-10-02 15:33:48 +02:00
Aravind Srinivasan
b529a1e987 s4/torture: Add two new SMB RAW-OPEN tests
* Add chained NTCREATEX_READX test which first tries to open/read
  a non-existant file failing on the open, then attempts the same
  operation on a file that does exist, opening and reading
  successfully.

* Add test for open_dispositions on directories.
2009-10-01 17:14:53 -07:00
Aravind Srinivasan
50db2902ee s4/torture: convert printf to torture_comment() in RAW-OPEN
Allows "make test" and other harnesses to print cleaner output.
2009-10-01 17:14:53 -07:00
Steven Danneman
49fdeaeaf6 s4/torture: fix typo in test comment 2009-10-01 14:59:52 -07:00
Steven Danneman
9af9dbeaf3 s4/torture: fix RAW-OPLOCK-STREAM1 test after commit a11bb14
We were pulling junk memory for our stream names after the reordering
of the struct definition.
2009-09-29 19:25:48 -07:00
Steven Danneman
8c0d239317 s4/torture: Allow receiving of oplock break requests in any order
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-29 19:04:36 -07:00
Aravind Srinivasan
6e4bf59d80 s4/torture: convert printf to torture_comment()
Allows "make test" and other harnesses to print cleaner output.
2009-09-29 19:04:36 -07:00
Tim Prouty
cc3a6770c7 unlink defer torture test 2009-09-28 21:36:46 -07:00
Tim Prouty
ad96c11182 s4 torture: Fix RAW-STREAMS to request more specific permissions
This allows RAW-STREAMS to pass when the user isn't root on some
systems that don't give full access rights to non-root users.
2009-09-24 10:59:33 -07:00
Andrew Tridgell
a11bb148f7 s4/torture: don't mix declarations and code 2009-09-10 12:14:53 +10:00
Aravind Srinivasan
4d7685c1d4 s4/torture: add new SMB oplock tests
* test if oplocks are granted when requesting delete-on-close
* test how oplocks are broken by byte-range-lock requests
2009-09-09 10:22:13 -07:00
Aravind Srinivasan
c091d4b08c s4/torture: convert printf to torture_comment()
Allows "make test" and other harnesses to print cleaner output.
2009-09-09 10:22:12 -07:00
Tim Prouty
09e9904f18 s4 torture: Extend the RAW-RENAME test to more fully test directory renames.
The existing test was only covering files opened underneath the
directory that was being renamed.  It is not uncommon for windows
clients to actually hold a read-only handle to a directory open across
the rename, which it turns out doesn't return NT_STATUS_ACCESS_DENIED.
Additionally, holding a handle open to a stream on the directory is
also allowed.
2009-08-06 17:07:49 -07:00
Andrew Tridgell
8bba340e65 s4 now supports the large readx extension 2009-08-05 12:08:30 +10:00
Andrew Tridgell
88d206070d skip the readbraw tests if the server does not support it
This allows the RAW-READ test to pass against w2k8
2009-08-05 11:32:01 +10:00
Stefan Metzmacher
f5b07455d9 RAW-LOCK: fix a compiler warning and make a global static const
metze
2009-07-06 15:49:44 +02:00
Stefan Metzmacher
ad17cf1772 RAW-LOCK: fix the run against w2k3, w2k8, win7rc and samba3/4
We now allow --target=w2k8.

The strange thing is that w2k8 and win7rc only do half of the timeout
that was given by the client.

metze
2009-07-06 15:37:48 +02:00
Matthias Dieter Wallnöfer
15013090df Adds the impersonation level in ntcreatex requests to SAMBA 3 misc torture test
Specifies the impersonation level according to the reporter commit in bug #6283
2009-06-29 18:04:24 +10:00
Volker Lendecke
3014753ebe Fix the posixtimedlock test
The previous version depended on the fact that smb_raw_lock_send just queued
stuff. This changed with ebf5523b6e.
2009-06-15 17:26:56 +02:00
Stefan Metzmacher
09f1754a9b RAW-LOCK: samba4 behaves like windows 7 in regard of locking error codes
metze
2009-04-25 03:16:11 +02:00
Stefan Metzmacher
4ab243bcab s4:torture: use torture api instead of printf for RAW-LOCK
metze
2009-04-25 03:15:58 +02:00
Stefan Metzmacher
88e9f72473 s4:tortore: use torture api instead of printf in RAW-RENAME
metze
2009-04-25 03:15:55 +02:00
Zack Kirsch
108cf27bb1 s4 torture: Addition to RAW-BENCH-LOCK to take a configurable number of locks before starting the test
This can be useful for benchmarking as well as stress testing.
2009-04-01 20:59:52 -07:00
Zach Loafman
9d95f8704d s/NT_STATUS_WIN7_INVALID_RANGE/NT_STATUS_INVALID_LOCK_RANGE/g 2009-04-01 20:59:52 -07:00
Tim Prouty
f92140b716 s4 torture: Remove unused parameter 2009-04-01 20:02:31 -07:00
Tim Prouty
5000640bf4 s4 torture: Add new streams oplock test 2009-04-01 20:02:31 -07:00
Andrew Tridgell
a67bc41d6b added a test that triggers a bug in the Samba3 notify code
The Samba3 internal notify code doesn't work correctly when there is
more than one tree connect to the same smbd process. This change to
the RAW-NOTIFY test triggers the bug.
2009-03-10 15:12:48 +11:00
Jeremy Allison
9569d979de And the prize for the most pain caused in the build farm for a simple
typo goes to.....
Tim Prouty !!!!
Sorry Tim, nice test but you made a typo in passing in
the size of an array so we were reading uninitialized
memory :-).
That took far longer than it should have to track down...
(%$&#ing build system....).
The build farm should now slowly go back to normal.
Jeremy.
2009-02-27 20:57:49 -08:00
Jeremy Allison
bcadb77c18 Add another torture test inspired by George @ Apple.
Inside a directory, keep a file open and then renaming
the directory should fail with ACCESS_DENIED. This
is connected to the test case where the close was
failing due to a delayed write on a file not being
able to succeed when Samba allowed the containing
directory to be renamed.

I will fix this in the server shortly (this should be done
across connections also but with will be very hard
in Samba - would need a full scan of the open file
db on every directory rename) - so I will fix for
the local case first (scanning local file opens
inside an smbd is cheap).

Jeremy.
2009-02-26 10:13:57 -08:00
Jeremy Allison
cde5724780 Added torture test from a usage case from the Apple OS/X client.
Setting an attribute on a stream fnum must change the attribute
on the base file.
Jeremy.
2009-02-24 17:32:22 -08:00
Zack Kirsch
2539d678f5 s4 torture: Add comment to clarify test 2009-02-20 16:42:50 -08:00
Steven Danneman
1a0aed36c0 Added torture tests to RAW-NOTIFY
* This adds a test to check the change notify behavior of the SMB server
  when more events have been generated than can be returned in a single
  change notify response.

* Second test makes sure the server doesn't return notification events
  for changes to the watched directory itself
2009-02-20 14:10:29 -08:00
Tim Prouty
6bac890533 s4 torture: Add new test to create a file with a lot of streams
This tests how streaminfo deals with large buffers

smbclient seems to have problems when the buffer size approaches the
max data size.  Also smbclient exposes no way to specify the max data
size that is sent in a trans2 request.  Instead it hardcodes in a much
larger max than windows uses.  For these reasons this test isn't
actually run, but is more of a reference for how windows handles
streaminfo buffers.
2009-02-18 23:48:35 -08:00
Tim Prouty
7a2c4acf86 s4 torture: Add additional streams create disposition test 2009-02-18 23:48:35 -08:00
Aravind Srinivasan
4d83d3a286 s4 torture: Add rename test to imitate the way OS X renames files
This tests for mis-behaved case-insensitive get_real_filename
implementations.
2009-02-13 13:18:54 -08:00
Zack Kirsch
4e1a4cbe1f s4 torture: Smbtorture additions for Windows BRL
- Adds a few new BRL tests to RAW-LOCK
- Adds a "win7" target to allow torture to handle protocol changes in
  windows 7
2009-02-11 12:23:52 -08:00
Zack Kirsch
307f4a66ac s4 torture: Two minor fixes to smbtorture BRL tests. 2009-02-11 12:23:32 -08:00
Tim Prouty
7eb097a66d s4 torture: Change nttransrename to use a normal access mask
batch9 already tests for stat-only opens
2009-02-10 19:35:33 -08:00
Stefan Metzmacher
0ac7792e02 s4:libcliraw: s/private/private_data
metze
2009-02-02 13:08:51 +01:00
Stefan Metzmacher
ab7f003aad s4:torture: s/private/private_data
metze
2009-02-02 13:08:38 +01:00
Tim Prouty
a65f1b9655 s4 torture: Add new create disposition test to RAW-STREAMS 2009-01-09 11:45:31 -08:00
Andrew Tridgell
c81863e868 added support for stream renames in Samba4
This allows the RAW-STREAMS test to work again. We still have some
limitations though:

  - renames of a stream to the default stream doesn't work
  - delete on close handling between streams and the main file 
    is still broken
2009-01-07 16:46:34 +11:00
Tim Prouty
2ddaebb2e1 s4 torture: Add more rename tests to RAW-STREAMS
There is one part of the new rename tests that passes against windows,
but doesn't pass against samba3 right now.  Windows allow renaming a
stream to the default stream, but none of the current streams module
support this.  When this ability is added the check for samba can be
removed from this test.

This patch also adds a missing unlink in the cleanup of
test_stream_delete and changes the order that the tests are run to be
consistent with the physical order in the file.
2009-01-04 19:31:30 -08:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
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-29 20:46:40 +01:00
Jelmer Vernooij
dcc4081f75 Fix more compiler warnings. 2008-12-23 23:22:57 +01:00
Jeremy Allison
f1389a3950 Make it clearer when RAW-STREAMS is failing (don't always print names).
Jeremy.
2008-12-22 11:58:38 -08:00
Jeremy Allison
fcadf47a15 Add torture test for bug #5986 - streams rename, so we don't regress.
Jeremy.
2008-12-19 18:01:26 -08:00
Stefan Metzmacher
0df3036730 RAW-CHKPATH: not every server behaves like samba3...
metze
2008-12-18 13:31:41 +01:00
Jeremy Allison
55620b4e3c Samba3 smbd now passes test BATCH23 (with the fix for bug #5979), only BATCH22 left to fix.
Jeremy.
2008-12-17 17:30:18 -08:00
Jeremy Allison
3c5c3aaa74 Added torture test for doing an openX over a directory
to ensure we get the correct error message.
Jeremy.
2008-12-13 13:10:48 -08:00
Stefan Metzmacher
db369b5567 RAW-STREAMS: test stream renames
metze
2008-12-01 14:45:06 -08:00
Stefan Metzmacher
540e6376cc RAW-STREAMS: some more tests...
metze
2008-12-01 14:44:42 -08:00
Stefan Metzmacher
87bb9e178f RAW-STREAMS: test valid character in the range of 0x01 => 0x7F
metze
2008-12-01 14:43:58 -08:00
Stefan Metzmacher
b25d69e3a8 RAW-STREAMS: check some strange stream name combinations
metze
2008-12-01 14:43:23 -08:00
Stefan Metzmacher
9519d5dd71 RAW-CHKPATH: test every character in the range of 0x01 => 0x7F
metze
2008-12-01 14:42:48 -08:00
Jeremy Allison
d64caaf593 Remove debug code added in error.
Jeremy.
2008-11-08 23:06:21 -08:00
Jeremy Allison
813bf8b4f4 Fix a subtle logic bug in the adaption of se_create_child_secdesc(), pass RAW-ACL inheritance tests. Only access masks for SD get/set left to fix.
Jeremy.
2008-11-08 22:57:57 -08:00
Jeremy Allison
87f563c230 Start factoring out the inheritance differences.
Jeremy.
2008-11-06 01:58:56 -08:00
Jeremy Allison
bfc59f63f3 Pass all of RAW-ACLS except for inheritence. Working on that next.
Jeremy.
2008-11-04 01:34:08 -08:00
Volker Lendecke
0953688012 Trigger (and fix) a bug in Samba3 making smbd an infinite data source
A deferred open directly followed by a ulogoffX makes smbd3 send an infinite
stream of ERRinvuid replies :-(
2008-11-04 09:41:15 +01:00
Jeremy Allison
d98e48c7cb Be more verbose about a directory ACL error.
Jeremy.
2008-11-03 23:54:05 -08:00
Jelmer Vernooij
ff36c52d8c Remove another use of global_loadparm.
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-02 16:07:28 +01:00
Jelmer Vernooij
3ebc574be4 Fix the build. 2008-11-02 02:30:21 +01:00
Jelmer Vernooij
b034c519f5 Add gensec_settings structure. This wraps loadparm_context for now, but
should in the future only contain some settings required for gensec.
2008-11-02 02:05:48 +01:00
Jelmer Vernooij
7a6190e9a7 Remove another use of global_loadparm. 2008-11-02 01:03:26 +01:00
Stefan Metzmacher
67c5aca1e8 RAW-ACLS: test the behavior of NULL DACL vs. empty DACL
This is based on the torture test attached to bug 4284
by Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>.

metze
2008-10-28 17:14:53 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Jelmer Vernooij
8b06312f7e Eliminate another instance of global_loadparm. 2008-10-24 13:13:27 +02:00
Volker Lendecke
e037305187 Add the oplock-batch25 test showing that a writeattr does not break an oplock
Probably that's already somewhere else, but I did not find it.
2008-10-14 13:30:13 +02:00
Jelmer Vernooij
63291018df Use const. 2008-10-10 15:00:35 +02:00
root
687ce0b60a Use a getatr instead to make things cleaner.
Jeremy.
2008-09-30 12:44:24 -07:00
Jeremy Allison
a238f17e27 Add in test name visible on the wire or in debug logs so you can see when particular tests start.
Jeremy.
2008-09-30 12:33:00 -07:00
Jelmer Vernooij
235b729309 Cope with API changes. 2008-09-30 03:07:08 +02:00
Jelmer Vernooij
181ee01da6 Pass session options around; saves another use of global_loadparm. 2008-09-30 02:47:19 +02:00
Jelmer Vernooij
4e8cb60222 Remove global_loadparm instance. 2008-09-30 02:11:55 +02:00
Jelmer Vernooij
c8a19f0b83 Pass options struct into session initialization functions rather than
using global_loadparm.
2008-09-30 01:29:53 +02:00
Jeremy Allison
857609732f Add test to show you can open for delete a readonly file.
Jeremy.
2008-09-26 15:20:27 -07:00
Andrew Tridgell
a22b9d6485 fixed the data in SAVEFILE op in RAW-OFFLINE
(This used to be commit 3441ea5df5)
2008-08-24 17:42:29 +10:00
Andrew Tridgell
b030743d74 show the bad data in RAW-OFFLINE
also show the worst case latencies so far, matching tsm_torture
(This used to be commit 5859bb337c)
2008-08-24 17:38:43 +10:00
Andrew Tridgell
3efd7d2262 don't use zero data for the first file in RAW-OFFLINE
the most likely bugs in HSM involve zero data, due to the
dm_punch_hole() request
(This used to be commit 330ab956ea)
2008-08-23 11:54:02 +10:00
Stefan Metzmacher
c1c6c1b609 RAW-OPEN: be more strict in create_option checking
metze
(This used to be commit d548f5dee5)
2008-08-14 15:14:53 +02:00
Andrew Tridgell
336f6810ce expanded the SMB2-CREATE and RAW-OPEN tests to explore more of how the
create options fields are supposed to work
(This used to be commit 0576875ecc)
2008-08-14 17:26:30 +10:00
Volker Lendecke
853ef0d5ef Fix RAW-OPEN against Samba3
This test assumed that fnums are recycled immediately after a close. This is
not true on Samba 3.

Andrew B., I assume this is just a bug in the test. Assuming recycled fnums
might be true on Windows and Samba 4, but I don't think we should assume this
everywhere.

Volker
(This used to be commit a4c3a59d47)
2008-07-19 12:47:31 +02:00
Andrew Bartlett
853194c308 More 'must be ignored' options from the MS-SMB doc.
Also in particular the 'sync' flags (which Samba has traditionally
ignored).

Thanks to Olivier Salamin <olivier.salamin@gmail.com> for pointing out
more flags that needed to be handled.

Andrew Bartlett
(This used to be commit 370bb39cd7)
2008-07-18 18:40:19 +10:00
Andrew Bartlett
e92125e631 Ignore and handle more NT Create & X options.
The MS-SMB document explains that some of these options should be
ignored.  The test proves it.

/* Must be ignored by the server, per MS-SMB 2.2.8 */
/* Must be ignored by the server, per MS-SMB 2.2.8 */

If we implement HSM in samba4 (likely) we should honour this bit.
/* Don't pull this file off tape in a HSM system */

Andrew Bartlett
(This used to be commit 502739ff90)
2008-07-16 14:00:18 +10:00
Andrew Tridgell
cf4899cf4c check use of mincnt past EOF in SMB
(This used to be commit 763c9d344f)
2008-05-26 15:00:56 +10:00
Stefan Metzmacher
2f653e814a RAW-STREAMS: better test the bahavior of streams on directories
Note: this has a samba3 specific code path, which we should fixed.

metze
(This used to be commit 5c5c866838)
2008-05-23 09:55:16 +02:00
James Peach
9a975a868e smbtorture: Add RAW-BENCH-TCON benchmark.
Add a simple test to benchmark the rate at which a server can accept
new tree connections. You can tune the length of time to run the
benchmark for and the number of parallel connections to make.
(This used to be commit ea3f4b9305)
2008-05-20 11:35:32 -07:00
Jelmer Vernooij
1e973565b6 Move subunit infrastructure code into lib/torture.
(This used to be commit 5b44d8121d)
2008-04-27 14:02:46 +01:00
Simo Sorce
7f464f0628 Fix more failing tests to pass the event context.
(This used to be commit d6c5d8baf0)
2008-04-22 16:40:44 -04:00