Page MenuHomeFreeBSD

pf tests: Improve assertion messaging of mbuf tests
ClosedPublic

Authored by igoro on Aug 3 2025, 2:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 30, 1:11 PM
Unknown Object (File)
Sat, Sep 26, 11:07 AM
Unknown Object (File)
Sat, Sep 26, 7:42 AM
Unknown Object (File)
Sun, Sep 20, 9:56 AM
Unknown Object (File)
Fri, Sep 18, 1:40 PM
Unknown Object (File)
Fri, Sep 11, 1:17 AM
Unknown Object (File)
Thu, Sep 10, 8:40 PM
Unknown Object (File)
Tue, Sep 8, 3:39 AM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

igoro requested review of this revision.Aug 3 2025, 2:38 PM

A minuscule improvement to get the following upon atf_check_equal failure:

Error Message:
1 != $(jexec alcatraz sysctl -n net.dummymbuf.hits) (1 != 2)

instead of this:

Error Message:
1 != 2 (1 != 2)

It's still non-ideal for these specific test cases, but reveals a best practice if any copy-pasting is needed in the future.

Wanted to do it like a year ago. I'm thinking to improve the atf manual page to make it clear (if possible), right now it presents it with double quotes which might end up being used such way. But if we check the code behind then it's obvious that shell expansion was intended to be left for later.

This revision is now accepted and ready to land.Aug 4 2025, 6:30 AM