Commit a108596a authored by Federico Vaga's avatar Federico Vaga

tst: add regression test for 4Byte corruption

Problem: sometimes a 4Byte transfers corrupt the gennum chip
Signed-off-by: Federico Vaga's avatarFederico Vaga <>
parent 6d9fec0e
......@@ -206,3 +206,20 @@ class TestDma(object):
dma.write(0, data)
for i in range(1000000):
assert data ==, len(data))
def test_dma_reg_word(self, spec):
Regression test.
It happend that a 4Bytes transfer was triggering a DMA error
and in some cases it was irremediably corrupting the gennum chip
data = b"\x01\x23\x45\x67\x89\xab\xcd\xef"
with spec.dma() as dma:
dma.write(0, data)
for i in range(1000000):
data_rb =, 4)
except OSError as error:
assert data ==, 8)
assert data[0:4] == data_rb
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment