werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source4/torture/rpc/
authorGünther Deschner <gd@samba.org>
Thu, 3 Dec 2015 14:24:43 +0000 (15:24 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 27 Sep 2016 22:04:35 +0000 (00:04 +0200)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/rpc/browser.c
source4/torture/rpc/netlogon.c
source4/torture/rpc/spoolss.c
source4/torture/rpc/srvsvc.c
source4/torture/rpc/wkssvc.c

index db324b1a465e54f399a1228ee8e64ddec508e950..2fbcd4e5651039aaa29e542c3ade03df9583899a 100644 (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;
index c8e864d00a78e569ec5ea3a73434e75e0a941a69..eb4cb4cece96c265672310c744ae34942455afea 100644 (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;
 }
index b6842810c8e1ddc35f3725180a27809cfdf6707b..dc3391788fd84033f481e064f236d8f618eb4933 100644 (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");
        }
 
index 5058dcdd10c8ea8df037539cf3f9aa459be83baa..f732a99032fcea7093cc09c5dba248b2b2869c01 100644 (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;
index 20742561ff22eee18d78daeae58f1260ad5bec1e..e19523f172e78551ecd2f89611235e1dbfd32dd2 100644 (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);