Yo Ian! On Tue, 23 Apr 2019 19:26:17 -0500 Ian Bruene via devel <devel@ntpsec.org> wrote:
> In trying to write tests for nts_client.c I have run into a problem I > do not know how to solve, as it involved much of the structure of the > codebase as well as the build system. It happens. > I have tried to move ntp_proto.c to the libntpd_obj target, with the > expected result of multiple failures where the code calls other stuff > that is part of ntpd. After looking at the code I can't just move the > relevant functions themselves, as they too call into files in ntpd. > And I do not know the architecture at this level to a sufficient > depth to do the kind of surgery that would require anyway. You have some choices. You could move the things that depend on ntpd out of ntp_proto.c. But as you noted that may not work. Or you could dig in harder and re-structure the code. That could take all year. The best option may be to put stub functions in your test code that satisfy the linker that the needed functions from ntpd are available. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 g...@rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can’t measure it, you can’t improve it." - Lord Kelvin
pgpYh1aSTiYBG.pgp
Description: OpenPGP digital signature
_______________________________________________ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel