Namespace test_buffer_limits

Namespace List > test_buffer_limits

Public Functions

Type Name
test_receive_truncates_payload ()
Verify receive truncates payload to buffer size.
test_send_in_progress_returns_code ()
Verify in-progress is reported on concurrent send.
test_send_overflow_returns_code ()
Verify overflow is reported on send.

Protected Functions

Type Name
_make_payload (size size)
Build a deterministic payload of a given size.
_poll_until_receive (link link, payload_size payload_size, steps steps)
Poll the link until a response is received or steps are exhausted.

Public Functions Documentation

function test_receive_truncates_payload

Verify receive truncates payload to buffer size.

test_buffer_limits::test_receive_truncates_payload () 

The returned payload must be capped to the buffer length.


function test_send_in_progress_returns_code

Verify in-progress is reported on concurrent send.

test_buffer_limits::test_send_in_progress_returns_code () 

Second send while active returns ISOTP_RET_INPROGRESS.


function test_send_overflow_returns_code

Verify overflow is reported on send.

test_buffer_limits::test_send_overflow_returns_code () 

Exceeding the send buffer returns ISOTP_RET_OVERFLOW.


Protected Functions Documentation

function _make_payload

Build a deterministic payload of a given size.

test_buffer_limits::_make_payload (
    size size
) 

Parameters:

  • size Number of bytes to generate.

Returns:

Payload bytes.

Uses a simple modulo pattern for repeatability.


function _poll_until_receive

Poll the link until a response is received or steps are exhausted.

test_buffer_limits::_poll_until_receive (
    link link,
    payload_size payload_size,
    steps steps
) 

Parameters:

  • link ISO-TP link handle.
  • payload_size Expected payload size for receive.
  • steps Maximum number of poll iterations.

Returns:

Received payload bytes or None when nothing is received.

Polls the core without advancing time.



The documentation for this class was generated from the following file tests/integration/test_buffer_limits.py