diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-08-27 08:19:43 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-08-27 08:19:43 +0000 |
commit | e8e98c9ea0690e3acf1126b50882e59e1056c7b3 (patch) | |
tree | 2fa75bc825f7e5da041809fe49080e3319656506 /source3/torture | |
parent | 3820578473da81b7ae0dfa978605da809be59f62 (diff) | |
download | samba-e8e98c9ea0690e3acf1126b50882e59e1056c7b3.tar.gz samba-e8e98c9ea0690e3acf1126b50882e59e1056c7b3.tar.bz2 samba-e8e98c9ea0690e3acf1126b50882e59e1056c7b3.zip |
converted smbd to use NTSTATUS by default
major changes include:
- added NSTATUS type
- added automatic mapping between dos and nt error codes
- changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT()
these calls auto-translate to the client error code system
- got rid of the cached error code and the writebmpx code
We eventually will need to also:
- get rid of BOOL, so we don't lose error info
- replace all ERROR_DOS() calls with ERROR_NT() calls
but that is too much for one night
(This used to be commit 83d9896c1ea8be796192b51a4678c2a3b87f7518)
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/locktest.c | 102 | ||||
-rw-r--r-- | source3/torture/torture.c | 204 |
2 files changed, 145 insertions, 161 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c index 82eee773f2..0339576b11 100644 --- a/source3/torture/locktest.c +++ b/source3/torture/locktest.c @@ -37,13 +37,15 @@ static BOOL use_oplocks; #define LOCKBASE 0 #define MINLENGTH 0 +#define ZERO_ZERO 1 + /* #define LOCKBASE (0x40000000 - 50) */ #define READ_PCT 50 -#define LOCK_PCT 35 -#define UNLOCK_PCT 55 +#define LOCK_PCT 45 +#define UNLOCK_PCT 70 #define RANGE_MULTIPLE 1 #define NSERVERS 2 #define NCONNECTIONS 2 @@ -52,9 +54,11 @@ static BOOL use_oplocks; #define NASTY_POSIX_LOCK_HACK 0 +enum lock_op {OP_LOCK, OP_UNLOCK, OP_REOPEN}; struct record { - char r1, r2; + enum lock_op lock_op; + int lock_type; char conn, f; SMB_BIG_UINT start, len; char needed; @@ -64,10 +68,37 @@ struct record { #if PRESETS static struct record preset[] = { -{36, 5, 0, 0, 0, 8, 1}, -{ 2, 6, 0, 1, 0, 1, 1}, -{53, 92, 0, 0, 0, 0, 1}, -{99, 11, 0, 0, 7, 1, 1}, +{OP_LOCK, WRITE_LOCK, 0, 0, 2, 0, 1}, +{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, +{OP_LOCK, WRITE_LOCK, 0, 0, 3, 0, 1}, +{OP_UNLOCK, 0 , 0, 0, 2, 0, 1}, +{OP_REOPEN, 0, 0, 0, 0, 0, 1}, + +{OP_LOCK, READ_LOCK, 0, 0, 2, 0, 1}, +{OP_LOCK, READ_LOCK, 0, 0, 1, 1, 1}, +{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, +{OP_REOPEN, 0, 0, 0, 0, 0, 1}, + +{OP_LOCK, READ_LOCK, 0, 0, 2, 0, 1}, +{OP_LOCK, WRITE_LOCK, 0, 0, 3, 1, 1}, +{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, +{OP_REOPEN, 0, 0, 0, 0, 0, 1}, + +{OP_LOCK, READ_LOCK, 0, 0, 2, 0, 1}, +{OP_LOCK, WRITE_LOCK, 0, 0, 1, 1, 1}, +{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, +{OP_REOPEN, 0, 0, 0, 0, 0, 1}, + +{OP_LOCK, WRITE_LOCK, 0, 0, 2, 0, 1}, +{OP_LOCK, READ_LOCK, 0, 0, 1, 1, 1}, +{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, +{OP_REOPEN, 0, 0, 0, 0, 0, 1}, + +{OP_LOCK, WRITE_LOCK, 0, 0, 2, 0, 1}, +{OP_LOCK, READ_LOCK, 0, 0, 3, 1, 1}, +{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, +{OP_REOPEN, 0, 0, 0, 0, 0, 1}, + }; #endif @@ -240,19 +271,12 @@ static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS], unsigned f = rec->f; SMB_BIG_UINT start = rec->start; SMB_BIG_UINT len = rec->len; - unsigned r1 = rec->r1; - unsigned r2 = rec->r2; - unsigned op; + unsigned op = rec->lock_type; int server; BOOL ret[NSERVERS]; - if (r1 < READ_PCT) { - op = READ_LOCK; - } else { - op = WRITE_LOCK; - } - - if (r2 < LOCK_PCT) { + switch (rec->lock_op) { + case OP_LOCK: /* set a lock */ for (server=0;server<NSERVERS;server++) { ret[server] = cli_lock64(cli[server][conn], @@ -268,7 +292,9 @@ static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS], } if (showall || ret[0] != ret[1]) show_locks(); if (ret[0] != ret[1]) return False; - } else if (r2 < LOCK_PCT+UNLOCK_PCT) { + break; + + case OP_UNLOCK: /* unset a lock */ for (server=0;server<NSERVERS;server++) { ret[server] = cli_unlock64(cli[server][conn], @@ -283,7 +309,9 @@ static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS], } if (showall || ret[0] != ret[1]) show_locks(); if (!hide_unlock_fails && ret[0] != ret[1]) return False; - } else { + break; + + case OP_REOPEN: /* reopen the file */ for (server=0;server<NSERVERS;server++) { cli_close(cli[server][conn], fnum[server][conn][f]); @@ -302,7 +330,9 @@ static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS], conn, f); show_locks(); } + break; } + return True; } @@ -372,7 +402,7 @@ static void test_locks(char *share[NSERVERS]) { struct cli_state *cli[NSERVERS][NCONNECTIONS]; int fnum[NSERVERS][NCONNECTIONS][NFILES]; - int n, i, n1, skip; + int n, i, n1, skip, r1, r2; ZERO_STRUCT(fnum); ZERO_STRUCT(cli); @@ -392,9 +422,27 @@ static void test_locks(char *share[NSERVERS]) random() % (LOCKRANGE-(recorded[n].start-LOCKBASE)); recorded[n].start *= RANGE_MULTIPLE; recorded[n].len *= RANGE_MULTIPLE; - recorded[n].r1 = random() % 100; - recorded[n].r2 = random() % 100; + r1 = random() % 100; + r2 = random() % 100; + if (r1 < READ_PCT) { + recorded[n].lock_type = READ_LOCK; + } else { + recorded[n].lock_type = WRITE_LOCK; + } + if (r2 < LOCK_PCT) { + recorded[n].lock_op = OP_LOCK; + } else if (r2 < UNLOCK_PCT) { + recorded[n].lock_op = OP_UNLOCK; + } else { + recorded[n].lock_op = OP_REOPEN; + } recorded[n].needed = True; +#if !ZERO_ZERO + if (recorded[n].start == 0 && + recorded[n].len == 0) { + recorded[n].len = 1; + } +#endif #if PRESETS } #endif @@ -416,8 +464,9 @@ static void test_locks(char *share[NSERVERS]) reconnect(cli, fnum, share); open_files(cli, fnum); - for (i=0;i<n-skip;i++) { + for (i=0;i<n-skip;i+=skip) { int m, j; + printf("excluding %d-%d\n", i, i+skip-1); for (j=i;j<i+skip;j++) { recorded[j].needed = False; } @@ -460,9 +509,9 @@ static void test_locks(char *share[NSERVERS]) close_files(cli, fnum); for (i=0;i<n;i++) { - printf("{%u, %u, %u, %u, %.0f, %.0f, %u},\n", - recorded[i].r1, - recorded[i].r2, + printf("{%d, %d, %u, %u, %.0f, %.0f, %u},\n", + recorded[i].lock_op, + recorded[i].lock_type, recorded[i].conn, recorded[i].f, (double)recorded[i].start, @@ -576,7 +625,6 @@ static void usage(void) DEBUG(0,("seed=%u\n", seed)); srandom(seed); - locking_init(1); test_locks(share); return(0); diff --git a/source3/torture/torture.c b/source3/torture/torture.c index cd35abdbc6..36d88d518a 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -119,7 +119,7 @@ static BOOL open_nbt_connection(struct cli_state *c) return True; } -static BOOL open_connection(struct cli_state *c) +BOOL torture_open_connection(struct cli_state *c) { ZERO_STRUCTP(c); @@ -153,7 +153,7 @@ static BOOL open_connection(struct cli_state *c) } -static BOOL close_connection(struct cli_state *c) +BOOL torture_close_connection(struct cli_state *c) { BOOL ret = True; if (!cli_tdis(c)) { @@ -195,8 +195,8 @@ static BOOL check_error(int line, struct cli_state *c, status = cli_nt_error(c); if (nterr != status) { - printf("unexpected error code 0x%08x\n", status); - printf(" expected 0x%08x (line=%d)\n", nterr, line); + printf("unexpected error code %s\n", get_nt_error_msg(status)); + printf(" expected %s (line=%d)\n", get_nt_error_msg(nterr), line); return False; } } @@ -314,7 +314,7 @@ static BOOL run_torture(int dummy) ret = rw_torture(&cli); - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { ret = False; } @@ -501,7 +501,7 @@ static BOOL run_readwritetest(int dummy) static struct cli_state cli1, cli2; BOOL test1, test2; - if (!open_connection(&cli1) || !open_connection(&cli2)) { + if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) { return False; } cli_sockopt(&cli1, sockops); @@ -515,11 +515,11 @@ static BOOL run_readwritetest(int dummy) test2 = rw_torture2(&cli1, &cli1); printf("Passed readwritetest v2: %s\n", BOOLSTR(test2)); - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { test1 = False; } - if (!close_connection(&cli2)) { + if (!torture_close_connection(&cli2)) { test2 = False; } @@ -538,7 +538,7 @@ static BOOL run_readwritemulti(int dummy) printf("run_readwritemulti: fname %s\n", randomfname); test = rw_torture3(&cli, randomfname); - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { test = False; } @@ -554,7 +554,7 @@ static BOOL run_readwritelarge(int dummy) char buf[0x10000]; BOOL correct = True; - if (!open_connection(&cli1)) { + if (!torture_open_connection(&cli1)) { return False; } cli_sockopt(&cli1, sockops); @@ -609,7 +609,7 @@ static BOOL run_readwritelarge(int dummy) correct = False; } - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { correct = False; } return correct; @@ -715,7 +715,7 @@ static BOOL run_netbench(int client) printf("+"); - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } @@ -766,7 +766,7 @@ static BOOL run_locktest1(int dummy) int fnum1, fnum2, fnum3; time_t t1, t2; - if (!open_connection(&cli1) || !open_connection(&cli2)) { + if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) { return False; } cli_sockopt(&cli1, sockops); @@ -851,11 +851,11 @@ static BOOL run_locktest1(int dummy) } - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { return False; } - if (!close_connection(&cli2)) { + if (!torture_close_connection(&cli2)) { return False; } @@ -874,7 +874,7 @@ static BOOL run_tcon_test(int dummy) uint16 cnum; char buf[4]; - if (!open_connection(&cli1)) { + if (!torture_open_connection(&cli1)) { return False; } cli_sockopt(&cli1, sockops); @@ -929,7 +929,7 @@ static BOOL run_tcon_test(int dummy) return False; } - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { return False; } @@ -956,7 +956,7 @@ static BOOL run_locktest2(int dummy) int fnum1, fnum2, fnum3; BOOL correct = True; - if (!open_connection(&cli)) { + if (!torture_open_connection(&cli)) { return False; } @@ -1070,7 +1070,7 @@ static BOOL run_locktest2(int dummy) return False; } - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } @@ -1095,7 +1095,7 @@ static BOOL run_locktest3(int dummy) #define NEXT_OFFSET offset += (~(uint32)0) / numops - if (!open_connection(&cli1) || !open_connection(&cli2)) { + if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) { return False; } cli_sockopt(&cli1, sockops); @@ -1190,11 +1190,11 @@ static BOOL run_locktest3(int dummy) return False; } - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { correct = False; } - if (!close_connection(&cli2)) { + if (!torture_close_connection(&cli2)) { correct = False; } @@ -1219,7 +1219,7 @@ static BOOL run_locktest4(int dummy) char buf[1000]; BOOL correct = True; - if (!open_connection(&cli1) || !open_connection(&cli2)) { + if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) { return False; } @@ -1370,8 +1370,8 @@ static BOOL run_locktest4(int dummy) cli_close(&cli1, fnum1); cli_close(&cli2, fnum2); cli_unlink(&cli1, fname); - close_connection(&cli1); - close_connection(&cli2); + torture_close_connection(&cli1); + torture_close_connection(&cli2); printf("finished locktest4\n"); return correct; @@ -1389,7 +1389,7 @@ static BOOL run_locktest5(int dummy) char buf[1000]; BOOL correct = True; - if (!open_connection(&cli1) || !open_connection(&cli2)) { + if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) { return False; } @@ -1489,10 +1489,10 @@ static BOOL run_locktest5(int dummy) cli_close(&cli1, fnum1); cli_close(&cli2, fnum2); cli_unlink(&cli1, fname); - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { correct = False; } - if (!close_connection(&cli2)) { + if (!torture_close_connection(&cli2)) { correct = False; } @@ -1532,7 +1532,7 @@ static BOOL run_denytest1(int dummy) {-1, NULL}}; BOOL correct = True; - if (!open_connection(&cli1) || !open_connection(&cli2)) { + if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) { return False; } cli_sockopt(&cli1, sockops); @@ -1586,10 +1586,10 @@ static BOOL run_denytest1(int dummy) cli_unlink(&cli1, fnames[f]); } - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { correct = False; } - if (!close_connection(&cli2)) { + if (!torture_close_connection(&cli2)) { correct = False; } @@ -1629,7 +1629,7 @@ static BOOL run_denytest2(int dummy) {-1, NULL}}; BOOL correct = True; - if (!open_connection(&cli1)) { + if (!torture_open_connection(&cli1)) { return False; } cli_sockopt(&cli1, sockops); @@ -1682,7 +1682,7 @@ static BOOL run_denytest2(int dummy) cli_unlink(&cli1, fnames[f]); } - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { correct = False; } @@ -1701,7 +1701,7 @@ static BOOL run_fdpasstest(int dummy) int fnum1; pstring buf; - if (!open_connection(&cli1) || !open_connection(&cli2)) { + if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) { return False; } cli_sockopt(&cli1, sockops); @@ -1736,8 +1736,8 @@ static BOOL run_fdpasstest(int dummy) cli_close(&cli1, fnum1); cli_unlink(&cli1, fname); - close_connection(&cli1); - close_connection(&cli2); + torture_close_connection(&cli1); + torture_close_connection(&cli2); printf("finished fdpasstest\n"); return True; @@ -1756,7 +1756,7 @@ static BOOL run_unlinktest(int dummy) int fnum; BOOL correct = True; - if (!open_connection(&cli)) { + if (!torture_open_connection(&cli)) { return False; } @@ -1785,7 +1785,7 @@ static BOOL run_unlinktest(int dummy) cli_close(&cli, fnum); cli_unlink(&cli, fname); - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } @@ -1844,7 +1844,7 @@ static BOOL run_maxfidtest(int dummy) printf("%6d\n", 0); printf("maxfid test finished\n"); - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } return correct; @@ -1876,7 +1876,7 @@ static BOOL run_negprot_nowait(int dummy) cli_negprot_send(&cli); } - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } @@ -1900,7 +1900,7 @@ static BOOL run_randomipc(int dummy) printf("starting random ipc test\n"); - if (!open_connection(&cli)) { + if (!torture_open_connection(&cli)) { return False; } @@ -1923,7 +1923,7 @@ static BOOL run_randomipc(int dummy) } printf("%d/%d\n", i, count); - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } @@ -1953,7 +1953,7 @@ static BOOL run_browsetest(int dummy) printf("starting browse test\n"); - if (!open_connection(&cli)) { + if (!torture_open_connection(&cli)) { return False; } @@ -1967,7 +1967,7 @@ static BOOL run_browsetest(int dummy) SV_TYPE_ALL, browse_callback, NULL); - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } @@ -1991,7 +1991,7 @@ static BOOL run_attrtest(int dummy) printf("starting attrib test\n"); - if (!open_connection(&cli)) { + if (!torture_open_connection(&cli)) { return False; } @@ -2032,7 +2032,7 @@ static BOOL run_attrtest(int dummy) cli_unlink(&cli, fname); - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } @@ -2058,7 +2058,7 @@ static BOOL run_trans2test(int dummy) printf("starting trans2 test\n"); - if (!open_connection(&cli)) { + if (!torture_open_connection(&cli)) { return False; } @@ -2155,7 +2155,7 @@ static BOOL run_trans2test(int dummy) cli_unlink(&cli, fname2); cli_rmdir(&cli, dname); - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } @@ -2164,71 +2164,6 @@ static BOOL run_trans2test(int dummy) return correct; } - -/**************************************************************************** -check for existance of a trans2 call -****************************************************************************/ -static BOOL scan_trans2(struct cli_state *cli, int op, int level) -{ - int data_len = 0; - int param_len = 0; - uint16 setup = op; - pstring param; - char *rparam=NULL, *rdata=NULL; - - param_len = 6; - SSVAL(param, 0, level); - SSVAL(param, 2, level); - SSVAL(param, 4, level); - - if (!cli_send_trans(cli, SMBtrans2, - NULL, /* name */ - -1, 0, /* fid, flags */ - &setup, 1, 0, /* setup, length, max */ - param, param_len, 2, /* param, length, max */ - NULL, data_len, cli->max_xmit /* data, length, max */ - )) { - return False; - } - - if (!cli_receive_trans(cli, SMBtrans2, - &rparam, ¶m_len, - &rdata, &data_len)) { - printf("recv failed op=%d level=%d %s\n", op, level, cli_errstr(cli)); - return False; - } - - if (rdata) free(rdata); - if (rparam) free(rparam); - return True; -} - - -static BOOL run_trans2_scan(int dummy) -{ - static struct cli_state cli; - int op, level; - - printf("starting trans2 scan test\n"); - - if (!open_connection(&cli)) { - return False; - } - - for (op=1; op<200; op++) { - for (level = 1; level < 300; level++) { - scan_trans2(&cli, op, level); - } - } - - close_connection(&cli); - - printf("trans2 scan finished\n"); - return True; -} - - - /* This checks new W2K calls. */ @@ -2261,7 +2196,7 @@ static BOOL run_w2ktest(int dummy) printf("starting w2k test\n"); - if (!open_connection(&cli)) { + if (!torture_open_connection(&cli)) { return False; } @@ -2274,7 +2209,7 @@ static BOOL run_w2ktest(int dummy) cli_close(&cli, fnum); - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } @@ -2296,7 +2231,7 @@ static BOOL run_oplock1(int dummy) printf("starting oplock test 1\n"); - if (!open_connection(&cli1)) { + if (!torture_open_connection(&cli1)) { return False; } @@ -2327,7 +2262,7 @@ static BOOL run_oplock1(int dummy) return False; } - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { correct = False; } @@ -2354,7 +2289,7 @@ static BOOL run_oplock2(int dummy) printf("starting oplock test 2\n"); - if (!open_connection(&cli1)) { + if (!torture_open_connection(&cli1)) { use_level_II_oplocks = False; use_oplocks = saved_use_oplocks; return False; @@ -2363,7 +2298,7 @@ static BOOL run_oplock2(int dummy) cli1.use_oplocks = True; cli1.use_level_II_oplocks = True; - if (!open_connection(&cli2)) { + if (!torture_open_connection(&cli2)) { use_level_II_oplocks = False; use_oplocks = saved_use_oplocks; return False; @@ -2457,7 +2392,7 @@ static BOOL run_oplock2(int dummy) correct = False; } - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { correct = False; } @@ -2496,7 +2431,7 @@ static BOOL run_oplock3(int dummy) /* Child code */ use_oplocks = True; use_level_II_oplocks = True; - if (!open_connection(&cli)) { + if (!torture_open_connection(&cli)) { *shared_correct = False; exit(0); } @@ -2510,7 +2445,7 @@ static BOOL run_oplock3(int dummy) /* parent code */ use_oplocks = True; use_level_II_oplocks = True; - if (!open_connection(&cli)) { + if (!torture_open_connection(&cli)) { return False; } cli_oplock_handler(&cli, oplock3_handler); @@ -2542,7 +2477,7 @@ static BOOL run_deletetest(int dummy) printf("starting delete test\n"); - if (!open_connection(&cli1)) { + if (!torture_open_connection(&cli1)) { return False; } @@ -2816,7 +2751,7 @@ static BOOL run_deletetest(int dummy) cli_setatr(&cli1, fname, 0, 0); cli_unlink(&cli1, fname); - if (!open_connection(&cli2)) { + if (!torture_open_connection(&cli2)) { printf("[8] failed to open second connection.\n"); return False; } @@ -2871,10 +2806,10 @@ static BOOL run_deletetest(int dummy) cli_setatr(&cli1, fname, 0, 0); cli_unlink(&cli1, fname); - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { correct = False; } - if (!close_connection(&cli2)) { + if (!torture_close_connection(&cli2)) { correct = False; } return correct; @@ -2894,7 +2829,7 @@ static BOOL run_opentest(int dummy) printf("starting open test\n"); - if (!open_connection(&cli1)) { + if (!torture_open_connection(&cli1)) { return False; } @@ -3038,7 +2973,7 @@ static BOOL run_opentest(int dummy) cli_unlink(&cli1, tmp_path); } - if (!close_connection(&cli1)) { + if (!torture_close_connection(&cli1)) { correct = False; } @@ -3063,7 +2998,7 @@ static BOOL run_dirtest(int dummy) printf("starting directory test\n"); - if (!open_connection(&cli)) { + if (!torture_open_connection(&cli)) { return False; } @@ -3096,7 +3031,7 @@ static BOOL run_dirtest(int dummy) cli_unlink(&cli, fname); } - if (!close_connection(&cli)) { + if (!torture_close_connection(&cli)) { correct = False; } @@ -3129,8 +3064,8 @@ static double create_procs(BOOL (*fn)(int), BOOL *result) return -1; } - memset(child_status, 0, sizeof(pid_t)*nprocs); - memset(child_status_out, True, sizeof(BOOL)*nprocs); + memset((void *)child_status, 0, sizeof(pid_t)*nprocs); + memset((void *)child_status_out, True, sizeof(BOOL)*nprocs); start_timer(); @@ -3144,7 +3079,7 @@ static double create_procs(BOOL (*fn)(int), BOOL *result) while (1) { memset(¤t_cli, 0, sizeof(current_cli)); - if (open_connection(¤t_cli)) break; + if (torture_open_connection(¤t_cli)) break; if (tries-- == 0) { printf("pid %d failed to start\n", (int)getpid()); _exit(1); @@ -3237,7 +3172,8 @@ static struct { {"OPEN", run_opentest, 0}, {"DELETE", run_deletetest, 0}, {"W2K", run_w2ktest, 0}, - {"TRANS2SCAN", run_trans2_scan, 0}, + {"TRANS2SCAN", torture_trans2_scan, 0}, + {"NTTRANSSCAN", torture_nttrans_scan, 0}, {NULL, NULL, 0}}; |