Change in libosmocore[master]: msgb: add test helpers

Pau Espin Pedrol gerrit-no-reply at
Fri Nov 30 16:49:34 UTC 2018

Pau Espin Pedrol has posted comments on this change. ( )

Change subject: msgb: add test helpers

Patch Set 3: Code-Review-1

File include/osmocom/core/msgb.h:
PS3, Line 133: /*! obtain L4 header of msgb */
All these l4 functions belong to another patch imho.
Are they going to be used by someone in follow up patches?
PS3, Line 612: /* msgb test/debug helpers */
IMHO having all these is too much cruft. Let's keep the print parameter in the macro and remove all _print ones, I think it's fine enough.
PS3, Line 709: bool msgb_cmpr_l3(const char *f, size_t l, const struct msgb *msg, const uint8_t *data, size_t len, bool print);
This should not be there anymore.
File src/msgb.c:
PS3, Line 211: 		m_dump = msgb_hexdump(msg);
Since this function can be quite heavy, let's do:
m_dump = print ? msgb_hexdump(msg) : NULL;
PS3, Line 252: 	printf("%s:%zu %s() L%u data mismatch:\nexpected %s\n         ",
extra whitespace here right?

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3bc95f2f5ab6e3f4b502647fb3e0aaaf1f7c4cf5
Gerrit-Change-Number: 12017
Gerrit-PatchSet: 3
Gerrit-Owner: Max <msuraev at>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at>
Gerrit-Comment-Date: Fri, 30 Nov 2018 16:49:34 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list