Testing that your entropy source is good sounds harder still.
reallocarray() should be pretty easy to test though.
But how many potential issues will your tests miss? If we had perfect test coverage for everything (and the tests were perfect, or we had test for them...), all software would be 100% bug-free.
Tests might not hurt, but I am not sure trying to cater for braindead porters is a good idea. They might get the idea they're doing it right once they get the tests to pass one way or another...
Reasonably descriptive commentary on the mentioned functions is there in the man pages. That is where porters should look.