sockstat: Fix build reproducibilityBoth usr.bin/sockstat and usr.bin/sockstat/tests build the filesrc/usr.bin/sockstat/sockstat.c. Unfortunately, they place theresulting object file in the same
sockstat: Fix build reproducibilityBoth usr.bin/sockstat and usr.bin/sockstat/tests build the filesrc/usr.bin/sockstat/sockstat.c. Unfortunately, they place theresulting object file in the same place, but produce differentfiles due to paths appearing in the .debug files; this resultsin different binaries depending on how the race between the twobuilds ends.Use .PATH to tell make to find sockstat.c in the parent directorybut place the object file in the current object directory, ratherthan placing '..' into the name of the source file.Suggested by: bdrewery, emaste, jrtc27MFC after: 5 minutes (15.0 build fix)Sponsored by: https://www.patreon.com/cpercivaDifferential Revision: https://reviews.freebsd.org/D53032
show more ...
sockstat: fix port parsing after libxo integrationparse_ports has been broken ever since 7b35b4d, and it's a sufficientlycomplicated function that it really deserves some unit tests. Fix it,and a
sockstat: fix port parsing after libxo integrationparse_ports has been broken ever since 7b35b4d, and it's a sufficientlycomplicated function that it really deserves some unit tests. Fix it,and add tests. Refactor the code a little bit to facilitate unit tests.Chiefly, split the tested functions out of main.c into sockstat.c .PR: 288731Fixes: 7b35b4d ("sockstat: add libxo support")Sponsored by: ConnectWisePR: https://github.com/freebsd/freebsd-src/pull/1807Reviewed by: rido