forked from M-Labs/artiq
1
0
Fork 0

firmware: don't truncate queued RPCs (fixes #985).

This commit is contained in:
whitequark 2018-04-21 19:38:40 +00:00
parent 58967f14fd
commit 873324d52b
2 changed files with 30 additions and 1 deletions

View File

@ -522,7 +522,7 @@ fn process_kern_queued_rpc(stream: &mut TcpStream,
let length = NetworkEndian::read_u32(slice) as usize;
host_write(stream, host::Reply::RpcRequest { async: true })?;
debug!("{:?}", &slice[4..][..length]);
stream.write(&slice[4..][..length])?;
stream.write_all(&slice[4..][..length])?;
Ok(())
})
}

View File

@ -0,0 +1,29 @@
import os
import time
import unittest
from artiq.experiment import *
from artiq.test.hardware_testbench import ExperimentCase
artiq_low_latency = os.getenv("ARTIQ_LOW_LATENCY")
class _Stress(EnvExperiment):
def build(self):
self.setattr_device("core")
@rpc(flags={"async"})
def sink(self, data):
pass
@kernel
def async_rpc(self, n):
for _ in range(n):
self.sink(b"")
class StressTest(ExperimentCase):
def test_async_rpc(self):
exp = self.create(_Stress)
exp.async_rpc(16000)