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
F132453003: D51716.diff
Fri, Oct 17, 1:48 AM
Unknown Object (File)
Sat, Oct 11, 3:15 PM
Unknown Object (File)
Sat, Oct 11, 3:14 PM
Unknown Object (File)
Sat, Oct 11, 3:14 PM
Unknown Object (File)
Sat, Oct 11, 6:46 AM
Unknown Object (File)
Mon, Sep 22, 3:22 PM
Unknown Object (File)
Sun, Sep 21, 3:37 PM
Unknown Object (File)
Sep 17 2025, 2:41 PM

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