From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Keisuke Kuroda <keisuke(dot)kuroda(dot)3862(at)gmail(dot)com> |
Subject: | Re: [PATCH] Improve code coverage of network address functions |
Date: | 2025-01-22 14:05:01 |
Message-ID: | CAJ7c6TNTBKe4mWhZU1kFUm1AtCSkJckTHpE0NibL5jJtnMF=5A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi everyone,
Many thanks for all your great feedback.
> In any case, Aleksander, I don't mean to sign you up for all that; the
> `ssl` suite also seems good enough to me if you're interested in
> pursuing that side of the patch further.
OK, I moved the named tests to src/test/ssl/t/003_sslinfo.pl:
```
$ PG_TEST_EXTRA=ssl meson test -C build --suite postgresql:ssl
$ less build/meson-logs/testlog.txt
[...]
ok 22 - inet_client_addr() returned non-NULL value
ok 23 - inet_client_port() returned non-NULL value
ok 24 - inet_server_addr() returned non-NULL value
ok 25 - inet_server_port() returned non-NULL value
[...]
```
> Adding the following cases to the set_masklen()
> test would further improve coverage.
> * netmask = -1
> * netmask > maxvalue(33 when ipv4)
Good idea. I included the proposed tests into the attached patch v2.
While on it I noticed the following comment:
```
-- check the conversion to/from text and set_netmask
```
Since we don't have set_netmask() I think the comment is wrong, so I
corrected it.
--
Best regards,
Aleksander Alekseev
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Improve-code-coverage-of-network-address-function.patch | application/x-patch | 7.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2025-01-22 14:08:18 | Re: IWYU annotations |
Previous Message | Yura Sokolov | 2025-01-22 14:02:34 | Re: [RFC] Lock-free XLog Reservation from WAL |