torture-backupkey: Assert dcerpc_bkrp_BackupKey_r call was successful
authorAndrew Bartlett <abartlet@samba.org>
Tue, 10 Feb 2015 22:45:45 +0000 (11:45 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 25 Feb 2015 00:08:11 +0000 (01:08 +0100)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/torture/rpc/backupkey.c

index 7f5676a34c4c164049e252de14f0060f1c5ca657..818764388551d178adb8f1006d483dde932bac4c 100644 (file)
@@ -579,6 +579,9 @@ static struct bkrp_BackupKey *createRestoreGUIDStruct(struct torture_context *tc
 
        torture_assert_ntstatus_ok(tctx, dcerpc_bkrp_BackupKey_r(b, tctx, r),
                                        "Get GUID");
+       torture_assert_werr_ok(tctx, r->out.result,
+                              "Get GUID");
+
        /*
         * We have to set it outside of the function createRetreiveBackupKeyGUIDStruct
         * the len of the blob, this is due to the fact that they don't have the
@@ -1079,6 +1082,9 @@ static bool test_RetreiveBackupKeyGUID_2048bits(struct torture_context *tctx,
                                dcerpc_bkrp_BackupKey_r(b, tctx, r),
                                "Get GUID");
 
+               torture_assert_werr_ok(tctx, r->out.result,
+                                      "Get GUID");
+
                out_blob.length = *r->out.data_out_len;
 
                hret = hx509_cert_init_data(hctx, out_blob.data, out_blob.length, &cert);