svn commit: samba r26444 - in branches/SAMBA_4_0: . source/pidl/tests

jelmer at samba.org jelmer at samba.org
Fri Dec 14 00:27:39 GMT 2007


Author: jelmer
Date: 2007-12-14 00:27:38 +0000 (Fri, 14 Dec 2007)
New Revision: 26444

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26444

Log:
Fix pidl tests.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl
   branches/SAMBA_4_0/source/pidl/tests/ndr_alloc.pl
   branches/SAMBA_4_0/source/pidl/tests/ndr_array.pl
   branches/SAMBA_4_0/source/pidl/tests/ndr_fullptr.pl
   branches/SAMBA_4_0/source/pidl/tests/ndr_refptr.pl
   branches/SAMBA_4_0/source/pidl/tests/ndr_represent.pl
   branches/SAMBA_4_0/source/pidl/tests/ndr_simple.pl
   branches/SAMBA_4_0/source/pidl/tests/ndr_string.pl
   branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl	2007-12-14 00:27:31 UTC (rev 26443)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl	2007-12-14 00:27:38 UTC (rev 26444)
@@ -16,7 +16,7 @@
 	} bla;
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct bla r;
 	uint8_t expected[] = { 0x0D, 0x00, 0xef, 0xbe };
 	DATA_BLOB expected_blob = { expected, 4 };
@@ -41,7 +41,7 @@
 	} bla;
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct bla r;
 	uint8_t expected[] = { 0x0D, 0x00, 0x00, 0x00, 0xef, 0xbe, 0xef, 0xbe };
 	DATA_BLOB expected_blob = { expected, 8 };
@@ -67,7 +67,7 @@
 	} bla;
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct bla r;
 	uint8_t expected[] = { 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 			       0xef, 0xbe, 0xef, 0xbe, 0xef, 0xbe, 0xef, 0xbe };
@@ -93,7 +93,7 @@
 	} bla;
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct bla r;
 	uint8_t expected[] = { 0x0D, 0xef, 0xbe };
 	DATA_BLOB expected_blob = { expected, 3 };
@@ -121,7 +121,7 @@
 	} blie;
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct blie r;
 	uint8_t data[] = { 0x01, 0x02 };
 	uint8_t expected[] = { 0x0D, 0x00, 0x0E };

Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_alloc.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_alloc.pl	2007-12-14 00:27:31 UTC (rev 26443)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_alloc.pl	2007-12-14 00:27:38 UTC (rev 26444)
@@ -20,7 +20,7 @@
 ','
 	uint8_t data[] = { 0xde, 0xad, 0xbe, 0xef, 0x03 };
 	DATA_BLOB b = { data, 5 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
 	struct TestAlloc r;
 
 	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_TestAlloc(ndr, NDR_IN, &r)))
@@ -44,7 +44,7 @@
 ','
 	uint8_t data[] = { 0xde, 0xad, 0xbe, 0xef, 0x03 };
 	DATA_BLOB b = { data, 5 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
 	struct TestAlloc r;
 
 	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_TestAlloc(ndr, NDR_IN, &r)))
