r21707: Finally merge my (long-living) perlselftest branch.
[jelmer/samba4-debian.git] / source / torture / ui.c
index 6368d47991ee2fde5cabe218dff9fa621c18093f..d28c0e5bc291b0335c20b365b8f7ac2dd9cc4c00 100644 (file)
@@ -40,6 +40,22 @@ void torture_comment(struct torture_context *context, const char *comment, ...)
        talloc_free(tmp);
 }
 
+void torture_warning(struct torture_context *context, const char *comment, ...)
+{
+       va_list ap;
+       char *tmp;
+
+       if (!context->ui_ops->warning)
+               return;
+
+       va_start(ap, comment);
+       tmp = talloc_vasprintf(context, comment, ap);
+
+       context->ui_ops->warning(context, tmp);
+
+       talloc_free(tmp);
+}
+
 void torture_result(struct torture_context *context, 
                                        enum torture_result result, const char *fmt, ...)
 {