1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

65 Commits

Author SHA1 Message Date
Stefan Metzmacher
f66bd1ae54 r22486: add a flag to ignore timeouts of a request and don't close
the connection on timeout

metze
(This used to be commit 6b23ab1fd2)
2007-10-10 14:51:32 -05:00
Andrew Tridgell
c24b7a045a r19549: fixed some indentation
(This used to be commit ea1e4685d9)
2007-10-10 14:24:48 -05:00
Andrew Tridgell
f721bcda15 r19366: don't fail async echo tests due to rounding errors
(This used to be commit 9389ca13a3)
2007-10-10 14:21:18 -05:00
Jelmer Vernooij
8773e743c5 r19339: Merge my 4.0-unittest branch. This adds an API for more fine-grained
output in the testsuite rather than just True or False for a
set of tests.

The aim is to use this for:
 * known failure lists (run all tests and detect tests that
						started working or started failing). This
   would allow us to get rid of the RPC-SAMBA3-* tests
 * nicer torture output
 * simplification of the testsuite system
 * compatibility with other unit testing systems
 * easier usage of smbtorture (being able to run one test
						and automatically set up the environment for that)

This is still a work-in-progress; expect more updates over the next couple of
days.
(This used to be commit 0eb6097305)
2007-10-10 14:21:12 -05:00
Jelmer Vernooij
d9b4bdd5bb r18565: Fix echo.idl to be Samba3-, MIDL and midlc compatible
(This used to be commit ab0a798c57)
2007-10-10 14:18:47 -05:00
Jelmer Vernooij
909b111f58 r14720: Add torture_context argument to all torture tests
(This used to be commit 3c7a5ce291)
2007-10-10 13:59:13 -05:00
Jelmer Vernooij
4f1c8daa36 r14470: Remove some unnecessary headers.
(This used to be commit f7312dab3b)
2007-10-10 13:57:29 -05:00
Jelmer Vernooij
1060f6b3f6 r14402: Generate seperate headers for RPC client functions.
(This used to be commit 7054ebf024)
2007-10-10 13:57:19 -05:00
Jelmer Vernooij
eefe30b7d8 r14379: Build torture/rpc/ as a seperate smbtorture module. Move helper
functions for rpc out of torture/torture.c
(This used to be commit 1d2d970f3b)
2007-10-10 13:57:16 -05:00
Andrew Tridgell
d0a851e889 r12812: speed up RPC-ECHO with validate some more, and re-enable it under
valgrind in 'make valgrindtest'
(This used to be commit b2030d527a)
2007-10-10 13:49:59 -05:00
Andrew Tridgell
df53401d0c r12811: valgrind on RPC-ECHO with validate is extremely slow - speed it up if
torture:quick is set
(This used to be commit b591b28567)
2007-10-10 13:49:59 -05:00
Jelmer Vernooij
25bb00fbcd r12693: Move core data structures out of smb.h into core.h
torture prototypes in seperate header
(This used to be commit 73610639b2)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
acd6a086b3 r12510: Change the DCE/RPC interfaces to take a pointer to a
dcerpc_interface_table struct rather then a tuple of interface
name, UUID and version.

This removes the requirement for having a global list of DCE/RPC interfaces,
except for these parts of the code that use that list explicitly
(ndrdump and the scanner torture test).

This should also allow us to remove the hack that put the authservice parameter
in the dcerpc_binding struct as it can now be read directly from
dcerpc_interface_table.

I will now modify some of these functions to take a dcerpc_syntax_id
structure rather then a full dcerpc_interface_table.
(This used to be commit 8aae0f168e)
2007-10-10 13:47:48 -05:00
Andrew Tridgell
4544226935 r11818: - changed the option torture:echo_TestSleep=yes/no to the more generic
option torture:quick=yes/no. This should be used in all slow tests to
  enable a quick mode

- enabled the test_rpc_quick.sh tests in 'make quicktest'
(This used to be commit 180c209c1b)
2007-10-10 13:46:33 -05:00
Andrew Tridgell
6481a752a2 r11628: fixed a valgrind error in the rpc echo test
(This used to be commit d340ea7906)
2007-10-10 13:46:01 -05:00
Stefan Metzmacher
b9cbfe64a7 r8876: check the result of AddOne and test some more values
metze
(This used to be commit 6918e9c5a3)
2007-10-10 13:30:14 -05:00
Volker Lendecke
5bddfe7a1a r8875: Rename timeval_diff to timeval_until and revert the arguments. timeval_diff is
not strictly a subtraction function, there can't be negative timevals.

Volker
(This used to be commit 525d75dd24)
2007-10-10 13:30:14 -05:00
Andrew Tridgell
07c395a40b r7657: test addone again after request timeout and destruction to ensure the pipe is still OK
(This used to be commit 9f7f70124f)
2007-10-10 13:18:18 -05:00
Andrew Tridgell
dc8961ad42 r7656: added testing of rpc request timeouts and destruction
(This used to be commit eddf41d5e4)
2007-10-10 13:18:18 -05:00
Stefan Metzmacher
be6b73de65 r7401: add config option to disable the TestSleep() test
torture:echo_TestSleep=no

