Re: [PATCH] Improve code coverage of network address functions

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Improve code coverage of network address functions
Date: 2025-01-20 18:39:50
Message-ID: CAOYmi+k5cFpYrDYR-jiRA8p+59kqu=Me5WRLGrz_qPgFdsG0KQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 31, 2024 at 9:30 AM Aleksander Alekseev
<aleksander(at)timescale(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2025-01-20 19:04:44 Re: Add XMLNamespaces to XMLElement
Previous Message Robert Haas 2025-01-20 18:39:15 Re: Eager aggregation, take 3