From 80592054fb0e95a977707f6701c52f494685dd5c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 24 Feb 2002 08:38:11 +0000 Subject: added a "XCOPY" test that simulates the open calls made by xcopy /O we currently fail this test (This used to be commit 8095375623cc19f7aad497bf39d5370d032ebdbf) --- source3/torture/torture.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'source3/torture') diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 479b2dd238..617d9e62cb 100644 --- a/source3/torture/torture.c +++ b/source3/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}, -- cgit