metze
(This used to be commit 74bb55f3ae)
2007-10-10 13:17:50 -05:00
Jelmer Vernooij
c56ddaf7ef r7195: - Fix echo pipe
- Don't allocate strings
- Give higher preference to the [out] part of variables when they
  are being used by another [out] variable. Also make sure that
  [in] variables never use [out] variables (i.e. switch_is() on an
  [in] variable can no longer use an [out] variable).
(This used to be commit 837c83d77a)
2007-10-10 13:17:25 -05:00
Jelmer Vernooij
03c2d642a6 r7159: Improve the messages from pidl's validator module.
Change the IDL file for the echo interface to match the one we use for
Windows. The only thing different between the two files currently is the
names of the scalar types and the handling of strings.
(This used to be commit b264c61061)
2007-10-10 13:17:21 -05:00
Andrew Bartlett
b075827877 r6524: Fix the error we print when the RPC-ECHO test fails.
Andrew Bartlett
(This used to be commit 4fc2a056cd)
2007-10-10 13:16:22 -05:00
Jelmer Vernooij
4c4738938a r5977: Fix uninitialised memory bug in ndr_pull_ref_ptr(). This fixes the
Test_DoublePointer test failure.
(This used to be commit 4089d5f67d)
2007-10-10 13:11:11 -05:00
Andrew Bartlett
645711c602 r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree...
The main volume of this patch was what I started working on today:
 - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context.
 - Uses sepereate inner loops for some of the DCE/RPC tests

The other and more important part of this patch fixes issues
surrounding the new credentials framwork:

This makes the struct cli_credentials always a talloc() structure,
rather than on the stack.  Parts of the cli_credentials code already
assumed this.

There were other issues, particularly in the DCERPC over SMB handling,
as well as little things that had to be tidied up before test_w2k3.sh
would start to pass.

Andrew Bartlett
(This used to be commit 0453f9d05d)
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
64112074e9 r5465: Add support to multiple levels of pointers in pidl.
Also add a new function to echo.idl that tests this behaviour.
(This used to be commit e5eb5e847e)
2007-10-10 13:10:48 -05:00
Jelmer Vernooij
77701f6ca1 r5453: Treat "embedded" arrays (surrounding structures) somewhat
more generically. The default functions for remembering array sizes
are now used rather then a special local variable.
(This used to be commit 5f7882341f)
2007-10-10 13:10:47 -05:00
Jelmer Vernooij
ea5ddbcb4d r5452: Add implementation + torture test for echo_Surrounding
(This used to be commit 1b71000cc1)
2007-10-10 13:10:47 -05:00
Stefan Metzmacher
4e43af6c69 r5394: as the timing should be fixed in the server now, don't accept to early replies
anymore, also print out usecs in the debug messages

metze
(This used to be commit 9a657f358e)
2007-10-10 13:09:51 -05:00
Andrew Tridgell
341395db51 r5310: allow for rounding errors in the sleep test
(This used to be commit bd2c55a519)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
131dc76d56 r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
66170ef8b3 r5185: make all the events data structures private to events.c. This will
make it possible to add optimisations to the events code such as
keeping the next timed event in a sorted list, and using epoll for
file descriptor events.

I also removed the loop events code, as it wasn't being used anywhere,
and changed timed events to always be one-shot (as adding a new timed
event in the event handler is so easy to do if needed)
(This used to be commit d7b4b6de51)
2007-10-10 13:09:29 -05:00
Andrew Tridgell
bef3fbb6db r4888: use the neater calling convention
(This used to be commit d93b6a5b8e)
2007-10-10 13:09:03 -05:00
Stefan Metzmacher
fae215266b r4690: - add support for async rpc server replies
the backend should check for
(dce_call->state_flags & DCESRV_CALL_STATE_FLAG_MAY_ASYNC)
then it's allowed to reply async

then the backend should mark that call as async with
dce_call->state_flags |= DCESRV_CALL_STATE_FLAG_ASYNC;

later it has to manualy set r->out.result
and then send the reply by calling

status = dcesrv_reply(p->dce_call);

NOTE: that ncacn_np doesn't support async replies yet

- implement an async version of echo_TestSleep

- reenable the echo_TestSleep torture test
  (this need to be more strict when we have support for async ncacn_np)