@@ -65,7 +65,7 @@
 ','
 	uint8_t data[] = { 0x03 };
 	DATA_BLOB b = { data, 1 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
 	struct TestAlloc r;
 	r.in.t = NULL;
 
@@ -81,7 +81,7 @@
 ','
 	uint8_t data[] = { 0x03 };
 	DATA_BLOB b = { data, 1 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
 	struct TestAlloc r;
 	uint8_t x;
 	r.in.t = &x;
@@ -101,7 +101,7 @@
 ','
 	uint8_t data[] = { 0x03 };
 	DATA_BLOB b = { data, 1 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
 	struct TestAlloc r;
 	ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
 	r.in.t = NULL;

Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_array.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_array.pl	2007-12-14 00:27:31 UTC (rev 26443)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_array.pl	2007-12-14 00:27:38 UTC (rev 26444)
@@ -23,7 +23,7 @@
 
 	b.data = data;
 	b.length = 10;
-	ndr = ndr_pull_init_blob(&b, mem_ctx);
+	ndr = ndr_pull_init_blob(&b, mem_ctx, NULL);
 
 	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_Test(ndr, NDR_IN, &r)))
 		return 1;

Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_fullptr.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_fullptr.pl	2007-12-14 00:27:31 UTC (rev 26443)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_fullptr.pl	2007-12-14 00:27:38 UTC (rev 26444)
@@ -17,7 +17,7 @@
 	[public] uint16 echo_TestFull([in,ptr] uint32 *x, [in,ptr] uint32 *y);
 ',
 '
-	struct ndr_push *ndr = ndr_push_init();
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	uint32_t v = 13;
 	struct echo_TestFull r;
 	r.in.x = &v; 

Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_refptr.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_refptr.pl	2007-12-14 00:27:31 UTC (rev 26443)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_refptr.pl	2007-12-14 00:27:38 UTC (rev 26444)
@@ -18,7 +18,7 @@
 	[public] uint16 echo_TestRef([in] xstruct foo);
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	uint16_t v = 13;
 	struct echo_TestRef r;
 	r.in.foo.x = v; 
@@ -48,7 +48,7 @@
 ',
 '
 	uint16_t v = 13;
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	r.in.foo.x = &v; 
 
@@ -74,7 +74,7 @@
 	[public] uint16 echo_TestRef([in] xstruct foo);
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	r.in.foo.x = NULL; 
 
@@ -99,7 +99,7 @@
 ',
 '
 	uint16_t v = 13;
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	r.in.foo.x = &v; 
 
@@ -126,7 +126,7 @@
 	[public] uint16 echo_TestRef([in] xstruct foo);
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	r.in.foo.x = NULL; 
 
@@ -144,7 +144,7 @@
 	[public] uint16 echo_TestRef([in] xstruct *foo);
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	struct xstruct s;
 	s.x = 13;
@@ -169,7 +169,7 @@
 	[public] uint16 echo_TestRef([in] xstruct *foo);
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	r.in.foo = NULL;
 
@@ -189,7 +189,7 @@
 	[public] uint16 echo_TestRef([in,ref] xstruct *foo);
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	struct xstruct s;
 	s.x = 13;
@@ -214,7 +214,7 @@
 	[public] uint16 echo_TestRef([in,ref] xstruct *foo);
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	r.in.foo = NULL;
 
@@ -233,7 +233,7 @@
 	[public] uint16 echo_TestRef([in,unique] xstruct *foo);
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	struct xstruct s;
 	s.x = 13;
@@ -261,7 +261,7 @@
 	[public] uint16 echo_TestRef([in,unique] xstruct *foo);
 ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	r.in.foo = NULL;
 
@@ -288,7 +288,7 @@
 '
 	uint8_t data[] = { 0x0D, 0x00 };
 	DATA_BLOB b = { data, 2 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
 	struct xstruct s;
 	struct echo_TestRef r;
 
@@ -315,7 +315,7 @@
 '
 	uint8_t data[] = { 0x0D, 0x00 };
 	DATA_BLOB b = { data, 2 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
 	struct echo_TestRef r;
 
 	r.out.foo = NULL;
@@ -338,7 +338,7 @@
 '
 	uint8_t data[] = { 0x0D, 0x00 };
 	DATA_BLOB b = { data, 2 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
 	struct xstruct s;
 	struct echo_TestRef r;
 
@@ -365,7 +365,7 @@
 '
 	uint8_t data[] = { 0x0D, 0x00 };
 	DATA_BLOB b = { data, 2 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, NULL);
 	struct echo_TestRef r;
 
 	r.out.foo = NULL;
@@ -381,7 +381,7 @@
 '
 	[public] void echo_TestRef([in] uint16 **foo);
 ',
-'	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+'	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	uint16_t v = 13;
 	uint16_t *pv = &v;
@@ -408,7 +408,7 @@
 '
 	[public] void echo_TestRef([in] uint16 **foo);
 ',
-'	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+'	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	uint16_t *pv = NULL;
 	r.in.foo = &pv;
@@ -429,7 +429,7 @@
 '
 	[public] void echo_TestRef([in] uint16 **foo);
 ',
-'	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+'	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	r.in.foo = NULL;
 
@@ -445,7 +445,7 @@
 '
 	[public] void echo_TestRef([in,ref] uint16 **foo);
 ',
-'	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+'	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	uint16_t v = 13;
 	uint16_t *pv = &v;
@@ -473,7 +473,7 @@
 '
 	[public] void echo_TestRef([in,ref] uint16 **foo);
 ',
-'	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+'	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	uint16_t *pv = NULL;
 	r.in.foo = &pv;
@@ -494,7 +494,7 @@
 '
 	[public] void echo_TestRef([in,ref] uint16 **foo);
 ',
-'	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+'	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	r.in.foo = NULL;
 
@@ -511,7 +511,7 @@
 '
 	[public] void echo_TestRef([in,ignore] uint16 *foo, [in] uint16 *bar);
 ',
-'	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+'	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct echo_TestRef r;
 	uint16_t v = 10;
 	r.in.foo = &v; 

Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_represent.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_represent.pl	2007-12-14 00:27:31 UTC (rev 26443)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_represent.pl	2007-12-14 00:27:38 UTC (rev 26444)
@@ -15,7 +15,7 @@
 '
 	uint8_t expected[] = { 0x0D };
 	DATA_BLOB in_blob = { expected, 1 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&in_blob, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&in_blob, NULL, NULL);
 	struct bla r;
 
 	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
@@ -46,7 +46,7 @@
 '
 	uint8_t expected[] = { 0x0D };
 	DATA_BLOB in_blob = { expected, 1 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&in_blob, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&in_blob, NULL, NULL);
 	struct bla r;
 
 	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))

Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_simple.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_simple.pl	2007-12-14 00:27:31 UTC (rev 26443)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_simple.pl	2007-12-14 00:27:38 UTC (rev 26444)
@@ -18,7 +18,7 @@
 
 	b.data = data;
 	b.length = 1;
-	ndr = ndr_pull_init_blob(&b, mem_ctx);
+	ndr = ndr_pull_init_blob(&b, mem_ctx, NULL);
 
 	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_uint8(ndr, NDR_SCALARS, &result)))
 		return 1;

Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_string.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_string.pl	2007-12-14 00:27:31 UTC (rev 26443)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_string.pl	2007-12-14 00:27:38 UTC (rev 26444)
@@ -14,7 +14,8 @@
 '
 	uint8_t data[] = { 0x00, 0x00, 0x00, 0x00 };
 	DATA_BLOB b = { data, 4 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL, 
+		smb_iconv_convenience_init(NULL, "ASCII", "UTF8", true));
 	struct TestString r;
 	r.in.data = NULL;
 
