diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-04-28 08:54:51 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-04-28 08:54:51 +0000 |
commit | d031ba5c83d3243a7509692097c3a1a25aa34553 (patch) | |
tree | 2acdc279c9e497cb31d7ce703ba6fc696cb063ce /source3/torture/torture.c | |
parent | d31cb1b4684e7b3288d5841bf206379ba8149e8a (diff) | |
download | samba-d031ba5c83d3243a7509692097c3a1a25aa34553.tar.gz samba-d031ba5c83d3243a7509692097c3a1a25aa34553.tar.bz2 samba-d031ba5c83d3243a7509692097c3a1a25aa34553.zip |
Merge compile and other fixes from 3.0 to HEAD.
Including smbtorture bugfixes, and a better TCONDEV test.
Andrew Bartlett
(This used to be commit 52c5806004022f153af7d022afdb3ec7cc0d2548)
Diffstat (limited to 'source3/torture/torture.c')
-rw-r--r-- | source3/torture/torture.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c index f85569b2af..840b6ad294 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -573,12 +573,12 @@ static BOOL run_readwritemulti(int dummy) cli = current_cli; - cli_sockopt(&cli, sockops); + cli_sockopt(cli, sockops); printf("run_readwritemulti: fname %s\n", randomfname); - test = rw_torture3(&cli, randomfname); + test = rw_torture3(cli, randomfname); - if (!torture_close_connection(&cli)) { + if (!torture_close_connection(cli)) { test = False; } @@ -697,7 +697,7 @@ static BOOL run_netbench(int client) pstring line; char cname[20]; FILE *f; - char *params[20]; + const char *params[20]; BOOL correct = True; cli = current_cli; @@ -1066,6 +1066,7 @@ static BOOL run_tcon2_test(int dummy) static BOOL tcon_devtest(struct cli_state *cli, const char *myshare, const char *devtype, + const char *return_devtype, NTSTATUS expected_error) { BOOL status; @@ -1076,7 +1077,15 @@ static BOOL tcon_devtest(struct cli_state *cli, if (NT_STATUS_IS_OK(expected_error)) { if (status) { - ret = True; + if (strcmp(cli->dev, return_devtype) == 0) { + ret = True; + } else { + printf("tconX to share %s with type %s " + "succeeded but returned the wrong " + "device type (got [%s] but should have got [%s])\n", + myshare, devtype, cli->dev, return_devtype); + ret = False; + } } else { printf("tconX to share %s with type %s " "should have succeeded but failed\n", @@ -1125,34 +1134,34 @@ static BOOL run_tcon_devtype_test(int dummy) return False; } - if (!tcon_devtest(cli1, "IPC$", "A:", NT_STATUS_BAD_DEVICE_TYPE)) + if (!tcon_devtest(cli1, "IPC$", "A:", NULL, NT_STATUS_BAD_DEVICE_TYPE)) ret = False; - if (!tcon_devtest(cli1, "IPC$", "?????", NT_STATUS_OK)) + if (!tcon_devtest(cli1, "IPC$", "?????", "IPC", NT_STATUS_OK)) ret = False; - if (!tcon_devtest(cli1, "IPC$", "LPT:", NT_STATUS_BAD_DEVICE_TYPE)) + if (!tcon_devtest(cli1, "IPC$", "LPT:", NULL, NT_STATUS_BAD_DEVICE_TYPE)) ret = False; - if (!tcon_devtest(cli1, "IPC$", "IPC", NT_STATUS_OK)) + if (!tcon_devtest(cli1, "IPC$", "IPC", "IPC", NT_STATUS_OK)) ret = False; - if (!tcon_devtest(cli1, "IPC$", "FOOBA", NT_STATUS_BAD_DEVICE_TYPE)) + if (!tcon_devtest(cli1, "IPC$", "FOOBA", NULL, NT_STATUS_BAD_DEVICE_TYPE)) ret = False; - if (!tcon_devtest(cli1, share, "A:", NT_STATUS_OK)) + if (!tcon_devtest(cli1, share, "A:", "A:", NT_STATUS_OK)) ret = False; - if (!tcon_devtest(cli1, share, "?????", NT_STATUS_OK)) + if (!tcon_devtest(cli1, share, "?????", "A:", NT_STATUS_OK)) ret = False; - if (!tcon_devtest(cli1, share, "LPT:", NT_STATUS_BAD_DEVICE_TYPE)) + if (!tcon_devtest(cli1, share, "LPT:", NULL, NT_STATUS_BAD_DEVICE_TYPE)) ret = False; - if (!tcon_devtest(cli1, share, "IPC", NT_STATUS_BAD_DEVICE_TYPE)) + if (!tcon_devtest(cli1, share, "IPC", NULL, NT_STATUS_BAD_DEVICE_TYPE)) ret = False; - if (!tcon_devtest(cli1, share, "FOOBA", NT_STATUS_BAD_DEVICE_TYPE)) + if (!tcon_devtest(cli1, share, "FOOBA", NULL, NT_STATUS_BAD_DEVICE_TYPE)) ret = False; cli_shutdown(cli1); |