summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-02-24 08:38:11 +0000
committerAndrew Tridgell <tridge@samba.org>2002-02-24 08:38:11 +0000
commit8095375623cc19f7aad497bf39d5370d032ebdbf (patch)
treec8715f295e8bd1673b581d302a240584f60dd5f1
parent8220135fd16b4a1778e49f8315f64754924af0d8 (diff)
downloadsamba-8095375623cc19f7aad497bf39d5370d032ebdbf.tar.gz
samba-8095375623cc19f7aad497bf39d5370d032ebdbf.tar.xz
samba-8095375623cc19f7aad497bf39d5370d032ebdbf.zip
added a "XCOPY" test that simulates the open calls made by xcopy /O
we currently fail this test
-rw-r--r--source/torture/torture.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/source/torture/torture.c b/source/torture/torture.c
index 479b2dd238c..617d9e62cb1 100644
--- a/source/torture/torture.c
+++ b/source/torture/torture.c
@@ -2629,6 +2629,50 @@ static BOOL run_deletetest(int dummy)
return correct;
}
+
+/*
+ Test ntcreate calls made by xcopy
+ */
+static BOOL run_xcopy(int dummy)
+{
+ static struct cli_state cli1;
+ char *fname = "\\test.txt";
+ BOOL correct = True;
+ int fnum1, fnum2;
+
+ printf("starting xcopy test\n");
+
+ if (!torture_open_connection(&cli1)) {
+ return False;
+ }
+
+ fnum1 = cli_nt_create_full(&cli1, fname,
+ 0xf019f, 0x20,
+ 0, 5,
+ 0x4044);
+
+ if (fnum1 == -1) {
+ printf("First open failed - %s\n", cli_errstr(&cli1));
+ return False;
+ }
+
+ fnum2 = cli_nt_create_full(&cli1, fname,
+ 0xe0080, 0,
+ 0x7, 1,
+ 0x200000);
+ if (fnum2 == -1) {
+ printf("second open failed - %s\n", cli_errstr(&cli1));
+ return False;
+ }
+
+ if (!torture_close_connection(&cli1)) {
+ correct = False;
+ }
+
+ return correct;
+}
+
+
/*
Test open mode returns on read-only files.
*/
@@ -3090,6 +3134,7 @@ static struct {
{"RW2", run_readwritemulti, FLAG_MULTIPROC},
{"RW3", run_readwritelarge, 0},
{"OPEN", run_opentest, 0},
+ {"XCOPY", run_xcopy, 0},
{"DELETE", run_deletetest, 0},
{"W2K", run_w2ktest, 0},
{"TRANS2SCAN", torture_trans2_scan, 0},