libntpd contents and the build order of doom
Gary E. Miller
gem at rellim.com
Wed Apr 24 01:16:56 UTC 2019
Yo Ian!
On Tue, 23 Apr 2019 19:26:17 -0500
Ian Bruene via devel <devel at 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
gem at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20190423/9163ecc0/attachment.bin>
More information about the devel
mailing list