2005-09-21 16:06:59 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
# Simple tests for pidl's handling of ref pointers, based
|
|
|
|
# on tridge's ref_notes.txt
|
|
|
|
# (C) 2005 Jelmer Vernooij <jelmer@samba.org>.
|
|
|
|
# Published under the GNU General Public License.
|
|
|
|
use strict;
|
|
|
|
|
2006-03-30 07:44:03 +00:00
|
|
|
use Test::More tests => 22 * 8;
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
use FindBin qw($RealBin);
|
|
|
|
use lib "$RealBin";
|
|
|
|
use Util qw(test_samba4_ndr);
|
2005-09-21 16:06:59 +00:00
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("noptr-push",
|
2005-09-21 16:06:59 +00:00
|
|
|
' typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in] xstruct foo);
|
|
|
|
',
|
|
|
|
'
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
uint16_t v = 13;
|
|
|
|
struct echo_TestRef r;
|
|
|
|
r.in.foo.x = v;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r))) {
|
2005-09-21 16:06:59 +00:00
|
|
|
fprintf(stderr, "push failed\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ndr->offset != 2) {
|
|
|
|
fprintf(stderr, "Offset(%d) != 2\n", ndr->offset);
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ndr->data[0] != 13 || ndr->data[1] != 0) {
|
|
|
|
fprintf(stderr, "Data incorrect\n");
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
');
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("ptr-embedded-push",
|
2005-09-21 16:06:59 +00:00
|
|
|
' typedef struct {
|
|
|
|
uint16 *x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in] xstruct foo);
|
|
|
|
',
|
|
|
|
'
|
|
|
|
uint16_t v = 13;
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
r.in.foo.x = &v;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 6)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] == 0 && ndr->data[1] == 0 &&
|
|
|
|
ndr->data[2] == 0 && ndr->data[3] == 0)
|
|
|
|
return 3;
|
|
|
|
|
|
|
|
if (ndr->data[4] != 13 || ndr->data[5] != 0)
|
|
|
|
return 4;
|
|
|
|
');
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("ptr-embedded-push-null",
|
2005-09-21 16:06:59 +00:00
|
|
|
' typedef struct {
|
|
|
|
uint16 *x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in] xstruct foo);
|
|
|
|
',
|
|
|
|
'
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
r.in.foo.x = NULL;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 4)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] != 0 || ndr->data[1] != 0 ||
|
|
|
|
ndr->data[2] != 0 || ndr->data[3] != 0)
|
|
|
|
return 3;
|
|
|
|
');
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("refptr-embedded-push",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
typedef struct {
|
|
|
|
[ref] uint16 *x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in] xstruct foo);
|
|
|
|
',
|
|
|
|
'
|
|
|
|
uint16_t v = 13;
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
r.in.foo.x = &v;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 6)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] == 0 && ndr->data[1] == 0 &&
|
|
|
|
ndr->data[2] == 0 && ndr->data[3] == 0)
|
|
|
|
return 3;
|
|
|
|
|
|
|
|
if (ndr->data[4] != 13 || ndr->data[5] != 0)
|
|
|
|
return 4;
|
|
|
|
');
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("refptr-embedded-push-null",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
typedef struct {
|
|
|
|
[ref] uint16 *x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in] xstruct foo);
|
|
|
|
',
|
|
|
|
'
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
r.in.foo.x = NULL;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
/* Windows gives [client runtime error 0x6f4] */
|
|
|
|
');
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("ptr-top-push",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in] xstruct *foo);
|
|
|
|
',
|
|
|
|
'
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
struct xstruct s;
|
|
|
|
s.x = 13;
|
|
|
|
r.in.foo = &s;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 2)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] != 13 || ndr->data[1] != 0)
|
|
|
|
return 3;
|
|
|
|
');
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("ptr-top-push-null",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in] xstruct *foo);
|
|
|
|
',
|
|
|
|
'
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
r.in.foo = NULL;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
/* Windows gives [client runtime error 0x6f4] */
|
|
|
|
');
|
|
|
|
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("refptr-top-push",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in,ref] xstruct *foo);
|
|
|
|
',
|
|
|
|
'
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
struct xstruct s;
|
|
|
|
s.x = 13;
|
|
|
|
r.in.foo = &s;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 2)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] != 13 || ndr->data[1] != 0)
|
|
|
|
return 3;
|
|
|
|
');
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("refptr-top-push-null",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in,ref] xstruct *foo);
|
|
|
|
',
|
|
|
|
'
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
r.in.foo = NULL;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
/* Windows gives [client runtime error 0x6f4] */
|
|
|
|
');
|
|
|
|
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("uniqueptr-top-push",
|
2005-09-21 16:06:59 +00:00
|
|
|
' typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in,unique] xstruct *foo);
|
|
|
|
',
|
|
|
|
'
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
struct xstruct s;
|
|
|
|
s.x = 13;
|
|
|
|
r.in.foo = &s;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 6)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] == 0 && ndr->data[1] == 0 &&
|
|
|
|
ndr->data[2] == 0 && ndr->data[3] == 0)
|
|
|
|
return 3;
|
|
|
|
|
|
|
|
if (ndr->data[4] != 13 || ndr->data[5] != 0)
|
|
|
|
return 4;
|
|
|
|
');
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("uniqueptr-top-push-null",
|
2005-09-21 16:06:59 +00:00
|
|
|
' typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] uint16 echo_TestRef([in,unique] xstruct *foo);
|
|
|
|
',
|
|
|
|
'
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
r.in.foo = NULL;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 4)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] != 0 || ndr->data[1] != 0 ||
|
|
|
|
ndr->data[2] != 0 || ndr->data[3] != 0)
|
|
|
|
return 3;
|
|
|
|
');
|
|
|
|
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("ptr-top-out-pull",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] void echo_TestRef([out] xstruct *foo);
|
|
|
|
',
|
|
|
|
'
|
|
|
|
uint8_t data[] = { 0x0D, 0x00 };
|
|
|
|
DATA_BLOB b = { data, 2 };
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct xstruct s;
|
|
|
|
struct echo_TestRef r;
|
|
|
|
|
|
|
|
r.out.foo = &s;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_echo_TestRef(ndr, NDR_OUT, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (!r.out.foo)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (r.out.foo->x != 13)
|
|
|
|
return 3;
|
|
|
|
');
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("ptr-top-out-pull-null",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] void echo_TestRef([out] xstruct *foo);
|
|
|
|
',
|
|
|
|
'
|
|
|
|
uint8_t data[] = { 0x0D, 0x00 };
|
|
|
|
DATA_BLOB b = { data, 2 };
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
|
|
|
|
r.out.foo = NULL;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (NDR_ERR_CODE_IS_SUCCESS(ndr_pull_echo_TestRef(ndr, NDR_OUT, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
/* Windows gives [client runtime error 0x6f4] */
|
|
|
|
');
|
|
|
|
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("refptr-top-out-pull",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] void echo_TestRef([out,ref] xstruct *foo);
|
|
|
|
',
|
|
|
|
'
|
|
|
|
uint8_t data[] = { 0x0D, 0x00 };
|
|
|
|
DATA_BLOB b = { data, 2 };
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct xstruct s;
|
|
|
|
struct echo_TestRef r;
|
|
|
|
|
|
|
|
r.out.foo = &s;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_echo_TestRef(ndr, NDR_OUT, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (!r.out.foo)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (r.out.foo->x != 13)
|
|
|
|
return 3;
|
|
|
|
');
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("refptr-top-out-pull-null",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
typedef struct {
|
|
|
|
uint16 x;
|
|
|
|
} xstruct;
|
|
|
|
|
|
|
|
[public] void echo_TestRef([out,ref] xstruct *foo);
|
|
|
|
',
|
|
|
|
'
|
|
|
|
uint8_t data[] = { 0x0D, 0x00 };
|
|
|
|
DATA_BLOB b = { data, 2 };
|
2009-07-28 13:38:46 +00:00
|
|
|
struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
|
|
|
|
r.out.foo = NULL;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (NDR_ERR_CODE_IS_SUCCESS(ndr_pull_echo_TestRef(ndr, NDR_OUT, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
/* Windows gives [client runtime error 0x6f4] */
|
|
|
|
');
|
|
|
|
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("ptr-top-push-double",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
[public] void echo_TestRef([in] uint16 **foo);
|
|
|
|
',
|
2009-07-28 13:38:46 +00:00
|
|
|
' struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
uint16_t v = 13;
|
|
|
|
uint16_t *pv = &v;
|
|
|
|
r.in.foo = &pv;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 6)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] == 0 && ndr->data[1] == 0 &&
|
|
|
|
ndr->data[2] == 0 && ndr->data[3] == 0)
|
|
|
|
return 3;
|
|
|
|
|
|
|
|
if (ndr->data[4] != 0x0D || ndr->data[5] != 0x00)
|
|
|
|
return 4;
|
|
|
|
');
|
|
|
|
|
2006-03-30 07:44:03 +00:00
|
|
|
SKIP: {
|
|
|
|
skip "ptr-top-push-double-sndnull is known to fail", 8;
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("ptr-top-push-double-sndnull",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
[public] void echo_TestRef([in] uint16 **foo);
|
|
|
|
',
|
2009-07-28 13:38:46 +00:00
|
|
|
' struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
uint16_t *pv = NULL;
|
|
|
|
r.in.foo = &pv;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 4)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] != 0 || ndr->data[1] != 0 ||
|
|
|
|
ndr->data[2] != 0 || ndr->data[3] != 0)
|
|
|
|
return 3;
|
|
|
|
');
|
2006-03-30 07:44:03 +00:00
|
|
|
}
|
2005-09-21 16:06:59 +00:00
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("ptr-top-push-double-fstnull",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
[public] void echo_TestRef([in] uint16 **foo);
|
|
|
|
',
|
2009-07-28 13:38:46 +00:00
|
|
|
' struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
r.in.foo = NULL;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
/* Windows gives [client runtime error 0x6f4] */
|
|
|
|
|
|
|
|
');
|
|
|
|
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("refptr-top-push-double",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
[public] void echo_TestRef([in,ref] uint16 **foo);
|
|
|
|
',
|
2009-07-28 13:38:46 +00:00
|
|
|
' struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
uint16_t v = 13;
|
|
|
|
uint16_t *pv = &v;
|
|
|
|
r.in.foo = &pv;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 6)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] == 0 && ndr->data[1] == 0 &&
|
|
|
|
ndr->data[2] == 0 && ndr->data[3] == 0)
|
|
|
|
return 3;
|
|
|
|
|
|
|
|
if (ndr->data[4] != 0x0D || ndr->data[5] != 0x00)
|
|
|
|
return 4;
|
|
|
|
');
|
|
|
|
|
2006-03-30 07:44:03 +00:00
|
|
|
SKIP: {
|
|
|
|
|
|
|
|
skip "refptr-top-push-double-sndnull is known to fail", 8;
|
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("refptr-top-push-double-sndnull",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
[public] void echo_TestRef([in,ref] uint16 **foo);
|
|
|
|
',
|
2009-07-28 13:38:46 +00:00
|
|
|
' struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
uint16_t *pv = NULL;
|
|
|
|
r.in.foo = &pv;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 4)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
if (ndr->data[0] != 0 || ndr->data[1] != 0 ||
|
|
|
|
ndr->data[2] != 0 || ndr->data[3] != 0)
|
|
|
|
return 3;
|
|
|
|
');
|
2006-03-30 07:44:03 +00:00
|
|
|
}
|
2005-09-21 16:06:59 +00:00
|
|
|
|
Update from samba tree revision 12430 to 12487
============================ Samba log start ============
------------------------------------------------------------------------
r12462 | jelmer | 2005-12-24 22:57:51 +0100 (Sat, 24 Dec 2005) | 2 lines
Hide oo magic from callers of the parser
------------------------------------------------------------------------
r12463 | jelmer | 2005-12-24 23:11:44 +0100 (Sat, 24 Dec 2005) | 2 lines
Rename 'Samba' namespace to 'Samba4'
------------------------------------------------------------------------
r12464 | jelmer | 2005-12-25 00:32:50 +0100 (Sun, 25 Dec 2005) | 4 lines
Add simple IDL parsing tests for pidl using the standard perl
testing framework (Test::Simple, distributed with perl itself).
Run these tests from 'make test'
------------------------------------------------------------------------
r12465 | jelmer | 2005-12-25 02:33:35 +0100 (Sun, 25 Dec 2005) | 3 lines
Merge Parse::Pidl::Samba4::NDR::Header into
Parse::Pidl::Samba4::NDR::Parser.
Small optimization to avoid including NDR headers multiple times
------------------------------------------------------------------------
r12470 | jelmer | 2005-12-25 04:04:13 +0100 (Sun, 25 Dec 2005) | 3 lines
Add helper module for pidl tests
Convert other pidl tests to use Test::More and run them from 'make test'
------------------------------------------------------------------------
r12480 | jelmer | 2005-12-25 15:11:59 +0100 (Sun, 25 Dec 2005) | 2 lines
Extend testsuite
------------------------------------------------------------------------
r12481 | jelmer | 2005-12-25 15:59:21 +0100 (Sun, 25 Dec 2005) | 4 lines
Move parser-specific utility functions to idl.yp, remove some unused
functions
Allow the use of non-typedef structs and unions when declaring
variables. Allow the
use of the 'signed' and 'unsigned' qualifiers for integer types
------------------------------------------------------------------------
r12482 | jelmer | 2005-12-25 15:59:39 +0100 (Sun, 25 Dec 2005) | 2 lines
Add some more tests
------------------------------------------------------------------------
r12483 | jelmer | 2005-12-25 16:19:55 +0100 (Sun, 25 Dec 2005) | 2 lines
Remove --tdr-header option (merged into --tdr-parser)
------------------------------------------------------------------------
r12484 | jelmer | 2005-12-25 18:12:52 +0100 (Sun, 25 Dec 2005) | 2 lines
Initial work on supporting non-typedeffed types
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=16896
2005-12-26 00:47:24 +00:00
|
|
|
test_samba4_ndr("refptr-top-push-double-fstnull",
|
2005-09-21 16:06:59 +00:00
|
|
|
'
|
|
|
|
[public] void echo_TestRef([in,ref] uint16 **foo);
|
|
|
|
',
|
2009-07-28 13:38:46 +00:00
|
|
|
' struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2005-09-21 16:06:59 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
r.in.foo = NULL;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2005-09-21 16:06:59 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
/* Windows gives [client runtime error 0x6f4] */
|
|
|
|
|
|
|
|
');
|
|
|
|
|
2006-03-30 07:44:03 +00:00
|
|
|
SKIP: {
|
|
|
|
skip "ignore-ptrs are not supported yet", 8;
|
|
|
|
test_samba4_ndr("ignore-ptr",
|
|
|
|
'
|
|
|
|
[public] void echo_TestRef([in,ignore] uint16 *foo, [in] uint16 *bar);
|
|
|
|
',
|
2009-07-28 13:38:46 +00:00
|
|
|
' struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
|
2006-03-30 07:44:03 +00:00
|
|
|
struct echo_TestRef r;
|
|
|
|
uint16_t v = 10;
|
|
|
|
r.in.foo = &v;
|
|
|
|
r.in.bar = &v;
|
|
|
|
|
2007-11-20 17:08:52 +00:00
|
|
|
if (NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
|
2006-03-30 07:44:03 +00:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (ndr->offset != 4)
|
|
|
|
return 2;
|
|
|
|
');
|
|
|
|
}
|