Skip to content

Add test cases for new CONTENT_INVALID linktype #79

@salcock

Description

@salcock

Libtrace will now attempt to recognise that a packet may point to memory that is no longer valid, as its parent trace has been restarted since the packet was read.

Some ideas for test cases that we should add to the test suite:

  • check that all packets read in a scenario where a trace is never restarted do not have a link type of CONTENT_INVALID.
  • check that CONTENT_INVALID is returned by trace_get_link_type for packets after the trace is restarted.
  • check that NULL is returned by trace_get_packet_buffer (and other layer access functions) after the trace is restarted.
  • check that capture length, wire length, timestamp, etc. access functions return appropriate error codes after the trace is restarted.
  • check that any packets read after restarting are not marked as CONTENT_INVALID.
  • check that CONTENT_INVALID then applies to the second batch of packets read following a second restart.

Feel free to add more test ideas to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    core librarySpecific to the core libtrace library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions