summaryrefslogtreecommitdiff
path: root/source4/pidl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-10-31 16:44:42 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:51 +0100
commit1f87eb38fdb76d73ea1dd045d8555a662bf0c77b (patch)
tree947eb88e986543da3a81dcb86980822e001077fb /source4/pidl
parent7dee06709e01118dc3b56e79b1050de9bace92a3 (diff)
downloadsamba-1f87eb38fdb76d73ea1dd045d8555a662bf0c77b.tar.gz
samba-1f87eb38fdb76d73ea1dd045d8555a662bf0c77b.tar.bz2
samba-1f87eb38fdb76d73ea1dd045d8555a662bf0c77b.zip
r25768: pidl: NT_STATUS_IS_ERR() is NOT the same as !NT_STATUS_IS_OK()
Everything but success should be handled as error in the tests. metze (This used to be commit cadb1cc743a19fc16e61f8246b1e8771c806caea)
Diffstat (limited to 'source4/pidl')
-rwxr-xr-xsource4/pidl/tests/ndr_align.pl10
-rwxr-xr-xsource4/pidl/tests/ndr_alloc.pl8
-rwxr-xr-xsource4/pidl/tests/ndr_array.pl2
-rwxr-xr-xsource4/pidl/tests/ndr_fullptr.pl2
-rwxr-xr-xsource4/pidl/tests/ndr_refptr.pl28
-rwxr-xr-xsource4/pidl/tests/ndr_represent.pl4
-rwxr-xr-xsource4/pidl/tests/ndr_simple.pl2
-rwxr-xr-xsource4/pidl/tests/ndr_string.pl6
-rwxr-xr-xsource4/pidl/tests/ndr_tagtype.pl6
9 files changed, 34 insertions, 34 deletions
diff --git a/source4/pidl/tests/ndr_align.pl b/source4/pidl/tests/ndr_align.pl
index 26336b7772..28b29d9196 100755
--- a/source4/pidl/tests/ndr_align.pl
+++ b/source4/pidl/tests/ndr_align.pl
@@ -24,7 +24,7 @@ test_samba4_ndr('align-uint8-uint16',
r.x = 13;
r.y = 0xbeef;
- if (NT_STATUS_IS_ERR(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
return 1;
result_blob = ndr_push_blob(ndr);
@@ -49,7 +49,7 @@ test_samba4_ndr('align-uint8-uint32',
r.x = 13;
r.y = 0xbeefbeef;
- if (NT_STATUS_IS_ERR(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
return 1;
result_blob = ndr_push_blob(ndr);
@@ -76,7 +76,7 @@ test_samba4_ndr('align-uint8-hyper',
r.x = 13;
r.y = 0xbeefbeefbeefbeefLLU;
- if (NT_STATUS_IS_ERR(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
return 1;
result_blob = ndr_push_blob(ndr);
@@ -103,7 +103,7 @@ test_samba4_ndr('noalignflag-uint8-uint16',
r.x = 13;
r.y = 0xbeef;
- if (NT_STATUS_IS_ERR(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
return 1;
result_blob = ndr_push_blob(ndr);
@@ -133,7 +133,7 @@ test_samba4_ndr('align-blob-align2',
r.data.data = data;
r.data.length = 2;
- if (NT_STATUS_IS_ERR(ndr_push_blie(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_blie(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
return 1;
result_blob = ndr_push_blob(ndr);
diff --git a/source4/pidl/tests/ndr_alloc.pl b/source4/pidl/tests/ndr_alloc.pl
index 61df1c3548..b1c7ae08c3 100755
--- a/source4/pidl/tests/ndr_alloc.pl
+++ b/source4/pidl/tests/ndr_alloc.pl
@@ -23,7 +23,7 @@ test_samba4_ndr("alloc-scalar",
struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
struct TestAlloc r;
- if (NT_STATUS_IS_ERR(ndr_pull_TestAlloc(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_TestAlloc(ndr, NDR_IN, &r)))
return 1;
if (r.in.foo.x == NULL)
@@ -47,7 +47,7 @@ test_samba4_ndr("alloc-buffer",
struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
struct TestAlloc r;
- if (NT_STATUS_IS_ERR(ndr_pull_TestAlloc(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_TestAlloc(ndr, NDR_IN, &r)))
return 1;
if (r.in.foo.x == NULL)
@@ -86,7 +86,7 @@ test_samba4_ndr("ref-noalloc",
uint8_t x;
r.in.t = &x;
- if (NT_STATUS_IS_ERR(ndr_pull_TestAlloc(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_TestAlloc(ndr, NDR_IN, &r)))
return 1;
if (*r.in.t != 0x03)
@@ -106,7 +106,7 @@ test_samba4_ndr("ref-alloc",
ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
r.in.t = NULL;
- if (NT_STATUS_IS_ERR(ndr_pull_TestAlloc(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_TestAlloc(ndr, NDR_IN, &r)))
return 1;
if (r.in.t == NULL)
diff --git a/source4/pidl/tests/ndr_array.pl b/source4/pidl/tests/ndr_array.pl
index 27f42cd391..8e40d36a10 100755
--- a/source4/pidl/tests/ndr_array.pl
+++ b/source4/pidl/tests/ndr_array.pl
@@ -25,7 +25,7 @@ test_samba4_ndr(
b.length = 10;
ndr = ndr_pull_init_blob(&b, mem_ctx);
- if (NT_STATUS_IS_ERR(ndr_pull_Test(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_Test(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 10)
diff --git a/source4/pidl/tests/ndr_fullptr.pl b/source4/pidl/tests/ndr_fullptr.pl
index 482edcf030..2188905b13 100755
--- a/source4/pidl/tests/ndr_fullptr.pl
+++ b/source4/pidl/tests/ndr_fullptr.pl
@@ -23,7 +23,7 @@ test_samba4_ndr("fullptr-push-dup",
r.in.x = &v;
r.in.y = &v;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestFull(ndr, NDR_IN, &r))) {
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestFull(ndr, NDR_IN, &r))) {
fprintf(stderr, "push failed\n");
return 1;
}
diff --git a/source4/pidl/tests/ndr_refptr.pl b/source4/pidl/tests/ndr_refptr.pl
index 4a56e3ca38..d5e73559d9 100755
--- a/source4/pidl/tests/ndr_refptr.pl
+++ b/source4/pidl/tests/ndr_refptr.pl
@@ -23,7 +23,7 @@ test_samba4_ndr("noptr-push",
struct echo_TestRef r;
r.in.foo.x = v;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r))) {
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r))) {
fprintf(stderr, "push failed\n");
return 1;
}
@@ -52,7 +52,7 @@ test_samba4_ndr("ptr-embedded-push",
struct echo_TestRef r;
r.in.foo.x = &v;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 6)
@@ -78,7 +78,7 @@ test_samba4_ndr("ptr-embedded-push-null",
struct echo_TestRef r;
r.in.foo.x = NULL;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 4)
@@ -103,7 +103,7 @@ test_samba4_ndr("refptr-embedded-push",
struct echo_TestRef r;
r.in.foo.x = &v;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 6)
@@ -150,7 +150,7 @@ test_samba4_ndr("ptr-top-push",
s.x = 13;
r.in.foo = &s;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 2)
@@ -195,7 +195,7 @@ test_samba4_ndr("refptr-top-push",
s.x = 13;
r.in.foo = &s;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 2)
@@ -239,7 +239,7 @@ test_samba4_ndr("uniqueptr-top-push",
s.x = 13;
r.in.foo = &s;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 6)
@@ -265,7 +265,7 @@ test_samba4_ndr("uniqueptr-top-push-null",
struct echo_TestRef r;
r.in.foo = NULL;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 4)
@@ -294,7 +294,7 @@ test_samba4_ndr("ptr-top-out-pull",
r.out.foo = &s;
- if (NT_STATUS_IS_ERR(ndr_pull_echo_TestRef(ndr, NDR_OUT, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_echo_TestRef(ndr, NDR_OUT, &r)))
return 1;
if (!r.out.foo)
@@ -344,7 +344,7 @@ test_samba4_ndr("refptr-top-out-pull",
r.out.foo = &s;
- if (NT_STATUS_IS_ERR(ndr_pull_echo_TestRef(ndr, NDR_OUT, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_echo_TestRef(ndr, NDR_OUT, &r)))
return 1;
if (!r.out.foo)
@@ -387,7 +387,7 @@ test_samba4_ndr("ptr-top-push-double",
uint16_t *pv = &v;
r.in.foo = &pv;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 6)
@@ -413,7 +413,7 @@ test_samba4_ndr("ptr-top-push-double-sndnull",
uint16_t *pv = NULL;
r.in.foo = &pv;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 4)
@@ -451,7 +451,7 @@ test_samba4_ndr("refptr-top-push-double",
uint16_t *pv = &v;
r.in.foo = &pv;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 6)
@@ -478,7 +478,7 @@ test_samba4_ndr("refptr-top-push-double-sndnull",
uint16_t *pv = NULL;
r.in.foo = &pv;
- if (NT_STATUS_IS_ERR(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_echo_TestRef(ndr, NDR_IN, &r)))
return 1;
if (ndr->offset != 4)
diff --git a/source4/pidl/tests/ndr_represent.pl b/source4/pidl/tests/ndr_represent.pl
index 84feeeb9ff..b5ee312668 100755
--- a/source4/pidl/tests/ndr_represent.pl
+++ b/source4/pidl/tests/ndr_represent.pl
@@ -18,7 +18,7 @@ test_samba4_ndr('represent_as-simple',
struct ndr_pull *ndr = ndr_pull_init_blob(&in_blob, NULL);
struct bla r;
- if (NT_STATUS_IS_ERR(ndr_pull_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
return 1;
if (r.in.x != 13)
@@ -51,7 +51,7 @@ test_samba4_ndr('transmit_as-simple',
struct ndr_pull *ndr = ndr_pull_init_blob(&in_blob, NULL);
struct bla r;
- if (NT_STATUS_IS_ERR(ndr_pull_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
return 1;
if (r.in.x != 13)
diff --git a/source4/pidl/tests/ndr_simple.pl b/source4/pidl/tests/ndr_simple.pl
index 02803ceea9..b5e4a7592a 100755
--- a/source4/pidl/tests/ndr_simple.pl
+++ b/source4/pidl/tests/ndr_simple.pl
@@ -20,7 +20,7 @@ test_samba4_ndr("simple", "void Test(); ",
b.length = 1;
ndr = ndr_pull_init_blob(&b, mem_ctx);
- if (NT_STATUS_IS_ERR(ndr_pull_uint8(ndr, NDR_SCALARS, &result)))
+ if (!NT_STATUS_IS_OK(ndr_pull_uint8(ndr, NDR_SCALARS, &result)))
return 1;
if (result != 0x02)
diff --git a/source4/pidl/tests/ndr_string.pl b/source4/pidl/tests/ndr_string.pl
index 23d94be640..4568ec89b8 100755
--- a/source4/pidl/tests/ndr_string.pl
+++ b/source4/pidl/tests/ndr_string.pl
@@ -18,7 +18,7 @@ test_samba4_ndr("string-pull-empty",
struct TestString r;
r.in.data = NULL;
- if (NT_STATUS_IS_ERR(ndr_pull_TestString(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_TestString(ndr, NDR_IN, &r)))
return 1;
if (r.in.data == NULL)
@@ -40,7 +40,7 @@ test_samba4_ndr("string-ascii-pull",
struct TestString r;
r.in.data = NULL;
- if (NT_STATUS_IS_ERR(ndr_pull_TestString(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_TestString(ndr, NDR_IN, &r)))
return 1;
if (r.in.data == NULL)
@@ -69,7 +69,7 @@ test_samba4_ndr("string-out",
char *str = NULL;
r.out.data = &str;
- if (NT_STATUS_IS_ERR(ndr_pull_TestString(ndr, NDR_IN, &r)))
+ if (!NT_STATUS_IS_OK(ndr_pull_TestString(ndr, NDR_IN, &r)))
return 1;
if (r.out.data == NULL)
diff --git a/source4/pidl/tests/ndr_tagtype.pl b/source4/pidl/tests/ndr_tagtype.pl
index 38daa02ab4..7f5c24627a 100755
--- a/source4/pidl/tests/ndr_tagtype.pl
+++ b/source4/pidl/tests/ndr_tagtype.pl
@@ -17,7 +17,7 @@ test_samba4_ndr('struct-notypedef', '[public] struct bla { uint8 x; }; ',
DATA_BLOB result_blob;
r.x = 13;
- if (NT_STATUS_IS_ERR(ndr_push_STRUCT_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+ if (!NT_STATUS_IS_OK(ndr_push_STRUCT_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
return 1;
result_blob = ndr_push_blob(ndr);
@@ -36,7 +36,7 @@ test_samba4_ndr('struct-notypedef-used', '[public] struct bla { uint8 x; };
DATA_BLOB result_blob;
fn.in.r.x = 13;
- if (NT_STATUS_IS_ERR(ndr_push_myfn(ndr, NDR_IN, &fn)))
+ if (!NT_STATUS_IS_OK(ndr_push_myfn(ndr, NDR_IN, &fn)))
return 1;
result_blob = ndr_push_blob(ndr);
@@ -56,7 +56,7 @@ test_samba4_ndr('struct-notypedef-embedded', 'struct bla { uint8 x; };
DATA_BLOB result_blob;
st.r.x = 13;
- if (NT_STATUS_IS_ERR(ndr_push_STRUCT_myst(ndr, NDR_IN, &st)))
+ if (!NT_STATUS_IS_OK(ndr_push_STRUCT_myst(ndr, NDR_IN, &st)))
return 1;
result_blob = ndr_push_blob(ndr);