qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH] tests/plugins: add a new vcpu state tracking plugin


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH] tests/plugins: add a new vcpu state tracking plugin
Date: Fri, 11 Nov 2022 11:22:43 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 8/11/22 17:49, Alex Bennée wrote:
Although we call qemu_plugin_register_vcpu_idle_cb() in the bb test we
don't really exercise the rest of the state change callbacks. Add a
new test that tests the whole API.

[AJB: I wrote this in an attempt to flush out a reproducer for #1195
although so far now joy.]

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Idan Horowitz <idan.horowitz@gmail.com>
---
  tests/plugin/vcpu.c      | 140 +++++++++++++++++++++++++++++++++++++++
  tests/plugin/meson.build |   2 +-
  2 files changed, 141 insertions(+), 1 deletion(-)
  create mode 100644 tests/plugin/vcpu.c


+static uint64_t get_timestamp(void) {

Checkpatch complains atbout this bracket ^ position ;)

+    struct timespec ts;
+    clock_gettime(CLOCK_MONOTONIC, &ts);
+    return ts.tv_sec * 1000000000LL + ts.tv_nsec;
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]