On 2026-10-17T18:46:22, Hung-Chun Tseng <[email protected]> wrote: > test: dm: Add tests for the virtio RTC driver > > Add a virtio RTC device to the sandbox test device tree and emulate it > through the sandbox virtio transport. The emulated device answers the > VIRTIO_RTC_REQ_CFG, VIRTIO_RTC_REQ_CLOCK_CAP and VIRTIO_RTC_REQ_READ > requests from a configurable list of clocks. > > The tests check that the driver: > - does not use the virtqueue in probe() > - reads the time from the first UTC clock and looks it up only once > - remembers that there is no UTC clock and does not ask again > - reports a failed request and looks for the clock again next time > - gives up with -ETIMEDOUT when the device does not answer > > Signed-off-by: Hung-Chun Tseng <[email protected]> > > MAINTAINERS | 1 + > arch/sandbox/dts/test.dts | 5 + > test/dm/Makefile | 1 + > test/dm/virtio_rtc.c | 306 > ++++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 313 insertions(+)
Reviewed-by: Simon Glass <[email protected]>
