Skip to content

Commit f40346f

Browse files
committed
Doc: add some doco about using the libpq_pipeline test module.
The README file here was barely a stub. Try to make it useful. Jelte Fennema, with some further work by me Discussion: https://postgr.es/m/AM5PR83MB0178D3B31CA1B6EC4A8ECC42F7529@AM5PR83MB0178.EURPRD83.prod.outlook.com
1 parent 1d3566f commit f40346f

File tree

1 file changed

+34
-0
lines changed
  • src/test/modules/libpq_pipeline

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
11
Test programs and libraries for libpq
2+
=====================================
3+
4+
This module was developed to test libpq's "pipeline" mode, but it can
5+
be used for any libpq test that requires specialized C code.
6+
7+
"make check" will run all the tests in the module against a temporary
8+
server installation.
9+
10+
You can manually run a specific test by running:
11+
12+
./libpq_pipeline <name of test> [ <connection string> ]
13+
14+
This will not start a new server, but rather connect to the server
15+
specified by the connection string, or your default server if you
16+
leave that out. To discover the available test names, run:
17+
18+
./libpq_pipeline tests
19+
20+
To add a new test to this module, you need to edit libpq_pipeline.c.
21+
Add a function to perform the test, and arrange for main() to call it
22+
when the name of your new test is passed to the program. Don't forget
23+
to add the name of your test to the print_test_list() function, else
24+
the TAP test won't run it.
25+
26+
If the order in which Postgres protocol messages are sent is deterministic
27+
in your test, you should arrange for the message sequence to be verified
28+
by the TAP test. First generate a reference trace file, using a command
29+
like:
30+
31+
./libpq_pipeline -t traces/mynewtest.trace mynewtest
32+
33+
Then add your test's name to the list in the $cmptrace definition in the
34+
t/001_libpq_pipeline.pl file. Run "make check" a few times to verify
35+
that the trace output actually is stable.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy