qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qtest: Add assertion that required environment


From: Ed Maste
Subject: Re: [Qemu-devel] [PATCH] qtest: Add assertion that required environment variable is set
Date: Thu, 2 Apr 2015 15:31:18 -0400

On 1 April 2015 at 18:45, Peter Maydell <address@hidden> wrote:
> On 1 April 2015 at 22:14, Paolo Bonzini <address@hidden> wrote:
>> On 01/04/2015 23:06, John Snow wrote:
>>>
>>> if (qemu == NULL) {
>>>   fprintf(stderr, "...");
>>>   g_assert_not_reached();
>>> }
>>>
>>> Though that does read a little strangely. ("Here's a nice error message
>>> for something we are asserting will never happen.")
>>
>> Just "exit(1);" then.  :)
>>
>> Good idea, this is annoying.
>
> Also irritating is the way it silently requires
> the binary to have a name in the shape it was
> expecting, which can catch you out if you were
> trying to set it to a wrapper shell script that
> invokes valgrind or something...

I don't really have enough context to propose a good user-facing
message with a tip for manually executing this, so hopefully someone
else can provide one. I just noticed one other instance that already
had an assertion on getenv("QTEST_QEMU_BINARY") being non-null.

-Ed



reply via email to

[Prev in Thread] Current Thread [Next in Thread]