qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] test/qtest: Add API functions to capture IRQ toggling


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2] test/qtest: Add API functions to capture IRQ toggling
Date: Mon, 26 Feb 2024 19:06:06 +0100
User-agent: Mozilla Thunderbird

On 14/11/23 00:01, Gustavo Romero wrote:
Currently, the QTest API does not provide a function to capture when an
IRQ line is raised or lowered, although the QTest Protocol already
reports such IRQ transitions. As a consequence, it is also not possible
to capture when an IRQ line is toggled. Functions like qtest_get_irq()
only read the current state of the intercepted IRQ lines, which is
already high (or low) when the function is called if the IRQ line is
toggled. Therefore, these functions miss the IRQ line state transitions.

This commit introduces two new API functions:
qtest_get_irq_raised_counter() and qtest_get_irq_lowered_counter().
These functions allow capturing the number of times an observed IRQ line
transitioned from low to high state or from high to low state,
respectively.

When used together, these new API functions then allow checking if one
or more pulses were generated (indicating if the IRQ line was toggled).

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
---
  tests/qtest/libqtest.c | 24 ++++++++++++++++++++++++
  tests/qtest/libqtest.h | 28 ++++++++++++++++++++++++++++
  2 files changed, 52 insertions(+)

Sorry I totally forgot this patch :/

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

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