rpcrt4/tests: Run RPC tests in both mixed and fully interpreted mode.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-01-23 14:11:11 +01:00 committed by Alexandre Julliard
parent 6886717631
commit d73a6bae08
4 changed files with 963 additions and 226 deletions

View File

@ -3,6 +3,9 @@ IMPORTS = oleaut32 ole32 rpcrt4 secur32 advapi32
EXTRAIDLFLAGS = --prefix-server=s_
EXTRADEFS = -DPROXY_DELEGATION
server_EXTRAIDLFLAGS = -Os
server_interp_EXTRAIDLFLAGS = -Oicf
C_SRCS = \
cstub.c \
generated.c \
@ -13,4 +16,5 @@ C_SRCS = \
IDL_SRCS = \
cstub.idl \
server.idl
server.idl \
server_interp.idl

File diff suppressed because it is too large Load Diff

View File

@ -25,25 +25,36 @@ import "objidl.idl";
#include "server_defines.h"
#ifndef NAME
#define NAME(x) mixed_##x
#endif
#ifndef ISERVER_UUID
#define ISERVER_UUID 00000000-4114-0704-2301-000000000000
#endif
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct tag_vector
{
int x;
int y;
int z;
} vector_t;
cpp_quote("#endif")
typedef int fnprintf(const char *format, ...);
[
uuid(00000000-4114-0704-2301-000000000000),
implicit_handle(handle_t IServer_IfHandle)
uuid(ISERVER_UUID),
implicit_handle(handle_t NAME(IServer_IfHandle))
]
interface IServer
interface NAME(IServer)
{
cpp_quote("#if 0")
typedef wchar_t WCHAR;
cpp_quote("#endif")
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef [string] char *str_t;
typedef [string] WCHAR *wstr_t;
@ -80,31 +91,33 @@ cpp_quote("#endif")
int s;
} sun_t;
cpp_quote("#endif")
int int_return(void);
int square(int x);
int sum(int x, int y);
signed char sum_char(signed char x, signed char y);
short sum_short(short x, short y);
int sum_float(float x, float y);
int sum_double_int(int x, double y);
hyper sum_hyper(hyper x, hyper y);
int sum_hyper_int(hyper x, hyper y);
int sum_char_hyper(signed char x, hyper y);
void square_out(int x, [out] int *y);
void square_ref([in, out] int *x);
int str_length([string] const char *s);
int str_t_length(str_t s);
int cstr_length([string, size_is(n)] const char *s, int n);
int dot_self(vector_t *v);
double square_half(double x, [out] double *y);
float square_half_float(float x, [out] float *y);
long square_half_long(long x, [out] long *y);
int sum_fixed_array(int a[5]);
int pints_sum(pints_t *pints);
double ptypes_sum(ptypes_t *ptypes);
int dot_pvectors(pvectors_t *pvectors);
int NAME(int_return)(void);
int NAME(square)(int x);
int NAME(sum)(int x, int y);
signed char NAME(sum_char)(signed char x, signed char y);
short NAME(sum_short)(short x, short y);
int NAME(sum_float)(float x, float y);
int NAME(sum_double_int)(int x, double y);
hyper NAME(sum_hyper)(hyper x, hyper y);
int NAME(sum_hyper_int)(hyper x, hyper y);
int NAME(sum_char_hyper)(signed char x, hyper y);
void NAME(square_out)(int x, [out] int *y);
void NAME(square_ref)([in, out] int *x);
int NAME(str_length)([string] const char *s);
int NAME(str_t_length)(str_t s);
int NAME(cstr_length)([string, size_is(n)] const char *s, int n);
int NAME(dot_self)(vector_t *v);
double NAME(square_half)(double x, [out] double *y);
float NAME(square_half_float)(float x, [out] float *y);
long NAME(square_half_long)(long x, [out] long *y);
int NAME(sum_fixed_array)(int a[5]);
int NAME(pints_sum)(pints_t *pints);
double NAME(ptypes_sum)(ptypes_t *ptypes);
int NAME(dot_pvectors)(pvectors_t *pvectors);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
/* don't use this anywhere except in sp_t */
typedef struct
{
@ -116,10 +129,12 @@ cpp_quote("#endif")
int x;
sp_inner_t *s;
} sp_t;
cpp_quote("#endif")
int sum_sp(sp_t *sp);
double square_sun(sun_t *su);
int NAME(sum_sp)(sp_t *sp);
double NAME(square_sun)(sun_t *su);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct test_list
{
int t;
@ -131,17 +146,19 @@ cpp_quote("#endif")
} test_list_t;
typedef [ref] int *refpint_t;
cpp_quote("#endif")
int test_list_length(test_list_t *ls);
int sum_fixed_int_3d(int m[2][3][4]);
int sum_conf_array([size_is(n)] int x[], int n);
int sum_conf_ptr_by_conf_ptr(int n1, [size_is(n1)] int *n2_then_x1, [size_is(*n2_then_x1)] int *x2);
int sum_unique_conf_array([size_is(n), unique] int x[], int n);
int sum_unique_conf_ptr([size_is(n), unique] int *x, int n);
int sum_var_array([length_is(n)] int x[20], int n);
int dot_two_vectors(vector_t vs[2]);
void get_number_array([out, length_is(*n)] int x[20], [out] int *n);
int NAME(test_list_length)(test_list_t *ls);
int NAME(sum_fixed_int_3d)(int m[2][3][4]);
int NAME(sum_conf_array)([size_is(n)] int x[], int n);
int NAME(sum_conf_ptr_by_conf_ptr)(int n1, [size_is(n1)] int *n2_then_x1, [size_is(*n2_then_x1)] int *x2);
int NAME(sum_unique_conf_array)([size_is(n), unique] int x[], int n);
int NAME(sum_unique_conf_ptr)([size_is(n), unique] int *x, int n);
int NAME(sum_var_array)([length_is(n)] int x[20], int n);
int NAME(dot_two_vectors)(vector_t vs[2]);
void NAME(get_number_array)([out, length_is(*n)] int x[20], [out] int *n);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
int n;
@ -163,16 +180,18 @@ cpp_quote("#endif")
int b;
int c;
} cpsc_t;
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[]);
int NAME(sum_cs)(cs_t *cs);
int NAME(sum_cps)(cps_t *cps);
int NAME(sum_cpsc)(cpsc_t *cpsc);
int NAME(get_cpsc)(int n, [out] cpsc_t *cpsc );
int NAME(sum_complex_array)(int n, [size_is(n)] refpint_t pi[]);
typedef [wire_marshal(int)] void *puint_t;
int square_puint(puint_t p);
int NAME(square_puint)(puint_t p);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
[size_is(n)] puint_t *ps;
@ -185,11 +204,13 @@ cpp_quote("#endif")
[size_is(n)] puint_t *ps;
char n;
} cpuints_t;
cpp_quote("#endif")
int sum_puints(puints_t *p);
int sum_cpuints(cpuints_t *p);
int dot_copy_vectors(vector_t u, vector_t v);
int NAME(sum_puints)(puints_t *p);
int NAME(sum_cpuints)(cpuints_t *p);
int NAME(dot_copy_vectors)(vector_t u, vector_t v);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct wire_us *wire_us_t;
typedef [wire_marshal(wire_us_t)] struct us us_t;
struct us
@ -204,9 +225,11 @@ cpp_quote("#endif")
{
us_t us;
} test_us_t;
cpp_quote("#endif")
int square_test_us(test_us_t *tus);
int NAME(square_test_us)(test_us_t *tus);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef union encu switch (int t)
{
case ENCU_I: int i;
@ -237,18 +260,20 @@ cpp_quote("#endif")
{
e_t f;
} se_t;
cpp_quote("#endif")
double square_encu(encu_t *eu);
double square_unencu(int t, [switch_is(t)] unencu_t *eu);
int sum_parr(int *a[3]);
int sum_pcarr([size_is(n)] int *a[], int n);
int enum_ord(e_t e);
double square_encue(encue_t *eue);
void check_se2(se_t *s);
double NAME(square_encu)(encu_t *eu);
double NAME(square_unencu)(int t, [switch_is(t)] unencu_t *eu);
int NAME(sum_parr)(int *a[3]);
int NAME(sum_pcarr)([size_is(n)] int *a[], int n);
int NAME(enum_ord)(e_t e);
double NAME(square_encue)(encue_t *eue);
void NAME(check_se2)(se_t *s);
int sum_toplev_conf_2n([size_is(n * 2)] int *x, int n);
int sum_toplev_conf_cond([size_is(c ? a : b)] int *x, int a, int b, int c);
int NAME(sum_toplev_conf_2n)([size_is(n * 2)] int *x, int n);
int NAME(sum_toplev_conf_cond)([size_is(c ? a : b)] int *x, int a, int b, int c);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
char c;
@ -256,19 +281,23 @@ cpp_quote("#endif")
short s;
double d;
} aligns_t;
cpp_quote("#endif")
double sum_aligns(aligns_t *a);
double NAME(sum_aligns)(aligns_t *a);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
int i;
char c;
} padded_t;
cpp_quote("#endif")
int sum_padded(padded_t *p);
int sum_padded2(padded_t ps[2]);
int sum_padded_conf([size_is(n)] padded_t *ps, int n);
int NAME(sum_padded)(padded_t *p);
int NAME(sum_padded2)(padded_t ps[2]);
int NAME(sum_padded_conf)([size_is(n)] padded_t *ps, int n);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
int *p1;
@ -281,10 +310,12 @@ cpp_quote("#endif")
int *p3;
char c;
} bogus_t;
cpp_quote("#endif")
int sum_bogus(bogus_t *b);
void check_null([unique] int *null);
int NAME(sum_bogus)(bogus_t *b);
void NAME(check_null)([unique] int *null);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
str_t s;
@ -294,10 +325,12 @@ cpp_quote("#endif")
{
wstr_t s;
} wstr_struct_t;
cpp_quote("#endif")
int str_struct_len(str_struct_t *s);
int wstr_struct_len(wstr_struct_t *s);
int NAME(str_struct_len)(str_struct_t *s);
int NAME(wstr_struct_len)(wstr_struct_t *s);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
unsigned int n;
@ -309,35 +342,41 @@ cpp_quote("#endif")
int n;
[size_is(n)] doub_carr_1_t *a[];
} doub_carr_t;
cpp_quote("#endif")
int sum_doub_carr(doub_carr_t *dc);
void make_pyramid_doub_carr(unsigned char n, [out] doub_carr_t **dc);
int NAME(sum_doub_carr)(doub_carr_t *dc);
void NAME(make_pyramid_doub_carr)(unsigned char n, [out] doub_carr_t **dc);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
short n;
[size_is(n)] short data[];
} user_bstr_t;
cpp_quote("#endif")
typedef [unique] user_bstr_t *wire_bstr_t;
typedef [wire_marshal(wire_bstr_t)] short *bstr_t;
unsigned hash_bstr(bstr_t s);
void get_a_bstr([out]bstr_t *s);
unsigned NAME(hash_bstr)(bstr_t s);
void NAME(get_a_bstr)([out]bstr_t *s);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
[string, size_is(size)] char *name;
unsigned int size;
} name_t;
void get_name([in,out] name_t *name);
cpp_quote("#endif")
void NAME(get_name)([in,out] name_t *name);
typedef char **str_array_t;
void get_names([out] int *n, [out, string, size_is(,*n)] str_array_t *names);
void NAME(get_names)([out] int *n, [out, string, size_is(,*n)] str_array_t *names);
typedef WCHAR **wstr_array_t;
void get_namesw([out] int *n, [out, string, size_is(,*n)] wstr_array_t *names);
void NAME(get_namesw)([out] int *n, [out, string, size_is(,*n)] wstr_array_t *names);
int sum_pcarr2(int n, [size_is(, n)] int **pa);
int sum_L1_norms(int n, [size_is(n)] vector_t *vs);
int NAME(sum_pcarr2)(int n, [size_is(, n)] int **pa);
int NAME(sum_L1_norms)(int n, [size_is(n)] vector_t *vs);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
/* Don't use this except in the get_s123 test. */
typedef struct
{
@ -345,23 +384,27 @@ cpp_quote("#endif")
int f2;
int f3;
} s123_t;
cpp_quote("#endif")
/* Make sure WIDL generates a type format string for a previously unseen
type as a return value. */
s123_t *get_s123(void);
s123_t *NAME(get_s123)(void);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
unsigned int length;
unsigned int size;
[size_is(size), length_is(length)] pints_t numbers[];
} numbers_struct_t;
cpp_quote("#endif")
void get_numbers([in] int length, [in] int size, [out, length_is(length), size_is(size)] pints_t pn[]);
void get_numbers_struct([out] numbers_struct_t **ns);
void NAME(get_numbers)([in] int length, [in] int size, [out, length_is(length), size_is(size)] pints_t pn[]);
void NAME(get_numbers_struct)([out] numbers_struct_t **ns);
str_t get_filename(void);
str_t NAME(get_filename)(void);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
enum renum
{
RE0,
@ -373,27 +416,30 @@ 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, 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);
cpp_quote("#endif")
rint_t NAME(echo_ranged_int)([range(0, 10)] int i, [range(0, 20)] int j, [range(0, 100)] int k);
rint_t NAME(echo_ranged_int2)([range(0, 40)] int i);
void NAME(get_ranged_enum)([out] renum_t *re);
void context_handle_test(void);
void NAME(context_handle_test)(void);
void full_pointer_test([in, ptr] int *a, [in, ptr] int *b);
void full_pointer_null_test([in, ptr] int *a, [in, ptr] int *b);
void NAME(full_pointer_test)([in, ptr] int *a, [in, ptr] int *b);
void NAME(full_pointer_null_test)([in, ptr] int *a, [in, ptr] int *b);
void authinfo_test(unsigned int protseq, int secure);
void NAME(authinfo_test)(unsigned int protseq, int secure);
void stop(void);
void stop_autolisten(void);
void NAME(stop)(void);
void NAME(stop_autolisten)(void);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef union ipu switch(int t)
{
default: IStream *stream;
} ipu_t;
cpp_quote("#endif")
void ip_test([in] ipu_t *a);
void NAME(ip_test)([in] ipu_t *a);
int sum_ptr_array([in] int *a[2]);
int sum_array_ptr([in] int (*a)[2]);
int NAME(sum_ptr_array)([in] int *a[2]);
int NAME(sum_array_ptr)([in] int (*a)[2]);
}

View File

@ -0,0 +1,25 @@
/*
* Copyright 2019 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep client
#pragma makedep server
#define NAME(x) interp_##x
#define ISERVER_UUID 00000000-4114-0704-2301-000000000001
#include "server.idl"