[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v16 04/16] hw/ptimer: Suppress error messages under qt
From: |
Dmitry Osipenko |
Subject: |
[Qemu-arm] [PATCH v16 04/16] hw/ptimer: Suppress error messages under qtest |
Date: |
Wed, 7 Sep 2016 16:22:15 +0300 |
Under qtest ptimer emits lots of warning messages. The messages are caused
by the actual checking of the ptimer error conditions. Suppress those
messages, so they do not distract.
Signed-off-by: Dmitry Osipenko <address@hidden>
---
hw/core/ptimer.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 00fdf15..c45c835 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -11,6 +11,7 @@
#include "hw/ptimer.h"
#include "qemu/host-utils.h"
#include "sysemu/replay.h"
+#include "sysemu/qtest.h"
struct ptimer_state
{
@@ -44,7 +45,9 @@ static void ptimer_reload(ptimer_state *s)
s->delta = s->limit;
}
if (s->delta == 0 || s->period == 0) {
- fprintf(stderr, "Timer with period zero, disabling\n");
+ if (!qtest_enabled()) {
+ fprintf(stderr, "Timer with period zero, disabling\n");
+ }
timer_del(s->timer);
s->enabled = 0;
return;
@@ -163,7 +166,9 @@ void ptimer_run(ptimer_state *s, int oneshot)
bool was_disabled = !s->enabled;
if (was_disabled && s->period == 0) {
- fprintf(stderr, "Timer with period zero, disabling\n");
+ if (!qtest_enabled()) {
+ fprintf(stderr, "Timer with period zero, disabling\n");
+ }
return;
}
s->enabled = oneshot ? 2 : 1;
--
2.9.3
- [Qemu-arm] [PATCH v16 00/16] PTimer fixes/features and ARM MPTimer conversion, Dmitry Osipenko, 2016/09/07
- [Qemu-arm] [PATCH v16 01/16] hw/ptimer: Actually stop the timer in case of error, Dmitry Osipenko, 2016/09/07
- [Qemu-arm] [PATCH v16 08/16] tests: ptimer: Add tests for "continuous trigger" policy, Dmitry Osipenko, 2016/09/07
- [Qemu-arm] [PATCH v16 05/16] hw/ptimer: Add "wraparound after one period" policy, Dmitry Osipenko, 2016/09/07
- [Qemu-arm] [PATCH v16 02/16] hw/ptimer: Introduce timer policy feature, Dmitry Osipenko, 2016/09/07
- [Qemu-arm] [PATCH v16 04/16] hw/ptimer: Suppress error messages under qtest,
Dmitry Osipenko <=
- [Qemu-arm] [PATCH v16 10/16] tests: ptimer: Add tests for "no immediate trigger" policy, Dmitry Osipenko, 2016/09/07
- [Qemu-arm] [PATCH v16 07/16] hw/ptimer: Add "continuous trigger" policy, Dmitry Osipenko, 2016/09/07
- [Qemu-arm] [PATCH v16 12/16] tests: ptimer: Add tests for "no immediate reload" policy, Dmitry Osipenko, 2016/09/07
- [Qemu-arm] [PATCH v16 06/16] tests: ptimer: Add tests for "wraparound after one period" policy, Dmitry Osipenko, 2016/09/07
- [Qemu-arm] [PATCH v16 13/16] hw/ptimer: Add "no counter round down" policy, Dmitry Osipenko, 2016/09/07
- [Qemu-arm] [PATCH v16 03/16] tests: Add ptimer tests, Dmitry Osipenko, 2016/09/07