Author: tfaber
Date: Wed Oct 12 11:02:41 2011
New Revision: 54089
URL:
http://svn.reactos.org/svn/reactos?rev=54089&view=rev
Log:
[RPCRT4_WINETEST]
- Sync to Wine 1.3.30. Fixes crash in rpcrt4:rpc test
See issue #5778 for more details.
Modified:
trunk/rostests/winetests/rpcrt4/rpc.c
trunk/rostests/winetests/rpcrt4/server.c
trunk/rostests/winetests/rpcrt4/server.idl
trunk/rostests/winetests/rpcrt4/testlist.c
Modified: trunk/rostests/winetests/rpcrt4/rpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/rpc.c?re…
==============================================================================
--- trunk/rostests/winetests/rpcrt4/rpc.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/rpcrt4/rpc.c [iso-8859-1] Wed Oct 12 11:02:41 2011
@@ -284,8 +284,7 @@
ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "expected
RPC_C_AUTHN_LEVEL_PKT_PRIVACY, got %d\n", level);
ok(authnsvc == RPC_C_AUTHN_WINNT, "expected RPC_C_AUTHN_WINNT, got %d\n",
authnsvc);
todo_wine ok(authzsvc == RPC_C_AUTHZ_NAME, "expected RPC_C_AUTHZ_NAME, got
%d\n", authzsvc);
-
- RpcStringFree(&principal);
+ if (status == RPC_S_OK) RpcStringFree(&principal);
status = RpcMgmtStopServerListening(NULL);
ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n",
@@ -596,8 +595,10 @@
ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been
ncacn_np instead of %s\n", protseq);
ok(!strcmp((char *)network_addr, "."), "network_addr should have been
. instead of %s\n", network_addr);
ok(!strcmp((char *)endpoint, "pipetest"), "endpoint should have been
pipetest instead of %s\n", endpoint);
- todo_wine
- ok(options && !strcmp((char *)options, ""), "options should
have been \"\" of \"%s\"\n", options);
+ if (options)
+ ok(!strcmp((char *)options, ""), "options should have been
\"\" of \"%s\"\n", options);
+ else
+ todo_wine ok(FALSE, "options is NULL\n");
RpcStringFreeA(&uuid);
RpcStringFreeA(&protseq);
RpcStringFreeA(&network_addr);
@@ -611,8 +612,10 @@
ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been
ncacn_np instead of %s\n", protseq);
ok(!strcmp((char *)network_addr, "."), "network_addr should have been
. instead of %s\n", network_addr);
ok(!strcmp((char *)endpoint, "pipetest"), "endpoint should have been
pipetest instead of %s\n", endpoint);
- todo_wine
- ok(options && !strcmp((char *)options, ""), "options should
have been \"\" of \"%s\"\n", options);
+ if (options)
+ ok(!strcmp((char *)options, ""), "options should have been
\"\" of \"%s\"\n", options);
+ else
+ todo_wine ok(FALSE, "options is NULL\n");
RpcStringFreeA(&uuid);
RpcStringFreeA(&protseq);
RpcStringFreeA(&network_addr);
@@ -848,7 +851,7 @@
status = RpcBindingFree(&binding);
ok(status == RPC_S_INVALID_BINDING,
- "RpcBindingFree should have retured RPC_S_INVALID_BINDING instead of
%d\n",
+ "RpcBindingFree should have returned RPC_S_INVALID_BINDING instead of
%d\n",
status);
}
Modified: trunk/rostests/winetests/rpcrt4/server.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/server.c…
==============================================================================
--- trunk/rostests/winetests/rpcrt4/server.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/rpcrt4/server.c [iso-8859-1] Wed Oct 12 11:02:41 2011
@@ -340,6 +340,19 @@
return sum;
}
+int __cdecl s_get_cpsc(int n, cpsc_t *cpsc)
+{
+ int i, ret;
+
+ cpsc->a = 2 * n;
+ cpsc->b = 2;
+ cpsc->c = 1;
+ cpsc->ca = MIDL_user_allocate( cpsc->a * sizeof(int) );
+ for (i = ret = 0; i < cpsc->a; i++) cpsc->ca[i] = i;
+ for (i = ret = 0; i < cpsc->a; i++) ret += cpsc->ca[i];
+ return ret;
+}
+
int __cdecl s_square_puint(puint_t p)
{
int n = atoi(p);
@@ -586,9 +599,14 @@
return (char *)__FILE__;
}
-int __cdecl s_echo_ranged_int(int n)
-{
- return n;
+int __cdecl s_echo_ranged_int(int i, int j, int k)
+{
+ return min( 100, i + j + k );
+}
+
+int __cdecl s_echo_ranged_int2(int i)
+{
+ return i;
}
void __cdecl s_get_ranged_enum(renum_t *re)
@@ -921,10 +939,12 @@
ok(!strcmp(str, __FILE__), "get_filename() returned %s instead of %s\n", str,
__FILE__);
midl_user_free(str);
- x = echo_ranged_int(0);
+ x = echo_ranged_int(0,0,0);
ok(x == 0, "echo_ranged_int() returned %d instead of 0\n", x);
- x = echo_ranged_int(100);
+ x = echo_ranged_int(10,20,100);
ok(x == 100, "echo_ranged_int() returned %d instead of 100\n", x);
+ x = echo_ranged_int2(40);
+ ok(x == 40, "echo_ranged_int() returned %d instead of 40\n", x);
if (!old_windows_version)
{
@@ -1226,6 +1246,7 @@
cs_t *cs;
int n;
int ca[5] = {1, -2, 3, -4, 5};
+ int tmp[10];
doub_carr_t *dc;
int *pi;
pints_t api[5];
@@ -1292,6 +1313,18 @@
cpsc.c = 0;
cpsc.ca = c;
ok(sum_cpsc(&cpsc) == 10, "RPC sum_cpsc\n");
+
+ cpsc.ca = NULL;
+ ok(get_cpsc(5, &cpsc) == 45, "RPC sum_cpsc\n");
+ ok( cpsc.a == 10, "RPC get_cpsc %u\n", cpsc.a );
+ for (n = 0; n < 10; n++) ok( cpsc.ca[n] == n, "RPC get_cpsc[%d] = %d\n",
n, cpsc.ca[n] );
+
+ memset( tmp, 0x33, sizeof(tmp) );
+ cpsc.ca = tmp;
+ ok(get_cpsc(4, &cpsc) == 28, "RPC sum_cpsc\n");
+ ok( cpsc.a == 8, "RPC get_cpsc %u\n", cpsc.a );
+ ok( cpsc.ca == tmp, "RPC get_cpsc %p/%p\n", cpsc.ca, tmp );
+ for (n = 0; n < 8; n++) ok( cpsc.ca[n] == n, "RPC get_cpsc[%d] = %d\n", n,
cpsc.ca[n] );
ok(sum_toplev_conf_2n(c, 3) == 15, "RPC sum_toplev_conf_2n\n");
ok(sum_toplev_conf_cond(c, 5, 6, 1) == 10, "RPC sum_toplev_conf_cond\n");
Modified: trunk/rostests/winetests/rpcrt4/server.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/server.i…
==============================================================================
--- trunk/rostests/winetests/rpcrt4/server.idl [iso-8859-1] (original)
+++ trunk/rostests/winetests/rpcrt4/server.idl [iso-8859-1] Wed Oct 12 11:02:41 2011
@@ -162,6 +162,7 @@
int sum_cs(cs_t *cs);
int sum_cps(cps_t *cps);
int sum_cpsc(cpsc_t *cpsc);
+ int get_cpsc(int n, [out] cpsc_t *cpsc );
int sum_complex_array(int n, [size_is(n)] refpint_t pi[]);
typedef [wire_marshal(int)] void *puint_t;
@@ -362,7 +363,8 @@
const int RE_MAX = RE3;
typedef [range(RE_MIN, RE_MAX)] enum renum renum_t;
typedef [range(0, 100)] int rint_t;
- rint_t echo_ranged_int([range(0, 100)] int n);
+ rint_t echo_ranged_int([range(0, 10)] int i, [range(0, 20)] int j, [range(0, 100)] int
k);
+ rint_t echo_ranged_int2([range(0, 40)] int i);
void get_ranged_enum([out] renum_t *re);
void context_handle_test(void);
Modified: trunk/rostests/winetests/rpcrt4/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/testlist…
==============================================================================
--- trunk/rostests/winetests/rpcrt4/testlist.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/rpcrt4/testlist.c [iso-8859-1] Wed Oct 12 11:02:41 2011
@@ -11,6 +11,7 @@
extern void func_ndr_marshall(void);
extern void func_rpc(void);
extern void func_rpc_async(void);
+extern void func_rpc_protseq(void);
extern void func_server(void);
const struct test winetest_testlist[] =
@@ -20,6 +21,7 @@
{ "ndr_marshall", func_ndr_marshall },
{ "rpc", func_rpc },
{ "rpc_async", func_rpc_async },
+ { "rpc_protseq", func_rpc_protseq },
{ "server", func_server },
{ 0, 0 }
};