]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture/rpc: avoid checking p->last_fault_code in iremotewinspool*
authorStefan Metzmacher <metze@samba.org>
Wed, 18 Sep 2024 20:42:17 +0000 (22:42 +0200)
committerJule Anger <janger@samba.org>
Thu, 12 Jun 2025 11:27:14 +0000 (11:27 +0000)
Now that we check for NT_STATUS_RPC_UNSUPPORTED_TYPE, there's no
need to check for DCERPC_NCA_S_UNSUPPORTED_TYPE.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit b0be3c8af8240cfb7bc0b63fb7bf73f0f1655e4e)

source4/torture/rpc/iremotewinspool.c
source4/torture/rpc/iremotewinspool_common.c
source4/torture/rpc/iremotewinspool_common.h

index d43f4ff36a4c827e561197c4ea1a018d63993494..537af938b5a1f72bc420ad2dfe8895efc80cbf69 100644 (file)
@@ -824,8 +824,7 @@ static bool test_OpenPrinter(struct torture_context *tctx,
 
 static bool test_object_one_uuid(struct torture_context *tctx,
                                 const struct GUID *object_uuid,
-                                NTSTATUS expected_status,
-                                uint32_t expected_fault_code)
+                                NTSTATUS expected_status)
 {
        const char *printer_name;
        struct spoolss_UserLevel1 client_info;
@@ -865,7 +864,6 @@ static bool test_object_one_uuid(struct torture_context *tctx,
                                                       client_info,
                                                       expected_status,
                                                       WERR_OK,
-                                                      expected_fault_code,
                                                       &server_handle),
                                                "failed to open printserver");
        if (NT_STATUS_IS_OK(expected_status)) {
@@ -884,41 +882,35 @@ static bool test_object_uuid(struct torture_context *tctx,
 
        torture_assert(tctx,
                test_object_one_uuid(tctx, NULL,
-                       NT_STATUS_RPC_UNSUPPORTED_TYPE,
-                       DCERPC_NCA_S_UNSUPPORTED_TYPE),
+                       NT_STATUS_RPC_UNSUPPORTED_TYPE),
                "failed to test NULL object uuid");
 
        object_uuid = GUID_zero();
        torture_assert(tctx,
                test_object_one_uuid(tctx, &object_uuid,
-                       NT_STATUS_RPC_UNSUPPORTED_TYPE,
-                       DCERPC_NCA_S_UNSUPPORTED_TYPE),
+                       NT_STATUS_RPC_UNSUPPORTED_TYPE),
                "failed to test zeroed object uuid");
 
        object_uuid = GUID_random();
        torture_assert(tctx,
                test_object_one_uuid(tctx, &object_uuid,
-                       NT_STATUS_RPC_UNSUPPORTED_TYPE,
-                       DCERPC_NCA_S_UNSUPPORTED_TYPE),
+                       NT_STATUS_RPC_UNSUPPORTED_TYPE),
                "failed to test random object uuid");
 
        GUID_from_string(IREMOTEWINSPOOL_OBJECT_GUID, &object_uuid);
        torture_assert(tctx,
                test_object_one_uuid(tctx, &object_uuid,
-                       NT_STATUS_OK,
-                       0),
+                       NT_STATUS_OK),
                "failed to test IREMOTEWINSPOOL_OBJECT_GUID");
 
        torture_assert(tctx,
                test_object_one_uuid(tctx, &ndr_table_spoolss.syntax_id.uuid,
-                       NT_STATUS_RPC_UNSUPPORTED_TYPE,
-                       DCERPC_NCA_S_UNSUPPORTED_TYPE),
+                       NT_STATUS_RPC_UNSUPPORTED_TYPE),
                "failed to test spoolss interface uuid");
 
        torture_assert(tctx,
                test_object_one_uuid(tctx, &ndr_table_iremotewinspool.syntax_id.uuid,
-                       NT_STATUS_RPC_UNSUPPORTED_TYPE,
-                       DCERPC_NCA_S_UNSUPPORTED_TYPE),
+                       NT_STATUS_RPC_UNSUPPORTED_TYPE),
                "failed to test iremotewinspool interface uuid");
 
        return true;
index d4dd19ac3edb51cfc05979241abac30bd00f47c3..9a75af4ff3ff23fb9dabc32e8eeed961ebefce45 100644 (file)
@@ -59,7 +59,6 @@ bool test_AsyncOpenPrinter_byprinter_expect(struct torture_context *tctx,
                                            struct spoolss_UserLevel1 cinfo,
                                            NTSTATUS expected_status,
                                            WERROR expected_result,
-                                           uint32_t expected_fault_code,
                                            struct policy_handle *handle)
 {
        struct dcerpc_binding_handle *b = p->binding_handle;
@@ -86,8 +85,6 @@ bool test_AsyncOpenPrinter_byprinter_expect(struct torture_context *tctx,
        torture_assert_ntstatus_equal(tctx, status, expected_status, "AsyncOpenPrinter failed");
        torture_assert_werr_equal(tctx, r.out.result, expected_result,
                "AsyncOpenPrinter failed");
-       torture_assert_u32_equal(tctx, p->last_fault_code, expected_fault_code,
-                       "unexpected DCERPC fault code");
 
        return ok;
 }
@@ -107,7 +104,6 @@ bool test_AsyncOpenPrinter_byprinter(struct torture_context *tctx,
                                                      cinfo,
                                                      NT_STATUS_OK,
                                                      WERR_OK,
-                                                     0,
                                                      handle);
 }
 
index 5887416d014db6978638702deb384b263adb205e..4a94653fe4bfab59acf9847c3e2d1645207369aa 100644 (file)
@@ -82,7 +82,6 @@ bool test_AsyncOpenPrinter_byprinter_expect(struct torture_context *tctx,
                                            struct spoolss_UserLevel1 cinfo,
                                            NTSTATUS exected_status,
                                            WERROR exected_result,
-                                           uint32_t expected_fault_code,
                                            struct policy_handle *handle);
 bool test_get_environment(struct torture_context *tctx,
                                 struct dcerpc_binding_handle *b,