+Igor
On 9/25/21 16:50, Philippe Mathieu-Daudé wrote:
Implement QTest has_work() handler in AccelOpsClass.
Since no CPU are available under QTest accelerator,
this function is not reachable.
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
---
accel/qtest/qtest.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c
index 7e6b8110d52..903c39ec1bf 100644
--- a/accel/qtest/qtest.c
+++ b/accel/qtest/qtest.c
@@ -47,12 +47,18 @@ static const TypeInfo qtest_accel_type = {
};
module_obj(TYPE_QTEST_ACCEL);
+static bool qtest_cpu_has_work(CPUState *cpu)
+{
+ g_assert_not_reached();
+}
Sigh, this triggers:
Running test qtest-i386/cpu-plug-test
**
ERROR:../accel/qtest/qtest.c:52:qtest_cpu_has_work: code should not be
reached
ERROR qtest-i386/cpu-plug-test - Bail out!
ERROR:../accel/qtest/qtest.c:52:qtest_cpu_has_work: code should not be
reached
Broken pipe
I understand we want to test CPU hotplug, however I'm not sure what
part of the accelerator can be tested, QTest is almost empty stubs.
I suppose it is in my interest to 'return false' here and call it
a day...
static void qtest_accel_ops_class_init(ObjectClass *oc, void *data)
{
AccelOpsClass *ops = ACCEL_OPS_CLASS(oc);
ops->create_vcpu_thread = dummy_start_vcpu_thread;
ops->get_virtual_clock = qtest_get_virtual_clock;
+ ops->has_work = qtest_cpu_has_work;
};
static const TypeInfo qtest_accel_ops_type = {