diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-10-16 10:06:13 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2014-01-07 08:37:38 +0100 |
commit | 54c0bde3e98059db8faa26c967c804143e679c8e (patch) | |
tree | 0b1f6ea3e63f73d2b53a496c531efb9ac1731224 | |
parent | 2ba9453e9ff5d911a146e786ff8878ef67717366 (diff) | |
download | samba-54c0bde3e98059db8faa26c967c804143e679c8e.tar.gz |
midltests: add tests with v1_enum and NDR64
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r-- | testprogs/win32/midltests/valid/midltests_v1_enum_01.idl | 56 | ||||
-rw-r--r-- | testprogs/win32/midltests/valid/midltests_v1_enum_01.txt | 37 |
2 files changed, 93 insertions, 0 deletions
diff --git a/testprogs/win32/midltests/valid/midltests_v1_enum_01.idl b/testprogs/win32/midltests/valid/midltests_v1_enum_01.idl new file mode 100644 index 00000000000..18a5cebe249 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_v1_enum_01.idl @@ -0,0 +1,56 @@ +#ifndef MIDLTESTS_C_CODE + +/* + * For midltests_tcp.exe you may want to + * redirect the traffic via rinetd + * with a /etc/rinetd.conf like this: + * + * 172.31.9.1 5032 172.31.9.8 5032 + * 172.31.9.1 5064 172.31.9.8 5064 + * + * This is useful to watch the traffic with + * a network sniffer. + */ +/* +cpp_quote("#define LISTEN_IP \"0.0.0.0\"") +cpp_quote("#define FORWARD_IP \"127.0.0.1\"") +cpp_quote("#define CONNECT_IP \"172.31.9.1\"") +*/ + +/* + * With midltests_tcp.exe NDR64 is enforced by default. + * For testing it might be needed to allow downgrades + * to NDR32. This is needed when you use 'pipe'. + */ +//cpp_quote("#define DONOT_FORCE_NDR64 1") + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + typedef [v1_enum] enum { + value1 = -1 + } midltests_enum; + + long midltests_fn( + midltests_enum v + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + cli_midltests_fn(value1); +} + +long srv_midltests_fn(enum midltests_enum v) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif diff --git a/testprogs/win32/midltests/valid/midltests_v1_enum_01.txt b/testprogs/win32/midltests/valid/midltests_v1_enum_01.txt new file mode 100644 index 00000000000..d4d018c41a8 --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_v1_enum_01.txt @@ -0,0 +1,37 @@ +Wait for setup of server threads + +Test NDR32 + +ndr32: disable NDR64 + +ndr32:in => out: ptype[request] flen[28] plen[4] ahint[4] + +[000] FF FF FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr32:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr32] stop + +Test NDR64 + +ndr64: got NDR64 + +ndr64:in => out: ptype[request] flen[28] plen[4] ahint[4] + +[000] FF FF FF FF .... + +srv_midltests_fn: Start +srv_midltests_fn: End + +ndr64:out => in: ptype[response] flen[28] plen[4] ahint[4] + +[000] 54 72 75 65 True + +NDRTcpThread[ndr64] stop + +Test OK |