summaryrefslogtreecommitdiff
path: root/source4/torture/ndr/ndr.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-02-18 12:00:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:30 -0500
commite55e7c96f86d3ac69be083edbe3f51adccc6c017 (patch)
treed943dae634e7f7b5ddaea7710ad0d0d04de913e7 /source4/torture/ndr/ndr.c
parent4b3f75f3a7349165727368b3d00c41cfe932d7dc (diff)
downloadsamba-e55e7c96f86d3ac69be083edbe3f51adccc6c017.tar.gz
r21423: Extend testsuite, check that all bytes have been consumed. DsBind fails that test, so disabling it for now.
(This used to be commit d6026c2046a26f42ca0cd6ebf1f45488fbfb22e1)
Diffstat (limited to 'source4/torture/ndr/ndr.c')
-rw-r--r--source4/torture/ndr/ndr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/torture/ndr/ndr.c b/source4/torture/ndr/ndr.c
index 919ea2ce49c..55e24272105 100644
--- a/source4/torture/ndr/ndr.c
+++ b/source4/torture/ndr/ndr.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "torture/ndr/ndr.h"
#include "torture/ndr/proto.h"
+#include "torture/ui.h"
#include "util/dlinklist.h"
struct ndr_pull_test_data {
@@ -45,6 +46,10 @@ static bool wrap_ndr_pull_test(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx, data->pull_fn(ndr, data->ndr_flags, ds),
"pulling");
+ torture_assert(tctx, ndr->offset == ndr->data_size,
+ talloc_asprintf(tctx,
+ "%d unread bytes", ndr->data_size - ndr->offset));
+
if (check_fn != NULL)
return check_fn(tctx, ds);
else