metze
(This used to be commit f0a0dbeb25)
2007-10-10 13:08:43 -05:00
Andrew Tridgell
ddc10d4d37 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
(This used to be commit 89b74b5354)
2007-10-10 13:08:25 -05:00
Andrew Tridgell
7588a01cb6 r4520: added a enum test function to the echo pipe
(This used to be commit f9e0aa1ab1)
2007-10-10 13:08:17 -05:00
Stefan Metzmacher
13abb52758 r3959: fix compiler warnings
metze
(This used to be commit e28351f710)
2007-10-10 13:06:08 -05:00
Andrew Tridgell
90067934cd r3428: switched to using minimal includes for the auto-generated RPC code.
The thing that finally convinced me that minimal includes was worth
pursuing for rpc was a compiler (tcc) that failed to build Samba due
to reaching internal limits of the size of include files. Also the
fact that includes.h.gch was 16MB, which really seems excessive. This
patch brings it back to 12M, which is still too large, but
better. Note that this patch speeds up compile times for both the pch
and non-pch case.

This change also includes the addition iof a "depends()" option in our
IDL files, allowing you to specify that one IDL file depends on
another. This capability was needed for the auto-includes generation.
(This used to be commit b8f5fa8ac8)
2007-10-10 13:05:09 -05:00
Andrew Tridgell
ba6d5fcb97 r3324: made the smbtorture code completely warning free
(This used to be commit 7067bb9b52)
2007-10-10 13:04:55 -05:00
Andrew Tridgell
aa12305945 r2680: switched the libcli/raw/ code over to use talloc_reference(), which simplifies things quite a bit
(This used to be commit c82a9cf750)
2007-10-10 12:59:21 -05:00
Andrew Tridgell
e84cc8e538 r2500: disable the sleep test in echo until we have a win32 echo server that
does Microsoft style async rpc serving
(This used to be commit 050dcd9b95)
2007-10-10 12:58:59 -05:00
Stefan Metzmacher
6b9b169c27 r2443: check return code of event_loop_once() to catch thet cases where the server
closes the connetion and we got EBADF from select() and event_loop_once() fails

metze
(This used to be commit 9c0e50a6f3)
2007-10-10 12:58:54 -05:00
Andrew Tridgell
f891ff694b r2105: added a TestSleep() operation to the echo pipe and extended the
RPC-ECHO test to use it to test asynchronous rpc operations.
(This used to be commit a5eb6cad50)
2007-10-10 12:58:25 -05:00
Stefan Metzmacher
45e93c19ef r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze
(This used to be commit b5378803fd)
2007-10-10 12:56:21 -05:00
Stefan Metzmacher
f9d8f8843d r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937)
2007-10-10 12:56:15 -05:00
Stefan Metzmacher
0b4da9d7e0 - add 'print' to the DCERPC binding strings
e.g.
  ncacn_np:myserver:[samr,sign,print]

  will now enable the packet debugging

  and the debugging is not bound anymore to the debuglevel >= 2
  in the torture tests

- also the dcesrv_remote module now supports debugging of the packets
  use the 'dcerpc_remote:binding' smb.conf parameter.

metze
(This used to be commit 40abf3c584)
2004-02-03 14:56:07 +00:00
Andrew Tridgell
f6eb8342cb added auto-generation of the server side boilerplate code for each
pipe.

The server side code gets generated as librpc/gen_ndr/ndr_NAME_s.c and
gets included in the pipe module
(This used to be commit bd3dcfe582)
2003-12-14 13:22:12 +00:00
Andrew Tridgell
86a604429e a fairly major upgrade to the dcerpc system
* added a NDR validator. The way it works is that when the
   DCERPC_DEBUG_VALIDATE_* flags are set the dcerpc system will
   perform NDR buffer validation. On sending a request the packet is
   first marshalled, then unmarahslled, then marshalled again, and it is
   confirmed that the two marshalling results are idential. This
   ensures that our pull and push routines are absolutely in sync, so
   that we can be very confident that if a routine works in the client
   then the corresponding routine must work on the server side. A
   similar validation is performed on all replies.

 * a result of this change is that pidl is fussier about the [ref]
   tag. You can only use it on pointers (which is the only place it
   makes sense)

 * fixed a basic alignment bug in the push side of the NDR code

 * added server side pull/push support. Our dcerpc system is now fully
   ready to be used on the server side.

 * fixed the relative offset pointer list. It must be traversed in
   reverse order on push

 * added automatic value setting for the size parameter in outgoing
   SdBuf structures.

 * expanded the ndr debugging code to always give a message on any
   failure

 * fixed the subcontext push code

 * fixed some memory leaks in smbtorture RPC tests
(This used to be commit 8ecf720206)
2003-11-22 08:11:32 +00:00
Andrew Tridgell
8a8b2da9c9 make the echo idl match the win32 IDL again
(This used to be commit 4b901bd717)
2003-11-20 01:32:43 +00:00
Andrew Tridgell
10ee36bede switched to a new way of handling unions, so that we can handle
alignment correctly for unions that have non-uint16 discriminants

fixed the union handling in srvsvc.idl. (metze, please take a look at
the changes, your IDL did match what was one the wire in most cases,
but isn't the way IDL is usually coded)
(This used to be commit 7b5d028729)
2003-11-19 22:10:20 +00:00