[llvm-commits] [PATCH] Program to aid in automated testing on windows.

Michael Spencer bigcheesegs at gmail.com
Sat Oct 2 21:08:48 PDT 2010


On Sat, Oct 2, 2010 at 4:00 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> Hi Michael,
>
> I don't know where to go with this.
>
> On the one hand, I agree we have to solve the automated popup problem.
> However, I am worried that introducing something like this will cause
> lots of hard to understand behavior.

The program will always fail in the same places with the same
conditions, the only difference is that you will never see a message
box. What type of behavior were you thinking of?

> Is it possible to avoid this problem in the llvm-test-suite by just
> linking against the non-Debug runtime?

This, along with adding NDEBUG, would only get rid of (most, not all)
assertions. It wouldn't help with any of the other types of message
boxes that like to stop testing.

>  - Daniel

On Sat, Oct 2, 2010 at 5:13 PM, Francois Pichet <pichet2000 at gmail.com> wrote:
> If I understand correctly the goal of this patch is to get rid of the
> default Windows error dialog when an application crashes. This is
> necessary for running BugPoint in automated mode without user
> intervention right?

That is part of the goal, but there are many sources of modal dialog
boxes in Windows. The original problem that got me to make this was
the test-suite, but bugpoint is another useful case. Although with
bugpoint I'd move the core logic into System.

> In that case you can take look at this registry key:
> HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\DontShowUI
>
> Setting this key to 1 will disable any popup when an application crashes.
> We could arrange to set this flag to 1 when we expect a crash and put
> it back to 0 right after.
> The gotcha is that this flag is global to Windows and could disable
> all errors popup if we fail to put it back to 0 after. But I think we
> can warn users about this.

This key doesn't stop all of the message boxes. And I don't like
playing with peoples registries.

- Michael Spencer




More information about the llvm-commits mailing list