torture-backupkey: Assert dcerpc_bkrp_BackupKey_r call was successful
[obnox/samba/samba-obnox.git] / 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);