From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "osumi(dot)takamichi(at)fujitsu(dot)com" <osumi(dot)takamichi(at)fujitsu(dot)com> |
Cc: | "'pgsql-hackers(at)lists(dot)postgresql(dot)org'" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: how to use valgrind for TAP tests |
Date: | 2020-12-18 16:02:56 |
Message-ID: | 159904.1608307376@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"osumi(dot)takamichi(at)fujitsu(dot)com" <osumi(dot)takamichi(at)fujitsu(dot)com> writes:
> I have a question about how to execute valgrind with TAP tests
> in order to check some patches in the community.
> My main interest is testing src/test/subscription now but
> is there any general way to do it ?
The standard solution is
(1) Build normally (well, with -DUSE_VALGRIND)
(2) Move the postgres executable aside, say
mv src/backend/postgres src/backend/postgres.orig
(3) Replace the executable with a wrapper script that invokes
valgrind on the original executable
(4) Now you can run "make check" with a valgrind'ed server,
as well as things that depend on "make check", such as TAP tests
The script I use for (3) is attached; adjust paths and options to taste.
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
postgres-substitute.sh | text/x-shellscript | 805 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | James Coleman | 2020-12-18 16:03:16 | Re: [DOC] Document concurrent index builds waiting on each other |
Previous Message | Bruce Momjian | 2020-12-18 15:48:00 | Re: Refactoring HMAC in the core code |