@@ -36,7 +37,8 @@
 	uint8_t data[] = { 0x03, 0x00, 0x00, 0x00, 
 					   \'f\', \'o\', \'o\', 0 };
 	DATA_BLOB b = { data, 8 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL,
+		smb_iconv_convenience_init(NULL, "ASCII", "UTF8", true));
 	struct TestString r;
 	r.in.data = NULL;
 
@@ -64,7 +66,8 @@
 	uint8_t data[] = { 0x03, 0x00, 0x00, 0x00, 
 					   \'f\', \'o\', \'o\', 0 };
 	DATA_BLOB b = { data, 8 };
-	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
+	struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL,
+		smb_iconv_convenience_init(NULL, "ASCII", "UTF8", true));
 	struct TestString r;
 	char *str = NULL;
 	r.out.data = &str;

Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl	2007-12-14 00:27:31 UTC (rev 26443)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl	2007-12-14 00:27:38 UTC (rev 26444)
@@ -10,7 +10,7 @@
 
 test_samba4_ndr('struct-notypedef', '[public] struct bla { uint8 x; }; ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct bla r;
 	uint8_t expected[] = { 0x0D };
 	DATA_BLOB expected_blob = { expected, 1 };
@@ -29,7 +29,7 @@
 test_samba4_ndr('struct-notypedef-used', '[public] struct bla { uint8 x; };
 	[public] void myfn([in] struct bla r); ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct myfn fn;
 	uint8_t expected[] = { 0x0D };
 	DATA_BLOB expected_blob = { expected, 1 };
@@ -49,7 +49,7 @@
 test_samba4_ndr('struct-notypedef-embedded', 'struct bla { uint8 x; };
 	[public] struct myst { struct bla r; }; ',
 '
-	struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+	struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
 	struct myst st;
 	uint8_t expected[] = { 0x0D };
 	DATA_BLOB expected_blob = { expected, 1 };



More information about the samba-cvs mailing list