From 8ba02d9ed9d1f6f330ed1f72d919bfa3869e37f5 Mon Sep 17 00:00:00 2001 From: Aravind Srinivasan Date: Tue, 15 Dec 2009 09:22:07 -0800 Subject: s4 torture: Update RAW-QFILEINFO to only test info levels that are supported by the server Signed-off-by: Tim Prouty --- source4/torture/raw/qfileinfo.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'source4/torture') diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c index d21d1dc776..85f9f1b093 100644 --- a/source4/torture/raw/qfileinfo.c +++ b/source4/torture/raw/qfileinfo.c @@ -265,11 +265,26 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture, if (is_ipc) { if (levels[i].expected_ipc_access_denied && NT_STATUS_EQUAL(NT_STATUS_ACCESS_DENIED, levels[i].fname_status)) { + } else if (!levels[i].only_handles && + NT_STATUS_EQUAL(levels[i].fname_status, + NT_STATUS_NOT_SUPPORTED)) { + torture_warning(torture, "fname level %s %s", + levels[i].name, + nt_errstr(levels[i].fname_status)); + continue; } else if (!levels[i].only_handles && !NT_STATUS_EQUAL(NT_STATUS_INVALID_DEVICE_REQUEST, levels[i].fname_status)) { printf("ERROR: fname level %s failed, expected NT_STATUS_INVALID_DEVICE_REQUEST - %s\n", levels[i].name, nt_errstr(levels[i].fname_status)); count++; } + if (!levels[i].only_paths && + NT_STATUS_EQUAL(levels[i].fnum_status, + NT_STATUS_NOT_SUPPORTED)) { + torture_warning(torture, "fnum level %s %s", + levels[i].name, + nt_errstr(levels[i].fnum_status)); + continue; + } if (!levels[i].only_paths && !NT_STATUS_EQUAL(levels[i].expected_ipc_fnum_status, levels[i].fnum_status)) { printf("ERROR: fnum level %s failed, expected %s - %s\n", levels[i].name, nt_errstr(levels[i].expected_ipc_fnum_status), @@ -277,6 +292,24 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture, count++; } } else { + if (!levels[i].only_paths && + NT_STATUS_EQUAL(levels[i].fnum_status, + NT_STATUS_NOT_SUPPORTED)) { + torture_warning(torture, "fnum level %s %s", + levels[i].name, + nt_errstr(levels[i].fnum_status)); + continue; + } + + if (!levels[i].only_handles && + NT_STATUS_EQUAL(levels[i].fname_status, + NT_STATUS_NOT_SUPPORTED)) { + torture_warning(torture, "fname level %s %s", + levels[i].name, + nt_errstr(levels[i].fname_status)); + continue; + } + if (!levels[i].only_paths && !NT_STATUS_IS_OK(levels[i].fnum_status)) { printf("ERROR: fnum level %s failed - %s\n", levels[i].name, nt_errstr(levels[i].fnum_status)); -- cgit