[PATCH v2 0/6] Add nRF51 DETECT signal with test

Chris Laplante posted 6 patches 9 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230726030450.757462-1-chris@laplante.io
Maintainers: Joel Stanley <joel@jms.id.au>, Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
hw/gpio/nrf51_gpio.c         | 14 ++++++++-
include/hw/gpio/nrf51_gpio.h |  1 +
softmmu/qtest.c              | 56 ++++++++++++++++++++++++++----------
tests/qtest/libqtest.c       |  6 ++++
tests/qtest/libqtest.h       | 11 +++++++
tests/qtest/microbit-test.c  | 42 +++++++++++++++++++++++++++
6 files changed, 114 insertions(+), 16 deletions(-)
[PATCH v2 0/6] Add nRF51 DETECT signal with test
Posted by Chris Laplante 9 months, 3 weeks ago
This patch series implements the nRF51 DETECT signal
in the GPIO peripheral. A qtest is added exercising the signal.

To implement the test, named out-GPIO IRQ interception had to be added
to the qtest framework. I also took the opportunity to improve IRQ
interception a bit by adding 'FAIL' responses when interception fails.
Otherwise, it is frustrating to troubleshoot why calls to
qtest_irq_intercept_out and friends appears to do nothing.

v1: https://patchwork.kernel.org/project/qemu-devel/list/?series=766078

Testing
=======
Passes 'make check'

Changelog
=========
v2: factor out qtest_install_gpio_out_intercept before usage (Peter)
    renamed qtest_install_gpio_out_intercepts => qtest_install_gpio_out_intercept
    don't pass DETECT to soc level (Peter)
    change qtest to use DETECT at GPIO level (Peter)


Chris Laplante (6):
  hw/gpio/nrf51: implement DETECT signal
  qtest: factor out qtest_install_gpio_out_intercept
  qtest: implement named interception of out-GPIO
  qtest: bail from irq_intercept_in if name is specified
  qtest: irq_intercept_[out/in]: return FAIL if no intercepts are
    installed
  qtest: microbit-test: add tests for nRF51 DETECT

 hw/gpio/nrf51_gpio.c         | 14 ++++++++-
 include/hw/gpio/nrf51_gpio.h |  1 +
 softmmu/qtest.c              | 56 ++++++++++++++++++++++++++----------
 tests/qtest/libqtest.c       |  6 ++++
 tests/qtest/libqtest.h       | 11 +++++++
 tests/qtest/microbit-test.c  | 42 +++++++++++++++++++++++++++
 6 files changed, 114 insertions(+), 16 deletions(-)

--
2.41.0
Re: [PATCH v2 0/6] Add nRF51 DETECT signal with test
Posted by Peter Maydell 9 months, 3 weeks ago
On Wed, 26 Jul 2023 at 04:32, Chris Laplante <chris@laplante.io> wrote:
>
> This patch series implements the nRF51 DETECT signal
> in the GPIO peripheral. A qtest is added exercising the signal.
>
> To implement the test, named out-GPIO IRQ interception had to be added
> to the qtest framework. I also took the opportunity to improve IRQ
> interception a bit by adding 'FAIL' responses when interception fails.
> Otherwise, it is frustrating to troubleshoot why calls to
> qtest_irq_intercept_out and friends appears to do nothing.
>
> v1: https://patchwork.kernel.org/project/qemu-devel/list/?series=766078
>
> Testing
> =======
> Passes 'make check'

There was a trivial typo in patch 2, and I think patch 3
needs some (not very big) changes to handle named GPIOs
where there's more than 1 GPIO in the array, but other
than that this is looking good.

thanks
-- PMM