From f3f83174b15e69e47e4167c1cc53066fe11dd5e4 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 31 Oct 2017 00:10:13 +0800 Subject: [PATCH] test: check that DMA can underflow --- artiq/test/coredevice/test_rtio.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/artiq/test/coredevice/test_rtio.py b/artiq/test/coredevice/test_rtio.py index c968bb37e..13517084a 100644 --- a/artiq/test/coredevice/test_rtio.py +++ b/artiq/test/coredevice/test_rtio.py @@ -634,6 +634,12 @@ class DMATest(ExperimentCase): print("dt={}, dt/count={}".format(dt, dt/count)) self.assertLess(dt/count, 4.5*us) + def test_dma_underflow(self): + exp = self.create(_DMA) + exp.record() + with self.assertRaises(RTIOUnderflow): + exp.playback_many(20000) + def test_handle_invalidation(self): exp = self.create(_DMA) for mode in [0, 1]: