* [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
@ 2013-12-31 4:42 Kewei Yu
2013-12-31 12:33 ` Peter Crosthwaite
2014-01-02 8:15 ` Paolo Bonzini
0 siblings, 2 replies; 16+ messages in thread
From: Kewei Yu @ 2013-12-31 4:42 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, stefanha
When we disabling vnc from "./configure", the qemu can't use the vnc option.
So qtest can't use the "vnc -none ", otherwise "make check" will hang.
Signed-off-by: Kewei Yu <keweihk@gmail.com>
---
v2: Consolidate VNC macro's #ifdef'ery to one central point (tests/libqtest.c).
tests/fdc-test.c | 5 +----
tests/ide-test.c | 3 ---
tests/libqtest.c | 8 ++++++++
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/tests/fdc-test.c b/tests/fdc-test.c
index 38b5b17..37096dc 100644
--- a/tests/fdc-test.c
+++ b/tests/fdc-test.c
@@ -518,7 +518,6 @@ static void fuzz_registers(void)
int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
- char *cmdline;
int fd;
int ret;
@@ -538,9 +537,7 @@ int main(int argc, char **argv)
/* Run the tests */
g_test_init(&argc, &argv, NULL);
- cmdline = g_strdup_printf("-vnc none ");
-
- qtest_start(cmdline);
+ qtest_start(NULL);
qtest_irq_intercept_in(global_qtest, "ioapic");
qtest_add_func("/fdc/cmos", test_cmos);
qtest_add_func("/fdc/no_media_on_start", test_no_media_on_start);
diff --git a/tests/ide-test.c b/tests/ide-test.c
index d5cec5a..4a0d97f 100644
--- a/tests/ide-test.c
+++ b/tests/ide-test.c
@@ -380,7 +380,6 @@ static void test_bmdma_no_busmaster(void)
static void test_bmdma_setup(void)
{
ide_test_start(
- "-vnc none "
"-drive file=%s,if=ide,serial=%s,cache=writeback "
"-global ide-hd.ver=%s",
tmp_path, "testdisk", "version");
@@ -410,7 +409,6 @@ static void test_identify(void)
int ret;
ide_test_start(
- "-vnc none "
"-drive file=%s,if=ide,serial=%s,cache=writeback "
"-global ide-hd.ver=%s",
tmp_path, "testdisk", "version");
@@ -455,7 +453,6 @@ static void test_flush(void)
uint8_t data;
ide_test_start(
- "-vnc none "
"-drive file=blkdebug::%s,if=ide,cache=writeback",
tmp_path);
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 359d571..921391c 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -35,6 +35,12 @@
#define MAX_IRQ 256
+#ifdef CONFIG_VNC
+static const char *qtest_vnc_param = "-vnc none ";
+#else
+static const char *qtest_vnc_param = NULL;
+#endif
+
QTestState *global_qtest;
struct QTestState
@@ -136,8 +142,10 @@ QTestState *qtest_init(const char *extra_args)
"-pidfile %s "
"-machine accel=qtest "
"-display none "
+ "%s"
"%s", qemu_binary, s->socket_path,
s->qmp_socket_path, pid_file,
+ qtest_vnc_param ?: "",
extra_args ?: "");
execlp("/bin/sh", "sh", "-c", command, NULL);
exit(1);
--
1.7.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2013-12-31 4:42 [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang Kewei Yu
@ 2013-12-31 12:33 ` Peter Crosthwaite
2013-12-31 13:29 ` Kewei Yu
2014-01-02 8:15 ` Paolo Bonzini
1 sibling, 1 reply; 16+ messages in thread
From: Peter Crosthwaite @ 2013-12-31 12:33 UTC (permalink / raw)
To: Kewei Yu; +Cc: qemu-trivial, qemu-devel@nongnu.org Developers, Stefan Hajnoczi
On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
> When we disabling vnc from "./configure", the qemu can't use the vnc option.
"disable", -"the", "QEMU",
> So qtest can't use the "vnc -none ", otherwise "make check" will hang.
>
Curious, why exactly does make check hang? Shouldn't it just fail with
an error result in this case?
> Signed-off-by: Kewei Yu <keweihk@gmail.com>
> ---
> v2: Consolidate VNC macro's #ifdef'ery to one central point (tests/libqtest.c).
>
> tests/fdc-test.c | 5 +----
> tests/ide-test.c | 3 ---
> tests/libqtest.c | 8 ++++++++
> 3 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/tests/fdc-test.c b/tests/fdc-test.c
> index 38b5b17..37096dc 100644
> --- a/tests/fdc-test.c
> +++ b/tests/fdc-test.c
> @@ -518,7 +518,6 @@ static void fuzz_registers(void)
> int main(int argc, char **argv)
> {
> const char *arch = qtest_get_arch();
> - char *cmdline;
> int fd;
> int ret;
>
> @@ -538,9 +537,7 @@ int main(int argc, char **argv)
> /* Run the tests */
> g_test_init(&argc, &argv, NULL);
>
> - cmdline = g_strdup_printf("-vnc none ");
> -
> - qtest_start(cmdline);
> + qtest_start(NULL);
> qtest_irq_intercept_in(global_qtest, "ioapic");
> qtest_add_func("/fdc/cmos", test_cmos);
> qtest_add_func("/fdc/no_media_on_start", test_no_media_on_start);
> diff --git a/tests/ide-test.c b/tests/ide-test.c
> index d5cec5a..4a0d97f 100644
> --- a/tests/ide-test.c
> +++ b/tests/ide-test.c
> @@ -380,7 +380,6 @@ static void test_bmdma_no_busmaster(void)
> static void test_bmdma_setup(void)
> {
> ide_test_start(
> - "-vnc none "
> "-drive file=%s,if=ide,serial=%s,cache=writeback "
> "-global ide-hd.ver=%s",
> tmp_path, "testdisk", "version");
> @@ -410,7 +409,6 @@ static void test_identify(void)
> int ret;
>
> ide_test_start(
> - "-vnc none "
> "-drive file=%s,if=ide,serial=%s,cache=writeback "
> "-global ide-hd.ver=%s",
> tmp_path, "testdisk", "version");
> @@ -455,7 +453,6 @@ static void test_flush(void)
> uint8_t data;
>
> ide_test_start(
> - "-vnc none "
> "-drive file=blkdebug::%s,if=ide,cache=writeback",
> tmp_path);
>
> diff --git a/tests/libqtest.c b/tests/libqtest.c
> index 359d571..921391c 100644
> --- a/tests/libqtest.c
> +++ b/tests/libqtest.c
> @@ -35,6 +35,12 @@
>
> #define MAX_IRQ 256
>
> +#ifdef CONFIG_VNC
> +static const char *qtest_vnc_param = "-vnc none ";
> +#else
> +static const char *qtest_vnc_param = NULL;
> +#endif
> +
> QTestState *global_qtest;
>
> struct QTestState
> @@ -136,8 +142,10 @@ QTestState *qtest_init(const char *extra_args)
> "-pidfile %s "
> "-machine accel=qtest "
> "-display none "
> + "%s"
> "%s", qemu_binary, s->socket_path,
> s->qmp_socket_path, pid_file,
> + qtest_vnc_param ?: "",
I do vaguely remember someone going to efforts to remove uses of "? :
foo" (with the blank true value).
Regards,
Peter
> extra_args ?: "");
> execlp("/bin/sh", "sh", "-c", command, NULL);
> exit(1);
> --
> 1.7.1
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2013-12-31 12:33 ` Peter Crosthwaite
@ 2013-12-31 13:29 ` Kewei Yu
2014-01-01 1:47 ` Kewei Yu
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Kewei Yu @ 2013-12-31 13:29 UTC (permalink / raw)
To: Peter Crosthwaite
Cc: qemu-trivial, qemu-devel@nongnu.org Developers, Stefan Hajnoczi
[-- Attachment #1: Type: text/plain, Size: 3856 bytes --]
2013/12/31 Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
> > When we disabling vnc from "./configure", the qemu can't use the vnc
> option.
>
> "disable", -"the", "QEMU",
>
Do you mean "s/disabling/disable; s/the\ qemu/QEMU"?
>
> > So qtest can't use the "vnc -none ", otherwise "make check" will hang.
> >
>
> Curious, why exactly does make check hang? Shouldn't it just fail with
> an error result in this case?
>
Yeah, there is an error result "VNC support is disabled".
>
> > Signed-off-by: Kewei Yu <keweihk@gmail.com>
> > ---
> > v2: Consolidate VNC macro's #ifdef'ery to one central point
> (tests/libqtest.c).
> >
> > tests/fdc-test.c | 5 +----
> > tests/ide-test.c | 3 ---
> > tests/libqtest.c | 8 ++++++++
> > 3 files changed, 9 insertions(+), 7 deletions(-)
> >
> > diff --git a/tests/fdc-test.c b/tests/fdc-test.c
> > index 38b5b17..37096dc 100644
> > --- a/tests/fdc-test.c
> > +++ b/tests/fdc-test.c
> > @@ -518,7 +518,6 @@ static void fuzz_registers(void)
> > int main(int argc, char **argv)
> > {
> > const char *arch = qtest_get_arch();
> > - char *cmdline;
> > int fd;
> > int ret;
> >
> > @@ -538,9 +537,7 @@ int main(int argc, char **argv)
> > /* Run the tests */
> > g_test_init(&argc, &argv, NULL);
> >
> > - cmdline = g_strdup_printf("-vnc none ");
> > -
> > - qtest_start(cmdline);
> > + qtest_start(NULL);
> > qtest_irq_intercept_in(global_qtest, "ioapic");
> > qtest_add_func("/fdc/cmos", test_cmos);
> > qtest_add_func("/fdc/no_media_on_start", test_no_media_on_start);
> > diff --git a/tests/ide-test.c b/tests/ide-test.c
> > index d5cec5a..4a0d97f 100644
> > --- a/tests/ide-test.c
> > +++ b/tests/ide-test.c
> > @@ -380,7 +380,6 @@ static void test_bmdma_no_busmaster(void)
> > static void test_bmdma_setup(void)
> > {
> > ide_test_start(
> > - "-vnc none "
> > "-drive file=%s,if=ide,serial=%s,cache=writeback "
> > "-global ide-hd.ver=%s",
> > tmp_path, "testdisk", "version");
> > @@ -410,7 +409,6 @@ static void test_identify(void)
> > int ret;
> >
> > ide_test_start(
> > - "-vnc none "
> > "-drive file=%s,if=ide,serial=%s,cache=writeback "
> > "-global ide-hd.ver=%s",
> > tmp_path, "testdisk", "version");
> > @@ -455,7 +453,6 @@ static void test_flush(void)
> > uint8_t data;
> >
> > ide_test_start(
> > - "-vnc none "
> > "-drive file=blkdebug::%s,if=ide,cache=writeback",
> > tmp_path);
> >
> > diff --git a/tests/libqtest.c b/tests/libqtest.c
> > index 359d571..921391c 100644
> > --- a/tests/libqtest.c
> > +++ b/tests/libqtest.c
> > @@ -35,6 +35,12 @@
> >
> > #define MAX_IRQ 256
> >
> > +#ifdef CONFIG_VNC
> > +static const char *qtest_vnc_param = "-vnc none ";
> > +#else
> > +static const char *qtest_vnc_param = NULL;
> > +#endif
> > +
> > QTestState *global_qtest;
> >
> > struct QTestState
> > @@ -136,8 +142,10 @@ QTestState *qtest_init(const char *extra_args)
> > "-pidfile %s "
> > "-machine accel=qtest "
> > "-display none "
> > + "%s"
> > "%s", qemu_binary, s->socket_path,
> > s->qmp_socket_path, pid_file,
> > + qtest_vnc_param ?: "",
>
> I do vaguely remember someone going to efforts to remove uses of "? :
> foo" (with the blank true value).
I'm not clear the sentence's meaning.
>
> Regards,
> Peter
>
> > extra_args ?: "");
> > execlp("/bin/sh", "sh", "-c", command, NULL);
> > exit(1);
> > --
> > 1.7.1
> >
> >
>
Thanks
Kewei
[-- Attachment #2: Type: text/html, Size: 6225 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2013-12-31 13:29 ` Kewei Yu
@ 2014-01-01 1:47 ` Kewei Yu
2014-01-01 2:06 ` Peter Maydell
2014-01-01 4:40 ` Peter Crosthwaite
2 siblings, 0 replies; 16+ messages in thread
From: Kewei Yu @ 2014-01-01 1:47 UTC (permalink / raw)
To: Peter Crosthwaite
Cc: qemu-trivial, qemu-devel@nongnu.org Developers, Stefan Hajnoczi
[-- Attachment #1: Type: text/plain, Size: 4216 bytes --]
Peter:
Happy new year, Today is new year's day, so I will present the v3
patch according to your suggestions tomorrow , thanks for your review.
Faithfully yours
Kewei Yu
2013/12/31 Kewei Yu <keweihk@gmail.com>
> 2013/12/31 Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>
>> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
>> > When we disabling vnc from "./configure", the qemu can't use the vnc
>> option.
>>
>> "disable", -"the", "QEMU",
>>
> Do you mean "s/disabling/disable; s/the\ qemu/QEMU"?
>
>>
>> > So qtest can't use the "vnc -none ", otherwise "make check" will hang.
>> >
>>
>> Curious, why exactly does make check hang? Shouldn't it just fail with
>> an error result in this case?
>>
> Yeah, there is an error result "VNC support is disabled".
>
>>
>> > Signed-off-by: Kewei Yu <keweihk@gmail.com>
>> > ---
>> > v2: Consolidate VNC macro's #ifdef'ery to one central point
>> (tests/libqtest.c).
>> >
>> > tests/fdc-test.c | 5 +----
>> > tests/ide-test.c | 3 ---
>> > tests/libqtest.c | 8 ++++++++
>> > 3 files changed, 9 insertions(+), 7 deletions(-)
>> >
>> > diff --git a/tests/fdc-test.c b/tests/fdc-test.c
>> > index 38b5b17..37096dc 100644
>> > --- a/tests/fdc-test.c
>> > +++ b/tests/fdc-test.c
>> > @@ -518,7 +518,6 @@ static void fuzz_registers(void)
>> > int main(int argc, char **argv)
>> > {
>> > const char *arch = qtest_get_arch();
>> > - char *cmdline;
>> > int fd;
>> > int ret;
>> >
>> > @@ -538,9 +537,7 @@ int main(int argc, char **argv)
>> > /* Run the tests */
>> > g_test_init(&argc, &argv, NULL);
>> >
>> > - cmdline = g_strdup_printf("-vnc none ");
>> > -
>> > - qtest_start(cmdline);
>> > + qtest_start(NULL);
>> > qtest_irq_intercept_in(global_qtest, "ioapic");
>> > qtest_add_func("/fdc/cmos", test_cmos);
>> > qtest_add_func("/fdc/no_media_on_start", test_no_media_on_start);
>> > diff --git a/tests/ide-test.c b/tests/ide-test.c
>> > index d5cec5a..4a0d97f 100644
>> > --- a/tests/ide-test.c
>> > +++ b/tests/ide-test.c
>> > @@ -380,7 +380,6 @@ static void test_bmdma_no_busmaster(void)
>> > static void test_bmdma_setup(void)
>> > {
>> > ide_test_start(
>> > - "-vnc none "
>> > "-drive file=%s,if=ide,serial=%s,cache=writeback "
>> > "-global ide-hd.ver=%s",
>> > tmp_path, "testdisk", "version");
>> > @@ -410,7 +409,6 @@ static void test_identify(void)
>> > int ret;
>> >
>> > ide_test_start(
>> > - "-vnc none "
>> > "-drive file=%s,if=ide,serial=%s,cache=writeback "
>> > "-global ide-hd.ver=%s",
>> > tmp_path, "testdisk", "version");
>> > @@ -455,7 +453,6 @@ static void test_flush(void)
>> > uint8_t data;
>> >
>> > ide_test_start(
>> > - "-vnc none "
>> > "-drive file=blkdebug::%s,if=ide,cache=writeback",
>> > tmp_path);
>> >
>> > diff --git a/tests/libqtest.c b/tests/libqtest.c
>> > index 359d571..921391c 100644
>> > --- a/tests/libqtest.c
>> > +++ b/tests/libqtest.c
>> > @@ -35,6 +35,12 @@
>> >
>> > #define MAX_IRQ 256
>> >
>> > +#ifdef CONFIG_VNC
>> > +static const char *qtest_vnc_param = "-vnc none ";
>> > +#else
>> > +static const char *qtest_vnc_param = NULL;
>> > +#endif
>> > +
>> > QTestState *global_qtest;
>> >
>> > struct QTestState
>> > @@ -136,8 +142,10 @@ QTestState *qtest_init(const char *extra_args)
>> > "-pidfile %s "
>> > "-machine accel=qtest "
>> > "-display none "
>> > + "%s"
>> > "%s", qemu_binary, s->socket_path,
>> > s->qmp_socket_path, pid_file,
>> > + qtest_vnc_param ?: "",
>>
>> I do vaguely remember someone going to efforts to remove uses of "? :
>> foo" (with the blank true value).
>
> I'm not clear the sentence's meaning.
>
>>
>> Regards,
>> Peter
>>
>> > extra_args ?: "");
>> > execlp("/bin/sh", "sh", "-c", command, NULL);
>> > exit(1);
>> > --
>> > 1.7.1
>> >
>> >
>>
>
> Thanks
> Kewei
>
>
[-- Attachment #2: Type: text/html, Size: 7862 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2013-12-31 13:29 ` Kewei Yu
2014-01-01 1:47 ` Kewei Yu
@ 2014-01-01 2:06 ` Peter Maydell
2014-01-01 2:29 ` Kewei Yu
2014-01-01 4:40 ` Peter Crosthwaite
2 siblings, 1 reply; 16+ messages in thread
From: Peter Maydell @ 2014-01-01 2:06 UTC (permalink / raw)
To: Kewei Yu
Cc: qemu-trivial, Peter Crosthwaite, qemu-devel@nongnu.org Developers,
Stefan Hajnoczi
On 31 December 2013 13:29, Kewei Yu <keweihk@gmail.com> wrote:
> 2013/12/31 Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>>
>> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
>> > "%s", qemu_binary, s->socket_path,
>> > s->qmp_socket_path, pid_file,
>> > + qtest_vnc_param ?: "",
>>
>> I do vaguely remember someone going to efforts to remove uses of "? :
>> foo" (with the blank true value).
>
> I'm not clear the sentence's meaning.
Using the ternary operator "X ? Y : Z" with an empty 2nd operand
"X ?: Y" is not standard C. It's a GCC extension. There was a
suggestion a year or so back that we should remove the uses of
it, but the consensus was that this was unnecessary, since in
practice we rely on other GCC extensions. Clang also supports
this syntax, and it's the only other compiler we care about.
In this case it seems reasonable, especially since the line
immediately below this addition is using it too.
thanks
-- PMM
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2014-01-01 2:06 ` Peter Maydell
@ 2014-01-01 2:29 ` Kewei Yu
2014-01-01 4:39 ` Peter Crosthwaite
0 siblings, 1 reply; 16+ messages in thread
From: Kewei Yu @ 2014-01-01 2:29 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-trivial, Peter Crosthwaite, qemu-devel@nongnu.org Developers,
Stefan Hajnoczi
[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]
2014/1/1 Peter Maydell <peter.maydell@linaro.org>
> On 31 December 2013 13:29, Kewei Yu <keweihk@gmail.com> wrote:
> > 2013/12/31 Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> >>
> >> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
> >> > "%s", qemu_binary, s->socket_path,
> >> > s->qmp_socket_path, pid_file,
> >> > + qtest_vnc_param ?: "",
> >>
> >> I do vaguely remember someone going to efforts to remove uses of "? :
> >> foo" (with the blank true value).
> >
> > I'm not clear the sentence's meaning.
>
> Using the ternary operator "X ? Y : Z" with an empty 2nd operand
> "X ?: Y" is not standard C. It's a GCC extension. There was a
> suggestion a year or so back that we should remove the uses of
> it, but the consensus was that this was unnecessary, since in
> practice we rely on other GCC extensions. Clang also supports
> this syntax, and it's the only other compiler we care about.
>
>
Oh! Thank you, I got it.
In this case it seems reasonable, especially since the line
> immediately below this addition is using it too.
>
But,do I need to fix them to be "X ? Y : Z" and keep them consistent?
Faithfully yours
Kewei Yu
thanks
> -- PMM
>
[-- Attachment #2: Type: text/html, Size: 3562 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2014-01-01 2:29 ` Kewei Yu
@ 2014-01-01 4:39 ` Peter Crosthwaite
0 siblings, 0 replies; 16+ messages in thread
From: Peter Crosthwaite @ 2014-01-01 4:39 UTC (permalink / raw)
To: Kewei Yu
Cc: qemu-trivial, Peter Maydell, qemu-devel@nongnu.org Developers,
Stefan Hajnoczi
On Wed, Jan 1, 2014 at 12:29 PM, Kewei Yu <keweihk@gmail.com> wrote:
>
> 2014/1/1 Peter Maydell <peter.maydell@linaro.org>
>>
>> On 31 December 2013 13:29, Kewei Yu <keweihk@gmail.com> wrote:
>> > 2013/12/31 Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>> >>
>> >> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
>> >> > "%s", qemu_binary, s->socket_path,
>> >> > s->qmp_socket_path, pid_file,
>> >> > + qtest_vnc_param ?: "",
>> >>
>> >> I do vaguely remember someone going to efforts to remove uses of "? :
>> >> foo" (with the blank true value).
>> >
>> > I'm not clear the sentence's meaning.
>>
>> Using the ternary operator "X ? Y : Z" with an empty 2nd operand
>> "X ?: Y" is not standard C. It's a GCC extension. There was a
>> suggestion a year or so back that we should remove the uses of
>> it, but the consensus was that this was unnecessary, since in
>> practice we rely on other GCC extensions. Clang also supports
>> this syntax, and it's the only other compiler we care about.
>>
>
> Oh! Thank you, I got it.
>
>> In this case it seems reasonable, especially since the line
>> immediately below this addition is using it too.
>
>
> But,do I need to fix them to be "X ? Y : Z" and keep them consistent?
>
No, it's already consistent. No change to patch required. Apart from
the grammar and spelling.
Regards,
Peter
> Faithfully yours
> Kewei Yu
>
>> thanks
>> -- PMM
>
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2013-12-31 13:29 ` Kewei Yu
2014-01-01 1:47 ` Kewei Yu
2014-01-01 2:06 ` Peter Maydell
@ 2014-01-01 4:40 ` Peter Crosthwaite
2014-01-02 14:53 ` Andreas Färber
2 siblings, 1 reply; 16+ messages in thread
From: Peter Crosthwaite @ 2014-01-01 4:40 UTC (permalink / raw)
To: Kewei Yu; +Cc: qemu-trivial, qemu-devel@nongnu.org Developers, Stefan Hajnoczi
On Tue, Dec 31, 2013 at 11:29 PM, Kewei Yu <keweihk@gmail.com> wrote:
> 2013/12/31 Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>>
>> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
>> > When we disabling vnc from "./configure", the qemu can't use the vnc
>> > option.
>>
>> "disable", -"the", "QEMU",
>
> Do you mean "s/disabling/disable; s/the\ qemu/QEMU"?
Yes.
>>
>>
>> > So qtest can't use the "vnc -none ", otherwise "make check" will hang.
>> >
>>
>> Curious, why exactly does make check hang? Shouldn't it just fail with
>> an error result in this case?
>
> Yeah, there is an error result "VNC support is disabled".
I think its just terminology then. s/hangs/fails.
Happy New Year,
Peter
>>
>>
>> > Signed-off-by: Kewei Yu <keweihk@gmail.com>
>> > ---
>> > v2: Consolidate VNC macro's #ifdef'ery to one central point
>> > (tests/libqtest.c).
>> >
>> > tests/fdc-test.c | 5 +----
>> > tests/ide-test.c | 3 ---
>> > tests/libqtest.c | 8 ++++++++
>> > 3 files changed, 9 insertions(+), 7 deletions(-)
>> >
>> > diff --git a/tests/fdc-test.c b/tests/fdc-test.c
>> > index 38b5b17..37096dc 100644
>> > --- a/tests/fdc-test.c
>> > +++ b/tests/fdc-test.c
>> > @@ -518,7 +518,6 @@ static void fuzz_registers(void)
>> > int main(int argc, char **argv)
>> > {
>> > const char *arch = qtest_get_arch();
>> > - char *cmdline;
>> > int fd;
>> > int ret;
>> >
>> > @@ -538,9 +537,7 @@ int main(int argc, char **argv)
>> > /* Run the tests */
>> > g_test_init(&argc, &argv, NULL);
>> >
>> > - cmdline = g_strdup_printf("-vnc none ");
>> > -
>> > - qtest_start(cmdline);
>> > + qtest_start(NULL);
>> > qtest_irq_intercept_in(global_qtest, "ioapic");
>> > qtest_add_func("/fdc/cmos", test_cmos);
>> > qtest_add_func("/fdc/no_media_on_start", test_no_media_on_start);
>> > diff --git a/tests/ide-test.c b/tests/ide-test.c
>> > index d5cec5a..4a0d97f 100644
>> > --- a/tests/ide-test.c
>> > +++ b/tests/ide-test.c
>> > @@ -380,7 +380,6 @@ static void test_bmdma_no_busmaster(void)
>> > static void test_bmdma_setup(void)
>> > {
>> > ide_test_start(
>> > - "-vnc none "
>> > "-drive file=%s,if=ide,serial=%s,cache=writeback "
>> > "-global ide-hd.ver=%s",
>> > tmp_path, "testdisk", "version");
>> > @@ -410,7 +409,6 @@ static void test_identify(void)
>> > int ret;
>> >
>> > ide_test_start(
>> > - "-vnc none "
>> > "-drive file=%s,if=ide,serial=%s,cache=writeback "
>> > "-global ide-hd.ver=%s",
>> > tmp_path, "testdisk", "version");
>> > @@ -455,7 +453,6 @@ static void test_flush(void)
>> > uint8_t data;
>> >
>> > ide_test_start(
>> > - "-vnc none "
>> > "-drive file=blkdebug::%s,if=ide,cache=writeback",
>> > tmp_path);
>> >
>> > diff --git a/tests/libqtest.c b/tests/libqtest.c
>> > index 359d571..921391c 100644
>> > --- a/tests/libqtest.c
>> > +++ b/tests/libqtest.c
>> > @@ -35,6 +35,12 @@
>> >
>> > #define MAX_IRQ 256
>> >
>> > +#ifdef CONFIG_VNC
>> > +static const char *qtest_vnc_param = "-vnc none ";
>> > +#else
>> > +static const char *qtest_vnc_param = NULL;
>> > +#endif
>> > +
>> > QTestState *global_qtest;
>> >
>> > struct QTestState
>> > @@ -136,8 +142,10 @@ QTestState *qtest_init(const char *extra_args)
>> > "-pidfile %s "
>> > "-machine accel=qtest "
>> > "-display none "
>> > + "%s"
>> > "%s", qemu_binary, s->socket_path,
>> > s->qmp_socket_path, pid_file,
>> > + qtest_vnc_param ?: "",
>>
>> I do vaguely remember someone going to efforts to remove uses of "? :
>> foo" (with the blank true value).
>
> I'm not clear the sentence's meaning.
>>
>>
>> Regards,
>> Peter
>>
>> > extra_args ?: "");
>> > execlp("/bin/sh", "sh", "-c", command, NULL);
>> > exit(1);
>> > --
>> > 1.7.1
>> >
>> >
>
>
> Thanks
> Kewei
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2013-12-31 4:42 [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang Kewei Yu
2013-12-31 12:33 ` Peter Crosthwaite
@ 2014-01-02 8:15 ` Paolo Bonzini
2014-01-02 9:58 ` Kewei Yu
2014-01-02 14:45 ` Andreas Färber
1 sibling, 2 replies; 16+ messages in thread
From: Paolo Bonzini @ 2014-01-02 8:15 UTC (permalink / raw)
To: Kewei Yu; +Cc: qemu-trivial, qemu-devel, stefanha
Il 31/12/2013 05:42, Kewei Yu ha scritto:
> When we disabling vnc from "./configure", the qemu can't use the vnc option.
> So qtest can't use the "vnc -none ", otherwise "make check" will hang.
>
> Signed-off-by: Kewei Yu <keweihk@gmail.com>
> ---
> v2: Consolidate VNC macro's #ifdef'ery to one central point (tests/libqtest.c).
What happens if qtest instead uses "-display none"?
Paolo
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2014-01-02 8:15 ` Paolo Bonzini
@ 2014-01-02 9:58 ` Kewei Yu
2014-01-02 14:45 ` Andreas Färber
1 sibling, 0 replies; 16+ messages in thread
From: Kewei Yu @ 2014-01-02 9:58 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-trivial, qemu-devel@nongnu.org Developers, Stefan Hajnoczi
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
The fail is caused by "-vnc none", we can't use it when disable vnc from
"./configure".
Faithfully yours
Kewei Yu
2014/1/2 Paolo Bonzini <pbonzini@redhat.com>
> Il 31/12/2013 05:42, Kewei Yu ha scritto:
> > When we disabling vnc from "./configure", the qemu can't use the vnc
> option.
> > So qtest can't use the "vnc -none ", otherwise "make check" will hang.
> >
> > Signed-off-by: Kewei Yu <keweihk@gmail.com>
> > ---
> > v2: Consolidate VNC macro's #ifdef'ery to one central point
> (tests/libqtest.c).
>
> What happens if qtest instead uses "-display none"?
>
> Paolo
>
[-- Attachment #2: Type: text/html, Size: 1692 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2014-01-02 8:15 ` Paolo Bonzini
2014-01-02 9:58 ` Kewei Yu
@ 2014-01-02 14:45 ` Andreas Färber
2014-01-03 9:26 ` Paolo Bonzini
1 sibling, 1 reply; 16+ messages in thread
From: Andreas Färber @ 2014-01-02 14:45 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-trivial, Kewei Yu, qemu-devel, stefanha
Am 02.01.2014 09:15, schrieb Paolo Bonzini:
> Il 31/12/2013 05:42, Kewei Yu ha scritto:
>> When we disabling vnc from "./configure", the qemu can't use the vnc option.
>> So qtest can't use the "vnc -none ", otherwise "make check" will hang.
>>
>> Signed-off-by: Kewei Yu <keweihk@gmail.com>
>> ---
>> v2: Consolidate VNC macro's #ifdef'ery to one central point (tests/libqtest.c).
>
> What happens if qtest instead uses "-display none"?
It does use that, since the commit I pointed to in v1. :)
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2014-01-01 4:40 ` Peter Crosthwaite
@ 2014-01-02 14:53 ` Andreas Färber
2014-01-03 3:01 ` Kewei Yu
0 siblings, 1 reply; 16+ messages in thread
From: Andreas Färber @ 2014-01-02 14:53 UTC (permalink / raw)
To: Peter Crosthwaite, Kewei Yu
Cc: qemu-trivial, qemu-devel@nongnu.org Developers, Stefan Hajnoczi
Am 01.01.2014 05:40, schrieb Peter Crosthwaite:
> On Tue, Dec 31, 2013 at 11:29 PM, Kewei Yu <keweihk@gmail.com> wrote:
>> 2013/12/31 Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>>> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
>>>> When we disabling vnc from "./configure", the qemu can't use the vnc
>>>> option.
[...]
>>>> So qtest can't use the "vnc -none ", otherwise "make check" will hang.
>>>
>>> Curious, why exactly does make check hang? Shouldn't it just fail with
>>> an error result in this case?
>>
>> Yeah, there is an error result "VNC support is disabled".
>
> I think its just terminology then. s/hangs/fails.
Actually no. When qtest gets an unsupported command line argument, so
that QEMU exits right away, then qtest hangs, waiting for the process.
This was easily reproducible by mistyping machine names in my qom-test.
That's a separate issue though.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2014-01-02 14:53 ` Andreas Färber
@ 2014-01-03 3:01 ` Kewei Yu
2014-01-03 3:04 ` Peter Crosthwaite
0 siblings, 1 reply; 16+ messages in thread
From: Kewei Yu @ 2014-01-03 3:01 UTC (permalink / raw)
To: Andreas Färber
Cc: qemu-trivial, Peter Crosthwaite, qemu-devel@nongnu.org Developers,
Stefan Hajnoczi
[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]
2014/1/2 Andreas Färber <afaerber@suse.de>
> Am 01.01.2014 05:40, schrieb Peter Crosthwaite:
> > On Tue, Dec 31, 2013 at 11:29 PM, Kewei Yu <keweihk@gmail.com> wrote:
> >> 2013/12/31 Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> >>> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
> >>>> When we disabling vnc from "./configure", the qemu can't use the vnc
> >>>> option.
> [...]
> >>>> So qtest can't use the "vnc -none ", otherwise "make check" will hang.
> >>>
> >>> Curious, why exactly does make check hang? Shouldn't it just fail with
> >>> an error result in this case?
> >>
> >> Yeah, there is an error result "VNC support is disabled".
> >
> > I think its just terminology then. s/hangs/fails.
>
> Actually no. When qtest gets an unsupported command line argument, so
> that QEMU exits right away, then qtest hangs, waiting for the process.
> This was easily reproducible by mistyping machine names in my qom-test.
> That's a separate issue though.
>
Yeah, It actually waits for the a handler and doesn't exit from "make
check".
Maybe I didn't show a detailed description.
So, Should I submit the patch v4?
>
> Regards,
> Andreas
>
> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
>
[-- Attachment #2: Type: text/html, Size: 2253 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2014-01-03 3:01 ` Kewei Yu
@ 2014-01-03 3:04 ` Peter Crosthwaite
0 siblings, 0 replies; 16+ messages in thread
From: Peter Crosthwaite @ 2014-01-03 3:04 UTC (permalink / raw)
To: Kewei Yu
Cc: qemu-trivial, Andreas Färber, Stefan Hajnoczi,
qemu-devel@nongnu.org Developers
On Fri, Jan 3, 2014 at 1:01 PM, Kewei Yu <keweihk@gmail.com> wrote:
>
> 2014/1/2 Andreas Färber <afaerber@suse.de>
>>
>> Am 01.01.2014 05:40, schrieb Peter Crosthwaite:
>> > On Tue, Dec 31, 2013 at 11:29 PM, Kewei Yu <keweihk@gmail.com> wrote:
>> >> 2013/12/31 Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>> >>> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
>> >>>> When we disabling vnc from "./configure", the qemu can't use the vnc
>> >>>> option.
>> [...]
>> >>>> So qtest can't use the "vnc -none ", otherwise "make check" will
>> >>>> hang.
>> >>>
>> >>> Curious, why exactly does make check hang? Shouldn't it just fail with
>> >>> an error result in this case?
>> >>
>> >> Yeah, there is an error result "VNC support is disabled".
>> >
>> > I think its just terminology then. s/hangs/fails.
>>
>> Actually no. When qtest gets an unsupported command line argument, so
>> that QEMU exits right away, then qtest hangs, waiting for the process.
>> This was easily reproducible by mistyping machine names in my qom-test.
>> That's a separate issue though.
>
> Yeah, It actually waits for the a handler and doesn't exit from "make
> check".
> Maybe I didn't show a detailed description.
> So, Should I submit the patch v4?
Probably not just for this. "fails" is fine.
Regards,
Peter
>>
>>
>> Regards,
>> Andreas
>>
>> --
>> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
>> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2014-01-02 14:45 ` Andreas Färber
@ 2014-01-03 9:26 ` Paolo Bonzini
2014-01-06 4:29 ` Kewei Yu
0 siblings, 1 reply; 16+ messages in thread
From: Paolo Bonzini @ 2014-01-03 9:26 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-trivial, Kewei Yu, qemu-devel, stefanha
Il 02/01/2014 15:45, Andreas Färber ha scritto:
>>> >> v2: Consolidate VNC macro's #ifdef'ery to one central point (tests/libqtest.c).
>> >
>> > What happens if qtest instead uses "-display none"?
> It does use that, since the commit I pointed to in v1. :)
And why do you need at all "-vnc none" if it also uses "-display none"?
Paolo
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
2014-01-03 9:26 ` Paolo Bonzini
@ 2014-01-06 4:29 ` Kewei Yu
0 siblings, 0 replies; 16+ messages in thread
From: Kewei Yu @ 2014-01-06 4:29 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-trivial, Andreas Färber, Stefan Hajnoczi,
qemu-devel@nongnu.org Developers
[-- Attachment #1: Type: text/plain, Size: 566 bytes --]
2014/1/3 Paolo Bonzini <pbonzini@redhat.com>
> Il 02/01/2014 15:45, Andreas Färber ha scritto:
> >>> >> v2: Consolidate VNC macro's #ifdef'ery to one central point
> (tests/libqtest.c).
> >> >
> >> > What happens if qtest instead uses "-display none"?
> > It does use that, since the commit I pointed to in v1. :)
>
> And why do you need at all "-vnc none" if it also uses "-display none"?
Yeah, if "-display none", the vnc_display will be NULL in vl.c:4313, So the
vnc is not initialized.
So, the "-vnc none" is excrescent.
>
> Paolo
>
Kewei
[-- Attachment #2: Type: text/html, Size: 1291 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2014-01-06 4:29 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-31 4:42 [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang Kewei Yu
2013-12-31 12:33 ` Peter Crosthwaite
2013-12-31 13:29 ` Kewei Yu
2014-01-01 1:47 ` Kewei Yu
2014-01-01 2:06 ` Peter Maydell
2014-01-01 2:29 ` Kewei Yu
2014-01-01 4:39 ` Peter Crosthwaite
2014-01-01 4:40 ` Peter Crosthwaite
2014-01-02 14:53 ` Andreas Färber
2014-01-03 3:01 ` Kewei Yu
2014-01-03 3:04 ` Peter Crosthwaite
2014-01-02 8:15 ` Paolo Bonzini
2014-01-02 9:58 ` Kewei Yu
2014-01-02 14:45 ` Andreas Färber
2014-01-03 9:26 ` Paolo Bonzini
2014-01-06 4:29 ` Kewei Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).