camerad: fixup EOF check in stress test (#35717)

Co-authored-by: Comma Device <device@comma.ai>
pull/35719/head
Adeeb Shihadeh 1 day ago committed by GitHub
parent 0aaefdee37
commit 8142dba137
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      system/camerad/test/test_camerad.py

@ -84,7 +84,10 @@ class TestCamerad:
# logMonoTime > SOF
assert np.all((ts[c]['t'] - ts[c]['timestampSof']/1e9) > 1e-7)
assert np.all((ts[c]['t'] - ts[c]['timestampEof']/1e9) > 1e-7)
# logMonoTime > EOF, needs some tolerance since EOF is (SOF + readout time) but there is noise in the SOF timestamping (done via IRQ)
assert np.mean((ts[c]['t'] - ts[c]['timestampEof']/1e9) > 1e-7) > 0.7 # should be mostly logMonoTime > EOF
assert np.all((ts[c]['t'] - ts[c]['timestampEof']/1e9) > -0.10) # when EOF > logMonoTime, it should never be more than two frames
def test_stress_test(self):
os.environ['SPECTRA_ERROR_PROB'] = '0.008'

Loading…
Cancel
Save