summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-06-18 23:31:22 +0000
committerJeremy Allison <jra@samba.org>2001-06-18 23:31:22 +0000
commit0c69d176532ea4ee2fa4c7809db37b00ecfbeeb6 (patch)
tree679fb2c0f133a02550cf5a9b7ec2e9211dd0d5d8 /source3/utils
parent48a5c872402e5c445858dd4054571ca0fada11c4 (diff)
downloadsamba-0c69d176532ea4ee2fa4c7809db37b00ecfbeeb6.tar.gz
samba-0c69d176532ea4ee2fa4c7809db37b00ecfbeeb6.tar.bz2
samba-0c69d176532ea4ee2fa4c7809db37b00ecfbeeb6.zip
New info level tester.
Jeremy. (This used to be commit 9297ae69a7dde878bb4c696f90fbaceb46e18720)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/torture.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/source3/utils/torture.c b/source3/utils/torture.c
index 5f08887a60..6f4076cecb 100644
--- a/source3/utils/torture.c
+++ b/source3/utils/torture.c
@@ -1929,6 +1929,52 @@ static void run_trans2test(int dummy)
printf("trans2 test finished\n");
}
+/*
+ This checks new W2K calls.
+*/
+
+void new_trans(struct cli_state *pcli, int fnum, int level)
+{
+ char buf[4096];
+
+ memset(buf, 0xff, sizeof(buf));
+
+ if (!cli_qfileinfo_test(pcli, fnum, level, buf)) {
+ printf("ERROR: qfileinfo (%d) failed (%s)\n", level, cli_errstr(pcli));
+ } else {
+ printf("qfileinfo: level %d\n", level);
+ dump_data(0, buf, 256);
+ printf("\n");
+ }
+}
+
+static void run_w2ktest(int dummy)
+{
+ static struct cli_state cli;
+ int fnum;
+ char *fname = "\\w2ktest\\w2k.tst";
+ int level;
+
+ printf("starting w2k test\n");
+
+ if (!open_connection(&cli)) {
+ return;
+ }
+
+ fnum = cli_open(&cli, fname,
+ O_RDWR | O_CREAT , DENY_NONE);
+
+ for (level = 1004; level < 1040; level++)
+ new_trans(&cli, fnum, level);
+
+ cli_close(&cli, fnum);
+
+
+ close_connection(&cli);
+
+ printf("w2k test finished\n");
+}
+
/*
this is a harness for some oplock tests
@@ -2817,6 +2863,7 @@ static struct {
{"RW3", run_readwritelarge, 0},
{"OPEN", run_opentest, 0},
{"DELETE", run_deletetest, 0},
+ {"W2K", run_w2ktest, 0},
{NULL, NULL, 0}};