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

From Aleksander Alekseev
Subject Re: [PATCH] Improve code coverage of network address functions
Date
Msg-id CAJ7c6TOi3c4nRhsuPNtr0GeJ34+si9EJH_eYOGfzRk3cHGQiLw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Improve code coverage of network address functions  (Stepan Neretin <sndcppg@gmail.com>)
List pgsql-hackers
Hi Stepan,

> Hello Aleksander! I'm a beginner and I would like to see and try your patch. However, I have never worked with
coveragein regression tests for PostgreSQL. Could you please tell me how it works and help me understand the process?
Thanks!

You are going to need some Linux distribution, GCC stack and lcov 1.16
[1]. (Lcov doesn't work with Clang; We seem to experience some
problems with lcov 2.0+, this is being investigated [2])

Apply the patch as usual ( git clone
git://git.postgresql.org/git/postgresql.git ; git am ... ) and run:

```
git clean -dfx && meson setup --buildtype debug
-DPG_TEST_EXTRA="kerberos ldap ssl" -Db_coverage=true -Dldap=disabled
-Dssl=openssl -Dcassert=true -Dtap_tests=enabled
-Dprefix=/home/eax/pginstall build && ninja -C build &&
PG_TEST_EXTRA=1 meson test -C build && ninja -C build coverage-html
```

Note the `-Db_coverage=true` and `ninja -C build coverage-html` parts.
Change `prefix` to an appropriate one. This will take longer than
usual. Your coverage report will be located in
build/meson-logs/coveragereport. You can compare the reports with and
without the patch to ensure that the patch improves code coverage.

[1]: https://github.com/linux-test-project/lcov/releases/tag/v1.16
[2]: https://postgr.es/m/CAJ7c6TN%2BMCh99EZ8YGhXZAdnqvNQYir6E34B_mmcB5KsxCB00A%40mail.gmail.com

-- 
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: "Andrey M. Borodin"
Date:
Subject: Re: Using read stream in autoprewarm
Next
From: Melanie Plageman
Date:
Subject: Re: Count and log pages set all-frozen by vacuum