summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-08-15 18:54:44 +0000
committerAndrew Tridgell <tridge@samba.org>2003-08-15 18:54:44 +0000
commitde10237719db8101cd9487b257761d4721f857ab (patch)
tree7f315aa67f37c64626f881a94abc3d0d1da6e7e5 /source4/torture
parent8e4ab747b02207671203d40cd2a78692da78faef (diff)
downloadsamba-de10237719db8101cd9487b257761d4721f857ab.tar.gz
samba-de10237719db8101cd9487b257761d4721f857ab.tar.bz2
samba-de10237719db8101cd9487b257761d4721f857ab.zip
more fixes from the IRIX compiler (thanks herb!)
(This used to be commit 02d068ba7d81d6db25122144981c63f74ad44025)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/masktest.c2
-rw-r--r--source4/torture/nbio.c4
-rw-r--r--source4/torture/raw/rename.c1
-rw-r--r--source4/torture/raw/search.c9
-rw-r--r--source4/torture/torture.c10
5 files changed, 12 insertions, 14 deletions
diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c
index f8d19697cb..7906684169 100644
--- a/source4/torture/masktest.c
+++ b/source4/torture/masktest.c
@@ -22,7 +22,6 @@
static fstring password;
static fstring username;
-static int got_pass;
static int max_protocol = PROTOCOL_NT1;
static BOOL showall = False;
static BOOL old_list = False;
@@ -417,7 +416,6 @@ static void usage(void)
if (p) {
*p = 0;
fstrcpy(password, p+1);
- got_pass = 1;
}
break;
case 's':
diff --git a/source4/torture/nbio.c b/source4/torture/nbio.c
index ef231478d0..e2986cf14e 100644
--- a/source4/torture/nbio.c
+++ b/source4/torture/nbio.c
@@ -258,9 +258,11 @@ void nb_findfirst(const char *mask)
void nb_flush(int fnum)
{
+ struct smb_flush io;
int i;
i = find_handle(fnum);
- /* hmmm, we don't have cli_flush() yet */
+ io.in.fnum = ftable[i].fd;
+ smb_raw_flush(c->tree, &io);
}
void nb_deltree(const char *dname)
diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index 1766511ee6..b536b0fe1a 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -118,6 +118,7 @@ static BOOL test_mv(struct cli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_OK);
done:
+ cli_close(cli, fnum);
smb_raw_exit(cli->session);
cli_deltree(cli, BASEDIR);
return ret;
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index 6035689ec2..c9fa5d6a11 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -546,11 +546,14 @@ static BOOL test_many_files(struct cli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_VALUE(result.count, num_files);
if (search_types[t].level == RAW_SEARCH_BOTH_DIRECTORY_INFO) {
- qsort(result.list, result.count, sizeof(result.list[0]), search_both_compare);
+ qsort(result.list, result.count, sizeof(result.list[0]),
+ QSORT_CAST search_both_compare);
} else if (search_types[t].level == RAW_SEARCH_STANDARD) {
- qsort(result.list, result.count, sizeof(result.list[0]), search_standard_compare);
+ qsort(result.list, result.count, sizeof(result.list[0]),
+ QSORT_CAST search_standard_compare);
} else {
- qsort(result.list, result.count, sizeof(result.list[0]), search_old_compare);
+ qsort(result.list, result.count, sizeof(result.list[0]),
+ QSORT_CAST search_old_compare);
}
for (i=0;i<num_files;i++) {
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 1ec73e0dff..c928846f1f 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -31,7 +31,6 @@ static BOOL use_oplocks;
static BOOL use_level_II_oplocks;
static const char *client_txt = "client_oplocks.txt";
static BOOL use_kerberos;
-static BOOL bypass_io;
BOOL torture_showall = False;
@@ -4050,7 +4049,6 @@ static void usage(void)
{
int opt, i;
char *p;
- int gotuser = 0;
BOOL correct = True;
char *host, *share, *username;
@@ -4097,7 +4095,7 @@ static void usage(void)
srandom(time(NULL));
- while ((opt = getopt(argc, argv, "p:hW:U:n:N:O:o:e:m:Ld:Ac:ks:f:bs:")) != EOF) {
+ while ((opt = getopt(argc, argv, "p:hW:U:n:N:O:o:e:m:Ld:Ac:ks:f:s:")) != EOF) {
switch (opt) {
case 'p':
lp_set_cmdline("smb ports", optarg);
@@ -4148,16 +4146,12 @@ static void usage(void)
#endif
break;
case 'U':
- gotuser = 1;
parse_user(optarg);
break;
case 'f':
torture_failures = atoi(optarg);
break;
- case 'b':
- bypass_io = True;
- break;
-
+
default:
printf("Unknown option %c (%d)\n", (char)opt, opt);
usage();