summaryrefslogtreecommitdiff
path: root/source4/torture/raw/search.c
diff options
context:
space:
mode:
authorAravind Srinivasan <aravind.srinivasan@isilon.com>2010-06-15 11:21:34 -0700
committerTim Prouty <tprouty@samba.org>2010-06-15 13:48:15 -0700
commit6da487580e9fac388ce3f3a2decaae03d5ae99a5 (patch)
tree634cab534dbbefdfd562db09798baaae0d1f6b93 /source4/torture/raw/search.c
parent2170a59215d00554b97dc2053eeb6dde38ef3e97 (diff)
downloadsamba-6da487580e9fac388ce3f3a2decaae03d5ae99a5.tar.gz
samba-6da487580e9fac388ce3f3a2decaae03d5ae99a5.tar.bz2
samba-6da487580e9fac388ce3f3a2decaae03d5ae99a5.zip
s4 torture: RAW-SEARCH: break out some of the old search levels
* Added two new parameters: raw_search_search and raw_ea_size which can be enabled/disabled based on whether the server supports RAW_SEARCH_SEARCH and/or RAW_SEARCH_EA_SIZE levels * Skip unsupported levels from the server and give a warning rather than failing. Signed-off-by: Tim Prouty <tprouty@samba.org>
Diffstat (limited to 'source4/torture/raw/search.c')
-rw-r--r--source4/torture/raw/search.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index 50f6e76193..f5419dc672 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -284,7 +284,8 @@ static bool test_one_file(struct torture_context *tctx,
&levels[i].data);
/* see if this server claims to support this level */
- if ((cap & levels[i].capability_mask) != levels[i].capability_mask) {
+ if (((cap & levels[i].capability_mask) != levels[i].capability_mask)
+ || NT_STATUS_EQUAL(levels[i].status, NT_STATUS_NOT_SUPPORTED)) {
printf("search level %s(%d) not supported by server\n",
levels[i].name, (int)levels[i].level);
continue;
@@ -764,7 +765,12 @@ static bool test_many_files(struct torture_context *tctx,
search_types[t].data_level,
search_types[t].cont_type,
&result);
-
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
+ torture_warning(tctx, "search level %s not supported "
+ "by server",
+ search_types[t].name);
+ continue;
+ }
torture_assert_ntstatus_ok(tctx, status, "search failed");
CHECK_VALUE(result.count, num_files);
@@ -1026,6 +1032,11 @@ static bool test_many_dirs(struct torture_context *tctx,
NTSTATUS status;
union smb_search_data *file, *file2, *file3;
+ if (!torture_setting_bool(tctx, "raw_search_search", true)) {
+ torture_comment(tctx, "Skipping these tests as the server "
+ "doesn't support old style search calls\n");
+ return true;
+ }
if (!torture_setup_dir(cli, BASEDIR)) {
return false;
}
@@ -1195,6 +1206,13 @@ static bool test_os2_delete(struct torture_context *tctx,
union smb_search_next io2;
struct multiple_result result;
+ if (!torture_setting_bool(tctx, "search_ea_size", true)){
+ torture_comment(tctx,
+ "Server does not support RAW_SEARCH_EA_SIZE "
+ "level. Skipping this test\n");
+ return true;
+ }
+
if (!torture_setup_dir(cli, BASEDIR)) {
return false;
}