Created attachment 248986 [details] Fix compilation of some tools/test programs The attached patch fixes compilation of tools/test/bsnmp, tools/test/malloc, and tools/test/net on recent versions of FreeBSD. Most of the changes pacify the compiler. The malloc test calls sbrk() which does not exist on arm64 and does not provide any useful information on amd64. I made sbrk() a weak symbol.
Thanks for submission, John! Do you have any possibility to convert the tests to the atf(7) framework, so they can be moved into the standard tests/ subdirectory, that is in the root of FreeBSD sources? If this is done, the tests will be constantly built as part of buildworld as well as the project CI will routinely run the tests and report any regressions. That will make them way more valuable than tests that are just stored in the sources.
After struggling with converting tools/test/bsnmp into a proper test I decided it was a job for somebody who understands and enjoys using share/Mk.
Hartmut, can you please take a look if we can connect the bnsmp tests into our standard CI? Feel free to put the bug back to the pool if you don't have time. However, any insight from you on the topic will be valuable - please share.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=bc7afab6a1fa4294df0b8d7d461bd0bdc542fbfe commit bc7afab6a1fa4294df0b8d7d461bd0bdc542fbfe Author: Hartmut Brandt <harti@FreeBSD.org> AuthorDate: 2024-10-14 08:16:03 +0000 Commit: Hartmut Brandt <harti@FreeBSD.org> CommitDate: 2024-10-14 08:23:18 +0000 Fix compilation of bsnmp tests. PR: 277539 Submitted by: John F. Carr tools/test/bsnmp/Makefile | 1 + 1 file changed, 1 insertion(+)
I have added the compilation fix for the bsnmp tests but don't know how integrated the tests with atf short of duplicating them and use the atf-c++ stuff instead of the catch2 macros. These tests reside in the contrib/bsnmp directory and are not local.