s4-smbtorture: display helpful error message when winreg_QueryMultipleValues fails.
authorGünther Deschner <gd@samba.org>
Fri, 9 Apr 2010 15:50:51 +0000 (17:50 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 9 Apr 2010 16:33:45 +0000 (18:33 +0200)
Guenther

source4/torture/rpc/winreg.c

index ba82e888966a2d7a7fe580806e5763f280eef2a5..d7e1247e652acd5ae8d70990c622fc674f06300e 100644 (file)
@@ -1601,7 +1601,6 @@ static bool test_QueryMultipleValues(struct dcerpc_binding_handle *b,
                                     const char *valuename)
 {
        struct winreg_QueryMultipleValues r;
-       NTSTATUS status;
        uint32_t bufsize=0;
 
        ZERO_STRUCT(r);
@@ -1621,10 +1620,9 @@ static bool test_QueryMultipleValues(struct dcerpc_binding_handle *b,
                r.in.buffer = r.out.buffer = talloc_zero_array(tctx, uint8_t,
                                                               *r.in.buffer_size);
 
-               status = dcerpc_winreg_QueryMultipleValues_r(b, tctx, &r);
-
-               if(NT_STATUS_IS_ERR(status))
-                       torture_fail(tctx, "QueryMultipleValues failed");
+               torture_assert_ntstatus_ok(tctx,
+                       dcerpc_winreg_QueryMultipleValues_r(b, tctx, &r),
+                       "QueryMultipleValues failed");
 
                talloc_free(r.in.buffer);
                bufsize += 0x20;