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

2015-04-06 Thread John Snow
On 04/03/2015 07:18 AM, Peter Maydell wrote: On 2 April 2015 at 20:31, Ed Maste wrote: On 1 April 2015 at 18:45, Peter Maydell wrote: 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

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

2015-04-03 Thread Peter Maydell
On 2 April 2015 at 20:31, Ed Maste wrote: > On 1 April 2015 at 18:45, Peter Maydell wrote: >> 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 >> in

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

2015-04-02 Thread Ed Maste
On 1 April 2015 at 18:45, Peter Maydell wrote: > On 1 April 2015 at 22:14, Paolo Bonzini 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

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

2015-04-01 Thread Peter Maydell
On 1 April 2015 at 22:14, Paolo Bonzini 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 n

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

2015-04-01 Thread Paolo Bonzini
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

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

2015-04-01 Thread John Snow
On 04/01/2015 02:00 PM, Ed Maste wrote: Signed-off-by: Ed Maste --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libqtest.c b/tests/libqtest.c index 12d65bd..54550a8 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -453,6 +453,7 @@ void qtest_qmp_discard

[Qemu-devel] [PATCH] qtest: Add assertion that required environment variable is set

2015-04-01 Thread Ed Maste
Signed-off-by: Ed Maste --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libqtest.c b/tests/libqtest.c index 12d65bd..54550a8 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -453,6 +453,7 @@ void qtest_qmp_discard_response(QTestState *s, const char *fmt, ...