mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[RPCRT4_WINETEST]
- Sync to Wine 1.3.30. Fixes crash in rpcrt4:rpc test See issue #5778 for more details. svn path=/trunk/; revision=54089
This commit is contained in:
parent
7bdbe2072c
commit
bab9f940a1
4 changed files with 52 additions and 12 deletions
|
@ -284,8 +284,7 @@ todo_wine {
|
|||
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 @@ static void test_RpcStringBindingParseA(void)
|
|||
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 @@ static void test_RpcStringBindingParseA(void)
|
|||
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 @@ static void test_RpcBindingFree(void)
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -340,6 +340,19 @@ int __cdecl s_sum_cpsc(cpsc_t *cpsc)
|
|||
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 @@ str_t __cdecl s_get_filename(void)
|
|||
return (char *)__FILE__;
|
||||
}
|
||||
|
||||
int __cdecl s_echo_ranged_int(int n)
|
||||
int __cdecl s_echo_ranged_int(int i, int j, int k)
|
||||
{
|
||||
return n;
|
||||
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 @@ basic_tests(void)
|
|||
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 @@ array_tests(void)
|
|||
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];
|
||||
|
@ -1293,6 +1314,18 @@ array_tests(void)
|
|||
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");
|
||||
ok(sum_toplev_conf_cond(c, 5, 6, 0) == 15, "RPC sum_toplev_conf_cond\n");
|
||||
|
|
|
@ -162,6 +162,7 @@ cpp_quote("#endif")
|
|||
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 @@ cpp_quote("#endif")
|
|||
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);
|
||||
|
|
|
@ -11,6 +11,7 @@ extern void func_generated(void);
|
|||
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 @@ const struct test winetest_testlist[] =
|
|||
{ "ndr_marshall", func_ndr_marshall },
|
||||
{ "rpc", func_rpc },
|
||||
{ "rpc_async", func_rpc_async },
|
||||
{ "rpc_protseq", func_rpc_protseq },
|
||||
{ "server", func_server },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue