summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/delaywrite.c208
-rw-r--r--source4/torture/basic/mangle_test.c2
-rw-r--r--source4/torture/local/config.mk14
-rw-r--r--source4/torture/local/dbspeed.c2
-rwxr-xr-xsource4/torture/tests/test_gentest.sh34
-rwxr-xr-xsource4/torture/tests/test_locktest.sh28
-rwxr-xr-xsource4/torture/tests/test_masktest.sh28
7 files changed, 190 insertions, 126 deletions
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index af42beb535..61678f4e52 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -55,7 +55,7 @@ static bool test_delayed_write_update(struct torture_context *tctx, struct smbcl
fnum1 = smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE);
if (fnum1 == -1) {
- torture_comment(tctx, "Failed to open %s\n", fname);
+ torture_result(tctx, TORTURE_FAIL, "Failed to open %s", fname);
return false;
}
@@ -65,10 +65,7 @@ static bool test_delayed_write_update(struct torture_context *tctx, struct smbcl
status = smb_raw_fileinfo(cli->tree, tctx, &finfo1);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "fileinfo failed");
torture_comment(tctx, "Initial write time %s\n",
nt_time_string(tctx, finfo1.basic_info.out.write_time));
@@ -80,8 +77,9 @@ static bool test_delayed_write_update(struct torture_context *tctx, struct smbcl
written = smbcli_write(cli->tree, fnum1, 0, "x", 0, 1);
if (written != 1) {
- torture_comment(tctx, "write failed - wrote %d bytes (%s)\n",
- (int)written, __location__);
+ torture_result(tctx, TORTURE_FAIL,
+ "write failed - wrote %d bytes (%s)\n",
+ (int)written, __location__);
return false;
}
@@ -117,7 +115,8 @@ static bool test_delayed_write_update(struct torture_context *tctx, struct smbcl
}
if (finfo1.basic_info.out.write_time == finfo2.basic_info.out.write_time) {
- torture_comment(tctx, "Server did not update write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL,
+ "Server did not update write time (wrong!)");
ret = false;
}
@@ -154,7 +153,7 @@ static bool test_delayed_write_update1(struct torture_context *tctx, struct smbc
fnum1 = smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE);
if (fnum1 == -1) {
- torture_comment(tctx, "Failed to open %s\n", fname);
+ torture_result(tctx, TORTURE_FAIL, "Failed to open %s", fname);
return false;
}
@@ -174,10 +173,7 @@ static bool test_delayed_write_update1(struct torture_context *tctx, struct smbc
status = smb_raw_fileinfo(cli->tree, tctx, &finfo1);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "fileinfo failed");
torture_comment(tctx, "Initial write time %s\n",
nt_time_string(tctx, finfo1.all_info.out.write_time));
@@ -186,8 +182,9 @@ static bool test_delayed_write_update1(struct torture_context *tctx, struct smbc
written = smbcli_smbwrite(cli->tree, fnum1, "x", 1024, 0);
if (written != 0) {
- torture_comment(tctx, "write failed - wrote %d bytes (%s)\n",
- (int)written, __location__);
+ torture_result(tctx, TORTURE_FAIL,
+ "write failed - wrote %d bytes (%s)\n",
+ (int)written, __location__);
return false;
}
@@ -203,8 +200,9 @@ static bool test_delayed_write_update1(struct torture_context *tctx, struct smbc
}
if (finfo2.all_info.out.size != 1024) {
- DEBUG(0, ("file not truncated, size = %u (should be 1024)\n",
- (unsigned int)finfo2.all_info.out.size));
+ torture_result(tctx, TORTURE_FAIL,
+ "file not truncated, size = %u (should be 1024)",
+ (unsigned int)finfo2.all_info.out.size);
ret = false;
break;
}
@@ -233,7 +231,8 @@ static bool test_delayed_write_update1(struct torture_context *tctx, struct smbc
}
if (finfo1.all_info.out.write_time == finfo2.all_info.out.write_time) {
- torture_comment(tctx, "Server did not update write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL,
+ "Server did not update write time (wrong!)");
ret = false;
}
@@ -241,8 +240,9 @@ static bool test_delayed_write_update1(struct torture_context *tctx, struct smbc
written = smbcli_smbwrite(cli->tree, fnum1, "x", 0, 1);
if (written != 1) {
- torture_comment(tctx, "write failed - wrote %d bytes (%s)\n",
- (int)written, __location__);
+ torture_result(tctx, TORTURE_FAIL,
+ "write failed - wrote %d bytes (%s)",
+ (int)written, __location__);
return false;
}
@@ -279,7 +279,8 @@ static bool test_delayed_write_update1(struct torture_context *tctx, struct smbc
}
if (finfo2.all_info.out.write_time != finfo3.all_info.out.write_time) {
- torture_comment(tctx, "Server updated write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL,
+ "Server updated write time (wrong!)");
ret = false;
}
@@ -288,13 +289,11 @@ static bool test_delayed_write_update1(struct torture_context *tctx, struct smbc
fnum1 = -1;
status = smb_raw_pathinfo(cli->tree, tctx, &pinfo4);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("pathinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "pathinfo failed");
if (finfo3.all_info.out.write_time == pinfo4.all_info.out.write_time) {
- torture_comment(tctx, "Server did not update write time on close (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL,
+ "Server did not update write time on close (wrong!)");
ret = false;
} else if (finfo3.all_info.out.write_time < pinfo4.all_info.out.write_time) {
torture_comment(tctx, "Server updated write time on close (correct)\n");
@@ -335,7 +334,7 @@ static bool test_delayed_write_update1a(struct torture_context *tctx, struct smb
fnum1 = smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE);
if (fnum1 == -1) {
- torture_comment(tctx, "Failed to open %s\n", fname);
+ torture_result(tctx, TORTURE_FAIL, "Failed to open %s", fname);
return false;
}
@@ -355,10 +354,7 @@ static bool test_delayed_write_update1a(struct torture_context *tctx, struct smb
status = smb_raw_fileinfo(cli->tree, tctx, &finfo1);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "fileinfo failed");
torture_comment(tctx, "Initial write time %s\n",
nt_time_string(tctx, finfo1.all_info.out.write_time));
@@ -367,7 +363,7 @@ static bool test_delayed_write_update1a(struct torture_context *tctx, struct smb
written = smbcli_smbwrite(cli->tree, fnum1, "x", 10240, 0);
if (written != 0) {
- torture_comment(tctx, "write failed - wrote %d bytes (%s)\n",
+ torture_result(tctx, TORTURE_FAIL, "write failed - wrote %d bytes (%s)",
(int)written, __location__);
return false;
}
@@ -378,14 +374,16 @@ static bool test_delayed_write_update1a(struct torture_context *tctx, struct smb
status = smb_raw_fileinfo(cli->tree, tctx, &finfo2);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
+ torture_result(tctx, TORTURE_FAIL, "fileinfo failed: %s",
+ nt_errstr(status));
ret = false;
break;
}
if (finfo2.all_info.out.size != 10240) {
- DEBUG(0, ("file not truncated, size = %u (should be 10240)\n",
- (unsigned int)finfo2.all_info.out.size));
+ torture_result(tctx, TORTURE_FAIL,
+ "file not truncated, size = %u (should be 10240)",
+ (unsigned int)finfo2.all_info.out.size);
ret = false;
break;
}
@@ -414,18 +412,16 @@ static bool test_delayed_write_update1a(struct torture_context *tctx, struct smb
}
if (finfo1.all_info.out.write_time == finfo2.all_info.out.write_time) {
- torture_comment(tctx, "Server did not update write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL,
+ "Server did not update write time (wrong!)");
ret = false;
}
/* Do a non-zero length SMBwrite and make sure it doesn't update the write time. */
written = smbcli_smbwrite(cli->tree, fnum1, "x", 0, 1);
- if (written != 1) {
- torture_comment(tctx, "write failed - wrote %d bytes (%s)\n",
- (int)written, __location__);
- return false;
- }
+ torture_assert_int_equal(tctx, written, 1,
+ "unexpected number of bytes written");
start = timeval_current();
end = timeval_add(&start, (10*sec), 0);
@@ -433,14 +429,16 @@ static bool test_delayed_write_update1a(struct torture_context *tctx, struct smb
status = smb_raw_fileinfo(cli->tree, tctx, &finfo3);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
+ torture_result(tctx, TORTURE_FAIL, "fileinfo failed: %s\n",
+ nt_errstr(status));
ret = false;
break;
}
if (finfo3.all_info.out.size != 10240) {
- DEBUG(0, ("file not truncated, size = %u (should be 10240)\n",
- (unsigned int)finfo3.all_info.out.size));
+ torture_result(tctx, TORTURE_FAIL,
+ "file not truncated, size = %u (should be 10240)",
+ (unsigned int)finfo3.all_info.out.size);
ret = false;
break;
}
@@ -460,7 +458,8 @@ static bool test_delayed_write_update1a(struct torture_context *tctx, struct smb
}
if (finfo2.all_info.out.write_time != finfo3.all_info.out.write_time) {
- torture_comment(tctx, "Server updated write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL,
+ "Server updated write time (wrong!)");
ret = false;
}
@@ -469,13 +468,11 @@ static bool test_delayed_write_update1a(struct torture_context *tctx, struct smb
fnum1 = -1;
status = smb_raw_pathinfo(cli->tree, tctx, &pinfo4);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("pathinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "pathinfo failed");
if (finfo3.all_info.out.write_time == pinfo4.all_info.out.write_time) {
- torture_comment(tctx, "Server did not update write time on close (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL,
+ "Server did not update write time on close (wrong!)");
ret = false;
} else if (finfo3.all_info.out.write_time < pinfo4.all_info.out.write_time) {
torture_comment(tctx, "Server updated write time on close (correct)\n");
@@ -516,7 +513,7 @@ static bool test_delayed_write_update1b(struct torture_context *tctx, struct smb
fnum1 = smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE);
if (fnum1 == -1) {
- torture_comment(tctx, "Failed to open %s\n", fname);
+ torture_result(tctx, TORTURE_FAIL, "Failed to open %s", fname);
return false;
}
@@ -536,10 +533,7 @@ static bool test_delayed_write_update1b(struct torture_context *tctx, struct smb
status = smb_raw_fileinfo(cli->tree, tctx, &finfo1);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "fileinfo failed");
torture_comment(tctx, "Initial write time %s\n",
nt_time_string(tctx, finfo1.all_info.out.write_time));
@@ -547,11 +541,7 @@ static bool test_delayed_write_update1b(struct torture_context *tctx, struct smb
/* Do a SET_END_OF_FILE_INFO call to truncate. */
status = smbcli_ftruncate(cli->tree, fnum1, (uint64_t)10240);
- if (!NT_STATUS_IS_OK(status)) {
- torture_comment(tctx, "SET_END_OF_FILE failed (%s)\n",
- nt_errstr(status));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "SET_END_OF_FILE failed");
start = timeval_current();
end = timeval_add(&start, (120*sec), 0);
@@ -565,8 +555,9 @@ static bool test_delayed_write_update1b(struct torture_context *tctx, struct smb
}
if (finfo2.all_info.out.size != 10240) {
- DEBUG(0, ("file not truncated (size = %u, should be 10240)\n",
- (unsigned int)finfo2.all_info.out.size ));
+ torture_result(tctx, TORTURE_FAIL,
+ "file not truncated (size = %u, should be 10240)",
+ (unsigned int)finfo2.all_info.out.size );
ret = false;
break;
}
@@ -576,9 +567,10 @@ static bool test_delayed_write_update1b(struct torture_context *tctx, struct smb
if (finfo1.all_info.out.write_time != finfo2.all_info.out.write_time) {
double diff = timeval_elapsed(&start);
if (diff > (0.25 * sec * 0.75)) { /* 0.75 to cope with vmware timing */
- torture_comment(tctx, "After SET_END_OF_FILE truncate "
+ torture_result(tctx, TORTURE_FAIL,
+ "After SET_END_OF_FILE truncate "
"server updated write_time after %.2f seconds"
- "(1 sec == %.2f)(wrong!)\n",
+ "(1 sec == %.2f)(wrong!)",
diff, sec);
ret = false;
break;
@@ -595,18 +587,16 @@ static bool test_delayed_write_update1b(struct torture_context *tctx, struct smb
}
if (finfo1.all_info.out.write_time == finfo2.all_info.out.write_time) {
- torture_comment(tctx, "Server did not update write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL,
+ "Server did not update write time (wrong!)");
ret = false;
}
/* Do a non-zero length SMBwrite and make sure it doesn't update the write time. */
written = smbcli_smbwrite(cli->tree, fnum1, "x", 0, 1);
- if (written != 1) {
- torture_comment(tctx, "write failed - wrote %d bytes (%s)\n",
- (int)written, __location__);
- return false;
- }
+ torture_assert_int_equal(tctx, written, 1,
+ "unexpected number of bytes written");
start = timeval_current();
end = timeval_add(&start, (10*sec), 0);
@@ -614,7 +604,8 @@ static bool test_delayed_write_update1b(struct torture_context *tctx, struct smb
status = smb_raw_fileinfo(cli->tree, tctx, &finfo3);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
+ torture_result(tctx, TORTURE_FAIL,
+ "fileinfo failed: %s", nt_errstr(status));
ret = false;
break;
}
@@ -641,7 +632,7 @@ static bool test_delayed_write_update1b(struct torture_context *tctx, struct smb
}
if (finfo2.all_info.out.write_time != finfo3.all_info.out.write_time) {
- torture_comment(tctx, "Server updated write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL, "Server updated write time (wrong!)\n");
ret = false;
}
@@ -650,13 +641,10 @@ static bool test_delayed_write_update1b(struct torture_context *tctx, struct smb
fnum1 = -1;
status = smb_raw_pathinfo(cli->tree, tctx, &pinfo4);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("pathinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "pathinfo failed");
if (finfo3.all_info.out.write_time == pinfo4.all_info.out.write_time) {
- torture_comment(tctx, "Server did not update write time on close (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL, "Server did not update write time on close (wrong!)\n");
ret = false;
} else if (finfo3.all_info.out.write_time < pinfo4.all_info.out.write_time) {
torture_comment(tctx, "Server updated write time on close (correct)\n");
@@ -697,7 +685,7 @@ static bool test_delayed_write_update1c(struct torture_context *tctx, struct smb
fnum1 = smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE);
if (fnum1 == -1) {
- torture_comment(tctx, "Failed to open %s\n", fname);
+ torture_result(tctx, TORTURE_FAIL, "Failed to open %s", fname);
return false;
}
@@ -717,10 +705,7 @@ static bool test_delayed_write_update1c(struct torture_context *tctx, struct smb
status = smb_raw_fileinfo(cli->tree, tctx, &finfo1);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "fileinfo failed");
torture_comment(tctx, "Initial write time %s\n",
nt_time_string(tctx, finfo1.all_info.out.write_time));
@@ -730,13 +715,10 @@ static bool test_delayed_write_update1c(struct torture_context *tctx, struct smb
parms.allocation_info.in.file.fnum = fnum1;
parms.allocation_info.in.alloc_size = 0;
- status = smb_raw_setfileinfo(cli->tree, &parms);
+ status = smb_raw_setfileinfo(cli->tree, &parms);
- if (!NT_STATUS_IS_OK(status)) {
- torture_comment(tctx, "RAW_SFILEINFO_ALLOCATION_INFO failed (%s)\n",
- nt_errstr(status));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status,
+ "RAW_SFILEINFO_ALLOCATION_INFO failed");
start = timeval_current();
end = timeval_add(&start, (120*sec), 0);
@@ -744,14 +726,16 @@ static bool test_delayed_write_update1c(struct torture_context *tctx, struct smb
status = smb_raw_fileinfo(cli->tree, tctx, &finfo2);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
+ torture_result(tctx, TORTURE_FAIL, "fileinfo failed: %s",
+ nt_errstr(status));
ret = false;
break;
}
if (finfo2.all_info.out.size != 0) {
- DEBUG(0, ("file not truncated (size = %u, should be 10240)\n",
- (unsigned int)finfo2.all_info.out.size ));
+ torture_result(tctx, TORTURE_FAIL,
+ "file not truncated (size = %u, should be 10240)",
+ (unsigned int)finfo2.all_info.out.size);
ret = false;
break;
}
@@ -780,18 +764,15 @@ static bool test_delayed_write_update1c(struct torture_context *tctx, struct smb
}
if (finfo1.all_info.out.write_time == finfo2.all_info.out.write_time) {
- torture_comment(tctx, "Server did not update write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL,
+ "Server did not update write time (wrong!)");
ret = false;
}
/* Do a non-zero length SMBwrite and make sure it doesn't update the write time. */
written = smbcli_smbwrite(cli->tree, fnum1, "x", 0, 1);
-
- if (written != 1) {
- torture_comment(tctx, "write failed - wrote %d bytes (%s)\n",
- (int)written, __location__);
- return false;
- }
+ torture_assert_int_equal(tctx, written, 1,
+ "Unexpected number of bytes written");
start = timeval_current();
end = timeval_add(&start, (10*sec), 0);
@@ -799,13 +780,14 @@ static bool test_delayed_write_update1c(struct torture_context *tctx, struct smb
status = smb_raw_fileinfo(cli->tree, tctx, &finfo3);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
+ torture_result(tctx, TORTURE_FAIL, "fileinfo failed: %s",
+ nt_errstr(status));
ret = false;
break;
}
if (finfo3.all_info.out.size != 1) {
- DEBUG(0, ("file not expanded\n"));
+ torture_result(tctx, TORTURE_FAIL, "file not expanded");
ret = false;
break;
}
@@ -825,7 +807,8 @@ static bool test_delayed_write_update1c(struct torture_context *tctx, struct smb
}
if (finfo2.all_info.out.write_time != finfo3.all_info.out.write_time) {
- torture_comment(tctx, "Server updated write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL,
+ "Server updated write time (wrong!)");
ret = false;
}
@@ -834,13 +817,10 @@ static bool test_delayed_write_update1c(struct torture_context *tctx, struct smb
fnum1 = -1;
status = smb_raw_pathinfo(cli->tree, tctx, &pinfo4);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("pathinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "pathinfo failed");
if (finfo3.all_info.out.write_time == pinfo4.all_info.out.write_time) {
- torture_comment(tctx, "Server did not update write time on close (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL, "Server did not update write time on close (wrong!)\n");
ret = false;
} else if (finfo3.all_info.out.write_time < pinfo4.all_info.out.write_time) {
torture_comment(tctx, "Server updated write time on close (correct)\n");
@@ -894,10 +874,7 @@ static bool test_delayed_write_update2(struct torture_context *tctx, struct smbc
status = smb_raw_fileinfo(cli->tree, tctx, &finfo1);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("fileinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "fileinfo failed");
torture_comment(tctx, "Initial write time %s\n",
nt_time_string(tctx, finfo1.basic_info.out.write_time));
@@ -927,10 +904,7 @@ static bool test_delayed_write_update2(struct torture_context *tctx, struct smbc
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("sfileinfo failed: %s\n", nt_errstr(status)));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx, status, "sfileinfo failed");
}
finfo2.basic_info.in.file.path = fname;
@@ -947,7 +921,7 @@ static bool test_delayed_write_update2(struct torture_context *tctx, struct smbc
if (finfo1.basic_info.out.write_time != finfo2.basic_info.out.write_time) {
torture_comment(tctx, "Server updated write_time (correct)\n");
} else {
- torture_comment(tctx, "Server did not update write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL, "Server did not update write time (wrong!)\n");
ret = false;
}
@@ -1195,7 +1169,7 @@ static bool test_delayed_write_update2(struct torture_context *tctx, struct smbc
}
if (finfo1.basic_info.out.write_time == finfo2.basic_info.out.write_time) {
- torture_comment(tctx, "Server did not update write time (wrong!)\n");
+ torture_result(tctx, TORTURE_FAIL, "Server did not update write time (wrong!)\n");
ret = false;
}
@@ -2900,7 +2874,7 @@ struct torture_suite *torture_delay_write(void)
torture_suite_add_2smb_test(suite, "finfo update on close", test_finfo_after_write);
torture_suite_add_1smb_test(suite, "delayed update of write time", test_delayed_write_update);
- torture_suite_add_1smb_test(suite, "update of write time and SMBwrite truncate ", test_delayed_write_update1);
+ torture_suite_add_1smb_test(suite, "update of write time and SMBwrite truncate", test_delayed_write_update1);
torture_suite_add_1smb_test(suite, "update of write time and SMBwrite truncate expand", test_delayed_write_update1a);
torture_suite_add_1smb_test(suite, "update of write time using SET_END_OF_FILE", test_delayed_write_update1b);
torture_suite_add_1smb_test(suite, "update of write time using SET_ALLOCATION_SIZE", test_delayed_write_update1c);
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index 58d7098972..e90337fd51 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -21,7 +21,7 @@
#include "torture/torture.h"
#include "system/filesys.h"
#include "system/dir.h"
-#include "lib/tdb/include/tdb.h"
+#include "../tdb/include/tdb.h"
#include "lib/util/util_tdb.h"
#include "libcli/libcli.h"
#include "torture/util.h"
diff --git a/source4/torture/local/config.mk b/source4/torture/local/config.mk
index cd1c7b1422..4cd9f6c865 100644
--- a/source4/torture/local/config.mk
+++ b/source4/torture/local/config.mk
@@ -20,23 +20,23 @@ PRIVATE_DEPENDENCIES = \
TORTURE_LOCAL_OBJ_FILES = \
$(torturesrcdir)/../lib/charset/tests/iconv.o \
- $(torturesrcdir)/../lib/talloc/testsuite.o \
- $(torturesrcdir)/../lib/replace/test/getifaddrs.o \
- $(torturesrcdir)/../lib/replace/test/os2_delete.o \
- $(torturesrcdir)/../lib/replace/test/strptime.o \
- $(torturesrcdir)/../lib/replace/test/testsuite.o \
+ $(torturesrcdir)/../../lib/talloc/testsuite.o \
+ $(torturesrcdir)/../../lib/replace/test/getifaddrs.o \
+ $(torturesrcdir)/../../lib/replace/test/os2_delete.o \
+ $(torturesrcdir)/../../lib/replace/test/strptime.o \
+ $(torturesrcdir)/../../lib/replace/test/testsuite.o \
$(torturesrcdir)/../lib/messaging/tests/messaging.o \
$(torturesrcdir)/../lib/messaging/tests/irpc.o \
$(torturesrcdir)/../librpc/tests/binding_string.o \
$(torturesrcdir)/../lib/util/tests/idtree.o \
$(torturesrcdir)/../lib/socket/testsuite.o \
- $(torturesrcdir)/../lib/socket_wrapper/testsuite.o \
+ $(torturesrcdir)/../../lib/socket_wrapper/testsuite.o \
$(torturesrcdir)/../libcli/resolve/testsuite.o \
$(torturesrcdir)/../lib/util/tests/strlist.o \
$(torturesrcdir)/../lib/util/tests/str.o \
$(torturesrcdir)/../lib/util/tests/file.o \
$(torturesrcdir)/../lib/util/tests/genrand.o \
- $(torturesrcdir)/../lib/compression/testsuite.o \
+ $(torturesrcdir)/../../lib/compression/testsuite.o \
$(torturesrcdir)/../lib/charset/tests/charset.o \
$(torturesrcdir)/../libcli/security/tests/sddl.o \
$(torturesrcdir)/../lib/tdr/testsuite.o \
diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c
index 017c8568f4..3d449a5991 100644
--- a/source4/torture/local/dbspeed.c
+++ b/source4/torture/local/dbspeed.c
@@ -21,7 +21,7 @@
#include "includes.h"
#include "system/filesys.h"
-#include "lib/tdb/include/tdb.h"
+#include "../tdb/include/tdb.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "lib/ldb_wrap.h"
diff --git a/source4/torture/tests/test_gentest.sh b/source4/torture/tests/test_gentest.sh
new file mode 100755
index 0000000000..2f4d00dc77
--- /dev/null
+++ b/source4/torture/tests/test_gentest.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Blackbox tests for gentest
+# Copyright (C) 2008 Andrew Tridgell
+# based on test_smbclient.sh
+
+if [ $# -lt 4 ]; then
+cat <<EOF
+Usage: test_gentest.sh SERVER USERNAME PASSWORD DOMAIN
+EOF
+exit 1;
+fi
+
+SERVER=$1
+USERNAME=$2
+PASSWORD=$3
+DOMAIN=$4
+shift 4
+failed=0
+
+samba4bindir=`dirname $0`/../../bin
+gentest=$samba4bindir/gentest
+
+. `dirname $0`/../../../testprogs/blackbox/subunit.sh
+
+cat <<EOF > st/gentest.ignore
+all_info.out.fname
+internal_information.out.file_id
+EOF
+
+testit "gentest" $VALGRIND $gentest //$SERVER/test1 //$SERVER/test2 --num-ops=100 --ignore=st/gentest.ignore -W "$DOMAIN" -U"$USERNAME%$PASSWORD" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
+
+rm -f st/gentest.ignore
+
+exit $failed
diff --git a/source4/torture/tests/test_locktest.sh b/source4/torture/tests/test_locktest.sh
new file mode 100755
index 0000000000..1fe39b4d1d
--- /dev/null
+++ b/source4/torture/tests/test_locktest.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Blackbox tests for locktest
+# Copyright (C) 2008 Andrew Tridgell
+# based on test_smbclient.sh
+
+if [ $# -lt 5 ]; then
+cat <<EOF
+Usage: test_locktest.sh SERVER USERNAME PASSWORD DOMAIN PREFIX
+EOF
+exit 1;
+fi
+
+SERVER=$1
+USERNAME=$2
+PASSWORD=$3
+DOMAIN=$4
+PREFIX=$5
+shift 5
+failed=0
+
+samba4bindir=`dirname $0`/../../bin
+locktest=$samba4bindir/locktest
+
+. `dirname $0`/../../../testprogs/blackbox/subunit.sh
+
+testit "locktest" $VALGRIND $locktest //$SERVER/test1 //$SERVER/test2 --num-ops=100 -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
+
+exit $failed
diff --git a/source4/torture/tests/test_masktest.sh b/source4/torture/tests/test_masktest.sh
new file mode 100755
index 0000000000..59165e47df
--- /dev/null
+++ b/source4/torture/tests/test_masktest.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Blackbox tests for masktest
+# Copyright (C) 2008 Andrew Tridgell
+# based on test_smbclient.sh
+
+if [ $# -lt 5 ]; then
+cat <<EOF
+Usage: test_masktest.sh SERVER USERNAME PASSWORD DOMAIN PREFIX
+EOF
+exit 1;
+fi
+
+SERVER=$1
+USERNAME=$2
+PASSWORD=$3
+DOMAIN=$4
+PREFIX=$5
+shift 5
+failed=0
+
+samba4bindir=`dirname $0`/../../bin
+masktest=$samba4bindir/masktest
+
+. `dirname $0`/../../../testprogs/blackbox/subunit.sh
+
+testit "masktest" $VALGRIND $masktest //$SERVER/tmp --num-ops=200 --dieonerror -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
+
+exit $failed