summaryrefslogtreecommitdiff
path: root/source3/aparser/vluke.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/aparser/vluke.c')
-rw-r--r--source3/aparser/vluke.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/source3/aparser/vluke.c b/source3/aparser/vluke.c
new file mode 100644
index 0000000000..5e143016be
--- /dev/null
+++ b/source3/aparser/vluke.c
@@ -0,0 +1,38 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include "parser.h"
+#include "test.h"
+
+int main(int argc, char *argv[])
+{
+ BOOL ret;
+ TEST_STRUCT *q_u;
+ char *desc = TEST_NAME;
+ char *fname = argv[1];
+ int fd;
+ struct stat st;
+ prs_struct ps;
+
+ if (argc < 2) {
+ printf("usage: harness <file>\n");
+ exit(1);
+ }
+
+ fd = open(fname,O_RDONLY);
+ fstat(fd, &st);
+
+ prs_init(&ps, 0, 4, MARSHALL);
+ ps.is_dynamic=True;
+ prs_read(&ps, fd, st.st_size, 0);
+ dump_data(0, ps.data_p, ps.buffer_size);
+ ps.data_offset = 0;
+ ps.io = UNMARSHALL;
+ ret = TEST_FUNC(desc, &q_u, &ps, 1);
+ printf("ret=%d\n", ret);
+ return !ret;
+}