Commit Graph

159 Commits

Author SHA1 Message Date
Paul Vriens 6832c8327d rpcrt4/tests: Make tests run on win9x/NT4 again. 2008-02-28 12:57:02 +01:00
Rob Shearman f7628b69b0 rpcrt4: Add tests for RpcStringBindingParseA. 2008-02-28 10:50:57 +01:00
Dan Hipschman 2d7b1f18b1 widl: Allow is_string_type to work for typedef'd types. 2008-02-22 12:04:26 +01:00
Paul Vriens e2539cb9e5 rpcrt4/tests: Don't crash on WinXP SP3. 2008-02-11 20:41:40 +01:00
Paul Vriens 517168b4c5 rpcrt4/tests: Vista uses the same status values as Windows 2003. 2008-02-11 20:41:40 +01:00
Paul Vriens 8554db9f5c rpcrt4/tests: Skip rest of the tests if we fail. 2008-02-08 12:08:32 +01:00
Paul Vriens a9e29c7576 rpcrt4/tests: Change test for Windows 2003. 2008-02-08 12:08:25 +01:00
Alexandre Julliard 05c7174909 tests: Add a helper routine to wait for a child process and propagate its result correctly. 2008-02-07 12:56:00 +01:00
Rob Shearman 7bc9e425f1 rpcrt4: Fix memory leaks in the rpc tests. 2008-02-04 13:04:37 +01:00
Rob Shearman 68c8e5fe41 rpcrt4: Add tests for RPC_FC_P_DEREF|RPC_FC_P_ONSTACK pointers. 2008-01-16 15:34:26 +01:00
Francois Gouget f6fab295f3 Fix spelling error in the generated conformance test files. 2008-01-16 12:46:18 +01:00
Rob Shearman 1a3d7c77a5 rpcrt4: Allow NULL networkaddr and endpoint in rpcrt4_np_get_top_of_tower.
Add tests for this.
2008-01-15 14:35:35 +01:00
Rob Shearman 492947aa02 rpcrt4: Fix a memory leak in the cstub tests. 2008-01-09 13:38:02 +01:00
Rob Shearman 24ba6a5cc6 rpcrt4: Fix memory leaks in the ndr_marshall tests. 2008-01-09 13:38:02 +01:00
Rob Shearman e0c67a189b rpcrt4: Implement NdrMapCommAndFaultStatus.
Add tests for this function.
2008-01-09 12:25:50 +01:00
Rob Shearman ea44471088 rpcrt4: Implement RpcAsyncInitializeHandle. 2008-01-07 22:55:46 +01:00
Rob Shearman 1da9d47f1b rpcrt4: Add tests for some async RPC functions. 2008-01-07 22:55:44 +01:00
Rob Shearman 31676530c2 rpcrt4: Set the ProcNum of RPC_MESSAGE in NdrClientInitializeNew to include RPC_VALID_FLAGS_BIT.
Mask out RPC_VALID_FLAGS_BIT from ProcNum when it is used to build a 
packet to send to the server.
2008-01-07 22:55:28 +01:00
Rob Shearman 4d6aa7ca95 rpcrt4: Add tests for the RPC_MESSAGE members set by NdrClientInitializeNew. 2008-01-07 22:55:22 +01:00
Rob Shearman f296a8ca6c rpcrt4: Implement I_RpcMapWin32Status.
Add a test for this function.
2008-01-07 12:41:17 +01:00
Rob Shearman 0e6d5202c8 rpcrt4: Don't set Buffer to NULL in I_RpcFreeBuffer. 2008-01-07 12:04:31 +01:00
Rob Shearman 1bb6c1b4d1 rpcrt4: Add some tests for NdrGetBuffer and NdrFreeBuffer. 2008-01-07 12:04:28 +01:00
Rob Shearman 4aff0cdac4 rpcrt4: Make some variables in the tests static. 2007-12-31 17:14:29 +01:00
Rob Shearman 07622b0f05 rpcrt4: Add tests for NdrServerInitializeNew. 2007-12-31 17:14:22 +01:00
Rob Shearman 274dc73ba1 rpcrt4: Add some tests for non-conformant strings. 2007-12-31 16:46:16 +01:00
Rob Shearman 3e8a032e8b rpcrt4: Re-use existing memory for embedded pointers in NdrVaryingArrayUnmarshall. 2007-12-26 14:02:58 +01:00
Rob Shearman 273766ee6f rpcrt4: Re-use existing memory for embedded pointers in NdrConformantVaryingArrayUnmarshall. 2007-12-26 14:02:55 +01:00
Rob Shearman a05923e1d3 rpcrt4: Add tests for varying and conformant varying arrays. 2007-12-26 14:02:53 +01:00
Rob Shearman e24f664b26 rpcrt4: Add tests for low-level context handle functions. 2007-12-26 13:26:52 +01:00
Rob Shearman 366fd6e3af rpcrt4: Fix a memory leak from the get_filename call in the server tests. 2007-12-21 12:41:21 +01:00
Rob Shearman c49a73b853 rpcrt4: Initialise memory passed into RPCs in the server test.
aligns contains padding, but the memory is marshalled in one block so 
call memset to avoid Valgrind warnings. padded and padded2 are 
marshalled as complex types so this is not required here.

