diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-02-24 08:38:11 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-02-24 08:38:11 +0000 |
commit | 80592054fb0e95a977707f6701c52f494685dd5c (patch) | |
tree | 06d55333d5c8688b0d4f08a7a36700351462c722 /source3/torture | |
parent | de494520b0a8b0d58c0f320e7badad419e878c1e (diff) | |
download | samba-80592054fb0e95a977707f6701c52f494685dd5c.tar.gz samba-80592054fb0e95a977707f6701c52f494685dd5c.tar.bz2 samba-80592054fb0e95a977707f6701c52f494685dd5c.zip |
added a "XCOPY" test that simulates the open calls made by xcopy /O
we currently fail this test
(This used to be commit 8095375623cc19f7aad497bf39d5370d032ebdbf)
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/torture.c | 45 |
1 files changed, 45 insertions, 0 deletions
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}, |