1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source4/torture/rpc/

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Günther Deschner 2015-12-03 15:24:43 +01:00 committed by Jeremy Allison
parent 9da8e8944b
commit 5eb28d55a7
5 changed files with 22 additions and 22 deletions

View File

@ -79,7 +79,7 @@ bool test_BrowserrQueryOtherDomains(struct torture_context *tctx,
status = dcerpc_BrowserrQueryOtherDomains_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "BrowserrQueryOtherDomains failed");
torture_assert_werr_equal(tctx, WERR_UNKNOWN_LEVEL, r.out.result,
torture_assert_werr_equal(tctx, WERR_INVALID_LEVEL, r.out.result,
"BrowserrQueryOtherDomains");
info.info.info101 = &ctr101;
@ -88,25 +88,25 @@ bool test_BrowserrQueryOtherDomains(struct torture_context *tctx,
status = dcerpc_BrowserrQueryOtherDomains_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "BrowserrQueryOtherDomains failed");
torture_assert_werr_equal(tctx, WERR_UNKNOWN_LEVEL, r.out.result,
torture_assert_werr_equal(tctx, WERR_INVALID_LEVEL, r.out.result,
"BrowserrQueryOtherDomains");
info.info.info101 = NULL;
status = dcerpc_BrowserrQueryOtherDomains_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "BrowserrQueryOtherDomains failed");
torture_assert_werr_equal(tctx, WERR_UNKNOWN_LEVEL, r.out.result,
torture_assert_werr_equal(tctx, WERR_INVALID_LEVEL, r.out.result,
"BrowserrQueryOtherDomains");
info.level = 102;
status = dcerpc_BrowserrQueryOtherDomains_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "BrowserrQueryOtherDomains failed");
torture_assert_werr_equal(tctx, WERR_UNKNOWN_LEVEL, r.out.result,
torture_assert_werr_equal(tctx, WERR_INVALID_LEVEL, r.out.result,
"BrowserrQueryOtherDomains");
info.level = 0;
status = dcerpc_BrowserrQueryOtherDomains_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "BrowserrQueryOtherDomains failed");
torture_assert_werr_equal(tctx, WERR_UNKNOWN_LEVEL, r.out.result,
torture_assert_werr_equal(tctx, WERR_INVALID_LEVEL, r.out.result,
"BrowserrQueryOtherDomains");
return true;

View File

@ -2175,7 +2175,7 @@ static bool test_LogonControl(struct torture_context *tctx,
"LogonControl returned unexpected error code");
break;
default:
torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL,
torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_LEVEL,
"LogonControl returned unexpected error code");
break;
}
@ -2355,7 +2355,7 @@ static bool test_LogonControl2(struct torture_context *tctx,
status = dcerpc_netr_LogonControl2_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "LogonControl2");
torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL, "LogonControl2");
torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_LEVEL, "LogonControl2");
return true;
}
@ -2545,7 +2545,7 @@ static bool test_LogonControl2Ex(struct torture_context *tctx,
status = dcerpc_netr_LogonControl2Ex_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "LogonControl2Ex");
torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL, "LogonControl2Ex");
torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_LEVEL, "LogonControl2Ex");
return true;
}

View File

