No Tsocket Unit tests? - Re: Samba | libcli:dns: SAMBA_INTERNAL DNS, set forwarder port (!2148)
Matt Grant
matt at mattgrant.net.nz
Thu Sep 9 05:16:15 UTC 2021
Hi Uri!
Thank you for helping me while I drill into the tsocket library code.
I have been working through things, and thought I should check to see if
there are any unit of CI tests for the lib/tsocket code and I cannot find
one single written test for that library.
Please show me where these tests are if they do exist, otherwise I am
asking questions about whether I should be proceeding to touch that library
with new code for stability reasons, until a full test suite is written for
it. I believe that should be a separate project covered under a different
MR, not this one.
There are reasons I did not want to put that code near that library, and I
think I recall finding not test framework when I wrote the host_port
parsing, and thought I should leave lib/tsocket well alone for ongoing
release stability reasons until something is done about it.
Thank you!
Best Regards,
Matt Grant
On Wed, 8 Sept 2021 at 19:57, Uri Simchoni (@urisimchoni) <
gitlab at mg.gitlab.com> wrote:
> Uri Simchoni <https://gitlab.com/urisimchoni> commented
> <https://gitlab.com/samba-team/samba/-/merge_requests/2148#note_671906917>:
>
>
> The *location* macro is a compiler-supplied macro of file and line.
>
> Users of the function call tsocket_address_inet_from_strings(), but it is
> actually a macro, that translates into
> _tsocket_address_inet_from_strings(params, *location*), thus allowing
> _tsocket_address_inet_from_strings() to keep track of the call site - for
> debugging purpose.
>
> The #ifdef is there so that in doxygen mode (when generating API docs,
> that is), the docs generator shall see the function without underscore.
>
> What I have in mind is something like :
>
> int tsocket_address_inet_from_hostport_strings(TALLOC_CTX *mem_ctx, const char *fam, const char *addr, uint16_t default_port, struct tsocket_address **_addr)
>
> This will try to extract a port from the string, and then call
> tsocket_address_inet_from_strings using either the port that was found or
> the default port. ... that's what the user calls, and in the implementation
> you do all the "location business".
>
> —
> Reply to this email directly or view it on GitLab
> <https://gitlab.com/samba-team/samba/-/merge_requests/2148#note_671906917>.
>
> You're receiving this email because of your account on gitlab.com. If
> you'd like to receive fewer emails, you can unsubscribe
> <https://gitlab.com/-/sent_notifications/031540943ffd4db283b8bf3147bd656a/unsubscribe>
> from this thread or adjust your notification settings.
>
More information about the samba-technical
mailing list