* [Qemu-devel] [PATCH] qtest: don't report signals if qtest driver enabled
@ 2014-02-04 18:06 Michael S. Tsirkin
2014-02-05 15:05 ` Andreas Färber
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2014-02-04 18:06 UTC (permalink / raw)
To: qemu-devel; +Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?=, Anthony Liguori
qtest driver always uses signals to kill qemu
no need to report it, whatever the accelerator state.
Add API to detect qtest driver, and suppress reporting
signals in this case.
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/sysemu/qtest.h | 2 ++
qtest.c | 5 +++++
vl.c | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h
index 112a661..6aca8e4 100644
--- a/include/sysemu/qtest.h
+++ b/include/sysemu/qtest.h
@@ -23,6 +23,8 @@ static inline bool qtest_enabled(void)
return qtest_allowed;
}
+bool qtest_driver(void);
+
int qtest_init_accel(void);
void qtest_init(const char *qtest_chrdev, const char *qtest_log);
diff --git a/qtest.c b/qtest.c
index dcf1301..a738afc 100644
--- a/qtest.c
+++ b/qtest.c
@@ -528,3 +528,8 @@ void qtest_init(const char *qtest_chrdev, const char *qtest_log)
qtest_chr = chr;
}
+
+bool qtest_driver(void)
+{
+ return qtest_chr;
+}
diff --git a/vl.c b/vl.c
index 60dbbcb..dddbbce 100644
--- a/vl.c
+++ b/vl.c
@@ -1748,7 +1748,7 @@ static int qemu_shutdown_requested(void)
static void qemu_kill_report(void)
{
- if (!qtest_enabled() && shutdown_signal != -1) {
+ if (!qtest_driver() && shutdown_signal != -1) {
fprintf(stderr, "qemu: terminating on signal %d", shutdown_signal);
if (shutdown_pid == 0) {
/* This happens for eg ^C at the terminal, so it's worth
--
MST
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qtest: don't report signals if qtest driver enabled
2014-02-04 18:06 [Qemu-devel] [PATCH] qtest: don't report signals if qtest driver enabled Michael S. Tsirkin
@ 2014-02-05 15:05 ` Andreas Färber
2014-02-05 15:15 ` Michael S. Tsirkin
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2014-02-05 15:05 UTC (permalink / raw)
To: Michael S. Tsirkin, qemu-devel; +Cc: Peter Maydell, Anthony Liguori
Am 04.02.2014 19:06, schrieb Michael S. Tsirkin:
> qtest driver always uses signals to kill qemu
> no need to report it, whatever the accelerator state.
>
> Add API to detect qtest driver, and suppress reporting
> signals in this case.
>
> Reported-by: Andreas Färber <afaerber@suse.de>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Andreas Färber <afaerber@suse.de>
We could do some bikeshedding about better names for qtest_driver(), but
I'm happy to learn that it was just noise and not a real issue.
I'll queue a copy for my qom-test work, but through whose queue should
this best go? PMM directly?
Thanks,
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] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qtest: don't report signals if qtest driver enabled
2014-02-05 15:05 ` Andreas Färber
@ 2014-02-05 15:15 ` Michael S. Tsirkin
0 siblings, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2014-02-05 15:15 UTC (permalink / raw)
To: Andreas Färber; +Cc: Peter Maydell, qemu-devel, Anthony Liguori
On Wed, Feb 05, 2014 at 04:05:55PM +0100, Andreas Färber wrote:
> Am 04.02.2014 19:06, schrieb Michael S. Tsirkin:
> > qtest driver always uses signals to kill qemu
> > no need to report it, whatever the accelerator state.
> >
> > Add API to detect qtest driver, and suppress reporting
> > signals in this case.
> >
> > Reported-by: Andreas Färber <afaerber@suse.de>
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> Tested-by: Andreas Färber <afaerber@suse.de>
>
> We could do some bikeshedding about better names for qtest_driver(), but
> I'm happy to learn that it was just noise and not a real issue.
>
> I'll queue a copy for my qom-test work, but through whose queue should
> this best go? PMM directly?
>
> Thanks,
> Andreas
It affects acpi tests so for now I have it on my queue.
> --
> 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] 3+ messages in thread
end of thread, other threads:[~2014-02-05 15:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 18:06 [Qemu-devel] [PATCH] qtest: don't report signals if qtest driver enabled Michael S. Tsirkin
2014-02-05 15:05 ` Andreas Färber
2014-02-05 15:15 ` Michael S. Tsirkin
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).