Initialise the dummy member of test_list_t to zero for the TL_NULL case. 
Change the type to the smallest available to not waste buffer space.
2007-12-19 19:35:28 +01:00
Rob Shearman 259879d1f5 rpcrt4: Fix NdrConformantStringUnmarshall to use buffer memory if possible. 2007-12-17 11:58:06 +01:00
Rob Shearman c7261b732b rpcrt4: Partially revert commit 18faf3184b2ea263d77c2a7ad92eef27bc4ba08f.
Tests show that NdrPointerFree (and hence NdrFree) don't check whether 
the memory was allocated with NdrAllocate before freeing it. This makes 
sense as servers don't need to use NdrAllocate to allocate memory being 
returned and so this commit caused that memory to be leaked.

NdrAllocate hasn't been changed as the tests show it is correct and it 
appears that the memory list is used to implement the RpcSs memory model.
2007-12-14 12:24:21 +01:00
Rob Shearman ded4b86625 Revert "rpcrt4: Try to free every non-stack pointer in PointerFree now that NdrFree does the sanity checking for us.".
This reverts commit 6db648302ce43f625a073426a35a6f40b7869d8b.

Tests show the assumptions in a commit that this commit depends on are 
not valid.
2007-12-14 12:23:38 +01:00
Rob Shearman 9642714d06 rpcrt4: Add tests for freeing non-NdrAllocate allocated memory blocks. 2007-12-13 14:30:40 +01:00
Rob Shearman e12b487e26 rpcrt4: Try to free every non-stack pointer in PointerFree now that NdrFree does the sanity checking for us. 2007-12-12 16:02:53 +01:00
Rob Shearman 9c8c74f388 rpcrt4: Store allocated memory in a singly-linked list to keep track of what we should and shouldn't free in NdrFree. 2007-12-12 16:02:43 +01:00
Rob Shearman 33c4c25dad rpcrt4: Make the NdrAllocate tests pass on XP SP2 and greater. 2007-12-12 16:01:33 +01:00
Rob Shearman d458a599eb widl: Add support for non-basetype return types. 2007-12-11 18:07:05 +01:00
Rob Shearman abbceb137a rpcrt4: Fix NdrConformantArrayUnmarshall to use buffer memory if applicable and to reuse memory for embedded pointers. 2007-12-08 19:57:32 +01:00
Alexandre Julliard c0b12351e0 Avoid size_t types in traces. 2007-12-07 18:49:18 +01:00
Rob Shearman 2ebee18198 rpcrt4: Improve PointerFree to not free buffer memory. 2007-12-07 16:34:17 +01:00
Rob Shearman 13e47d762a rpcrt4: Set the memory pointer in NdrBaseTypeUnmarshall to the buffer if we're unmarshalling on a server without memory being passed in. 2007-12-05 13:49:08 +01:00
Rob Shearman c866b06806 rpcrt4: Add tests for a pointer to a conformant strings. 2007-12-04 18:18:03 +01:00
Rob Shearman 2a9fae7565 rpcrt4: Set the destination pointer in PointerUnmarshall before calling the referenced type's unmarshalling routine.
When a pointer that is dereferenced is encountered then this can result 
in a stale pointer (i.e. the one that is marshalled into the buffer for 
the embedded pointer unmarshalling case) being used instead of the one 
that was intended.
2007-12-04 18:18:01 +01:00
Rob Shearman f191f59ee4 rpcrt4: Flesh out more of the IRpcChannelBuffer vtable to make the test_delegating_Invoke test succeed on Windows. 2007-12-04 13:31:59 +01:00
Rob Shearman 620fca405d rpcrt4: Test that the string retrieved from get_name was actually unmarshalled correctly. 2007-12-03 13:10:21 +01:00
Rob Shearman eef207e3f1 rpcrt4: Initialise the memory in test_simple_struct_marshal before passing it to NdrSimpleStructUnmarshall.
Otherwise, the unmarshalling code will read from unintialised memory
when trying to reuse the embedded pointers in the memory block.

Also fix a couple of memory leaks.
2007-12-03 13:10:21 +01:00
Rob Shearman c735a14788 rpcrt4: Fix NdrSimpleStructUnmarshall to cope with [in, out] embedded pointers. 2007-11-30 11:56:30 +01:00
Rob Shearman 4171309731 rpcrt4: Fix the tests for up_enum16.
It is different to the other base types as it has a different size on 
the wire to in memory, so it can't just be set to the buffer when 
unmarshalling.
2007-11-27 16:42:17 +01:00