Skip to content

core: Add a macro to test header serialization

Davide Magrin came up with the following approach to test the implementation of new headers (including wifi Information Elements):

  • serialize the header into a buffer;
  • create a new header by deserializing from the buffer;
  • serialize the new header into a new buffer;
  • compare the two buffers (should be identical)

I applied this approach in a few cases already and it helped me to detect some issues in the serialization/deserialization of headers. I thought this could be made available for all headers and hence this MR adds a new macro to test.h to implement the approach described above.

Merge request reports