@ -1423,7 +1423,7 @@ static bool test_SetPrinter_errors(struct torture_context *tctx,
switch (info_ctr.level) {
case 1:
torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL,
torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_LEVEL,
"unexpected error code returned");
break;
case 2:
@ -2595,7 +2595,7 @@ static bool test_EnumForms(struct torture_context *tctx,
dcerpc_spoolss_EnumForms_r(b, tctx, &r),
"EnumForms failed");
if ((r.in.level == 2) && (W_ERROR_EQUAL(r.out.result, WERR_UNKNOWN_LEVEL))) {
if ((r.in.level == 2) && (W_ERROR_EQUAL(r.out.result, WERR_INVALID_LEVEL))) {
torture_skip(tctx, "EnumForms level 2 not supported");
}
@ -3134,7 +3134,7 @@ static bool test_GetJob_args(struct torture_context *tctx,
status = dcerpc_spoolss_GetJob_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "GetJob failed");
if (level == 0) {
torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL, "Unexpected return code");
torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_LEVEL, "Unexpected return code");
}
if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
@ -3250,7 +3250,7 @@ static bool test_AddJob(struct torture_context *tctx,
status = dcerpc_spoolss_AddJob_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "AddJob failed");
torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL, "AddJob failed");
torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_LEVEL, "AddJob failed");
r.in.level = 1;
@ -9708,11 +9708,11 @@ static bool test_AddPrinterDriver_args_level_1(struct torture_context *tctx,
if (ex) {
torture_assert(tctx,
test_AddPrinterDriverEx_exp(tctx, b, server_name, &info_ctr, flags, WERR_UNKNOWN_LEVEL),
test_AddPrinterDriverEx_exp(tctx, b, server_name, &info_ctr, flags, WERR_INVALID_LEVEL),
"failed to test AddPrinterDriverEx level 1");
} else {
torture_assert(tctx,
test_AddPrinterDriver_exp(tctx, b, server_name, &info_ctr, WERR_UNKNOWN_LEVEL),
test_AddPrinterDriver_exp(tctx, b, server_name, &info_ctr, WERR_INVALID_LEVEL),
"failed to test AddPrinterDriver level 1");
}
@ -9720,11 +9720,11 @@ static bool test_AddPrinterDriver_args_level_1(struct torture_context *tctx,
if (ex) {
torture_assert(tctx,
test_AddPrinterDriverEx_exp(tctx, b, server_name, &info_ctr, flags, WERR_UNKNOWN_LEVEL),
test_AddPrinterDriverEx_exp(tctx, b, server_name, &info_ctr, flags, WERR_INVALID_LEVEL),
"failed to test AddPrinterDriverEx level 1");
} else {
torture_assert(tctx,
test_AddPrinterDriver_exp(tctx, b, server_name, &info_ctr, WERR_UNKNOWN_LEVEL),
test_AddPrinterDriver_exp(tctx, b, server_name, &info_ctr, WERR_INVALID_LEVEL),
"failed to test AddPrinterDriver level 1");
}
@ -10002,7 +10002,7 @@ static bool test_AddPrinterDriver_args_level_6(struct torture_context *tctx,
"failed to test AddPrinterDriverEx level 6");
} else {
torture_assert(tctx,
test_AddPrinterDriver_exp(tctx, b, server_name, &info_ctr, WERR_UNKNOWN_LEVEL),
test_AddPrinterDriver_exp(tctx, b, server_name, &info_ctr, WERR_INVALID_LEVEL),
"failed to test AddPrinterDriver level 6");
}
@ -10053,7 +10053,7 @@ static bool test_AddPrinterDriver_args_level_8(struct torture_context *tctx,
"failed to test AddPrinterDriverEx level 8");
} else {
torture_assert(tctx,
test_AddPrinterDriver_exp(tctx, b, server_name, &info_ctr, WERR_UNKNOWN_LEVEL),
test_AddPrinterDriver_exp(tctx, b, server_name, &info_ctr, WERR_INVALID_LEVEL),
"failed to test AddPrinterDriver level 8");
}

View File

@ -557,10 +557,10 @@ static bool test_NetShareAddSetDel(struct torture_context *tctx,
uint32_t level;
WERROR expected;
} levels[] = {
{ 0, WERR_UNKNOWN_LEVEL },
{ 0, WERR_INVALID_LEVEL },
{ 1, WERR_OK },
{ 2, WERR_OK },
{ 501, WERR_UNKNOWN_LEVEL },
{ 501, WERR_INVALID_LEVEL },
{ 502, WERR_OK },
{ 1004, WERR_OK },
{ 1005, WERR_OK },
@ -860,7 +860,7 @@ static bool test_NetShareEnum(struct torture_context *tctx,
{ 0, WERR_OK, WERR_OK },
{ 1, WERR_OK, WERR_OK },
{ 2, WERR_ACCESS_DENIED, WERR_OK },
{ 501, WERR_UNKNOWN_LEVEL, WERR_UNKNOWN_LEVEL },
{ 501, WERR_INVALID_LEVEL, WERR_INVALID_LEVEL },
{ 502, WERR_ACCESS_DENIED, WERR_OK },
};
int i;

View File

@ -346,7 +346,7 @@ static bool test_NetrUseAdd(struct torture_context *tctx,
status = dcerpc_wkssvc_NetrUseAdd_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status,
"NetrUseAdd failed");
torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL,
torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_LEVEL,
"NetrUseAdd failed");
ZERO_STRUCT(r);