Re: [PATCH] Improve code coverage of network address functions - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: [PATCH] Improve code coverage of network address functions
Date
Msg-id CAOYmi+k5cFpYrDYR-jiRA8p+59kqu=Me5WRLGrz_qPgFdsG0KQ@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Improve code coverage of network address functions
List pgsql-hackers
On Thu, Oct 31, 2024 at 9:30 AM Aleksander Alekseev
<aleksander@timescale.com> wrote:
> Recently I played with lcov [1]. In the process it was discovered that
> the following functions are not executed by our tests:
>
> - abbrev(inet)
> - set_masklen(cidr,int4)
> - netmask(inet)
> - hostmask(inet)

The new tests for the first four look reasonable to me.

> - inet_client_addr()
> - inet_client_port()
> - inet_server_addr()
> - inet_server_port()

These may be more controversial. (Personally, I'm -0.5.) I agree that
making sure they exist/don't crash is a benefit, but to use my machine
as an example, the interesting code with crash potential in
inet_server_addr() still isn't exercised during `meson test`. (A test
driver in src/test/modules, which could pull the socket information to
verify it, might be a better way to go.)

Thanks!
--Jacob



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Eager aggregation, take 3
Next
From: Chapman Flack
Date:
Subject: Re: XMLDocument (SQL/XML X030)