summaryrefslogtreecommitdiff
path: root/tools/pidl/tests/wireshark-conf.pl
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2007-05-03 21:56:22 +0000
committerJörg Mayer <jmayer@loplof.de>2007-05-03 21:56:22 +0000
commit904640fdb4ae5f4cee7198ebb3c430c11214cd16 (patch)
tree896a6d73e2e200695d2b9654b88be9620c3b7a6b /tools/pidl/tests/wireshark-conf.pl
parent98cb9db12d31088e36132e8518344bab773d115b (diff)
downloadwireshark-904640fdb4ae5f4cee7198ebb3c430c11214cd16.tar.gz
Note: make test for the following update generates 1 error:
--------- tests/header..............NOK 14# Failed test 'struct declaration' # in tests/header.pl at line 49. # '/* header auto-generated by pidl */ # # #include <core.h> # #include <stdint.h> # # #ifndef _HEADER_p # #define _HEADER_p # # struct x#endif /* _HEADER_p */ # ' # doesn't match '(?ms-xi:struct x;)' # Looks like you failed 1 test of 15. tests/header..............dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 14 --------- Update from samba tree revision 22314 to 22657 ============================ Samba log start ============ ------------------------------------------------------------------------ r22357 | jelmer | 2007-04-19 03:26:15 +0200 (Thu, 19 Apr 2007) | 2 lines Changed paths: M /branches/SAMBA_4_0 M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm M /branches/SAMBA_4_0/source/pidl/tests/wireshark-ndr.pl Don't use 'our' ------------------------------------------------------------------------ r22453 | jelmer | 2007-04-22 12:42:33 +0200 (Sun, 22 Apr 2007) | 1 line Changed paths: M /branches/SAMBA_4_0 M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm M /branches/SAMBA_4_0/source/pidl/tests/tdr.pl Fix TDR testsuite without using our. ------------------------------------------------------------------------ r22456 | jelmer | 2007-04-22 15:57:07 +0200 (Sun, 22 Apr 2007) | 1 line Changed paths: M /branches/SAMBA_4_0 M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm M /branches/SAMBA_4_0/source/pidl/pidl M /branches/SAMBA_4_0/source/pidl/tests/samba-ejs.pl M /branches/SAMBA_4_0/source/pidl/tests/wireshark-ndr.pl Merge wireshark and ejs test improvements. ------------------------------------------------------------------------ r22457 | jelmer | 2007-04-22 16:19:22 +0200 (Sun, 22 Apr 2007) | 1 line Changed paths: M /branches/SAMBA_4_0 M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm M /branches/SAMBA_4_0/source/pidl/pidl M /branches/SAMBA_4_0/source/pidl/tests/samba3-cli.pl Fix tests for Samba3 client generator. ------------------------------------------------------------------------ r22462 | jelmer | 2007-04-22 17:59:34 +0200 (Sun, 22 Apr 2007) | 1 line Changed paths: M /branches/SAMBA_4_0 M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm M /branches/SAMBA_4_0/source/pidl/pidl M /branches/SAMBA_4_0/source/pidl/tests/Util.pm M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl Fix test suite for ndr parser without using 'our' ------------------------------------------------------------------------ r22520 | jelmer | 2007-04-25 18:10:54 +0200 (Wed, 25 Apr 2007) | 1 line Changed paths: M /branches/SAMBA_4_0 M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm M /branches/SAMBA_4_0/source/pidl/tests/wireshark-conf.pl Fix the TYPE command. ------------------------------------------------------------------------ r22617 | metze | 2007-05-01 03:57:17 +0200 (Tue, 01 May 2007) | 4 lines Changed paths: M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm assume we have defered elements if the type is just provides via 'declare' this should fix the problem with the winbind IRPC calls metze ------------------------------------------------------------------------ r22618 | metze | 2007-05-01 04:00:57 +0200 (Tue, 01 May 2007) | 8 lines Changed paths: M /branches/SAMBA_4_0/source/pidl/idl.yp M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm handle the properties related to the type and not to 'declare' to avoid a pidl warning with: declare [switch_type(uint16)] union netr_Validation; void foo([in] uint16 level, [in,switch_is(level)] netrValidation info); metze ------------------------------------------------------------------------ r22640 | metze | 2007-05-02 20:00:02 +0200 (Wed, 02 May 2007) | 4 lines Changed paths: M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm - generate nicer output - fix compiler warning about unused ';' metze ------------------------------------------------------------------------ ------------------------------------------------------------------------ ============================ Samba log end ============== svn path=/trunk/; revision=21671
Diffstat (limited to 'tools/pidl/tests/wireshark-conf.pl')
-rwxr-xr-xtools/pidl/tests/wireshark-conf.pl47
1 files changed, 41 insertions, 6 deletions
diff --git a/tools/pidl/tests/wireshark-conf.pl b/tools/pidl/tests/wireshark-conf.pl
index 617a63029a..d6fe3158aa 100755
--- a/tools/pidl/tests/wireshark-conf.pl
+++ b/tools/pidl/tests/wireshark-conf.pl
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 45;
+use Test::More tests => 47;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
@@ -61,11 +61,11 @@ is_deeply(parse_conf("CODE START\ndata\nmore data\nCODE END\n"), { override => "
test_warnings("nofile:1: Unknown command `CODE'\n",
sub { parse_conf("CODE END\n"); } );
-is_deeply(parse_conf("TYPE winreg_String dissect_myminregstring FT_STRING BASE_DEC 0 0 2\n"), { types => { winreg_String => {
+is_deeply(parse_conf("TYPE winreg_String dissect_myminregstring(); FT_STRING BASE_DEC 0 0 2\n"), { types => { winreg_String => {
NAME => "winreg_String",
POS => { FILE => "nofile", LINE => 1 },
USED => 0,
- DISSECTOR_NAME => "dissect_myminregstring",
+ DISSECTOR_NAME => "dissect_myminregstring();",
FT_TYPE => "FT_STRING",
BASE_TYPE => "BASE_DEC",
MASK => 0,
@@ -87,13 +87,13 @@ test_errors("nofile:1: incomplete TYPE command\n",
sub { parse_conf("TYPE mytype dissector\n"); });
test_warnings("nofile:1: dissector name does not contain `dissect'\n",
- sub { parse_conf("TYPE winreg_String myminregstring FT_STRING BASE_DEC 0 0 2\n"); });
+ sub { parse_conf("TYPE winreg_String myminregstring; FT_STRING BASE_DEC 0 0 2\n"); });
test_warnings("nofile:1: invalid FT_TYPE `BLA'\n",
- sub { parse_conf("TYPE winreg_String dissect_myminregstring BLA BASE_DEC 0 0 2\n"); });
+ sub { parse_conf("TYPE winreg_String dissect_myminregstring; BLA BASE_DEC 0 0 2\n"); });
test_warnings("nofile:1: invalid BASE_TYPE `BLOE'\n",
- sub { parse_conf("TYPE winreg_String dissect_myminregstring FT_UINT32 BLOE 0 0 2\n"); });
+ sub { parse_conf("TYPE winreg_String dissect_myminregstring; FT_UINT32 BLOE 0 0 2\n"); });
is_deeply(parse_conf("TFS hf_bla \"True string\" \"False String\"\n"),
{ tfs => { hf_bla => {
@@ -163,3 +163,38 @@ test_errors("nofile:1: no dissectorname specified\n",
test_errors("nofile:1: incomplete HF_FIELD command\n",
sub { parse_conf("HF_FIELD hf_idx\n"); });
+
+is_deeply(parse_conf("TYPE winreg_String dissect_myminregstring(); FT_STRING BASE_DEC 0 0 0 2\n"), {
+ types => {
+ winreg_String => {
+ NAME => "winreg_String",
+ POS => { FILE => "nofile", LINE => 1 },
+ USED => 0,
+ DISSECTOR_NAME => "dissect_myminregstring();",
+ FT_TYPE => "FT_STRING",
+ BASE_TYPE => "BASE_DEC",
+ MASK => 0,
+ VALSSTRING => 0,
+ ALIGNMENT => 0
+ }
+ }
+ }
+);
+
+
+is_deeply(parse_conf("TYPE winreg_String \"offset = dissect_myminregstring(\@HF\@);\" FT_STRING BASE_DEC 0 0 0 2\n"), {
+ types => {
+ winreg_String => {
+ NAME => "winreg_String",
+ POS => { FILE => "nofile", LINE => 1 },
+ USED => 0,
+ DISSECTOR_NAME => "offset = dissect_myminregstring(\@HF\@);",
+ FT_TYPE => "FT_STRING",
+ BASE_TYPE => "BASE_DEC",
+ MASK => 0,
+ VALSSTRING => 0,
+ ALIGNMENT => 0
+ }
+ }
+ }
+);