Re: pgbench tap tests & minor fixes

Nikolay Shaplov <dhyan@nataraj.su>

From: Nikolay Shaplov <dhyan@nataraj.su>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>, Robert Haas <robertmhaas@gmail.com>
Date: 2017-08-20T12:53:28Z
Lists: pgsql-hackers
В письме от 25 июня 2017 20:42:58 пользователь Fabien COELHO написал:
> > may be this it because of "end_offset + 1" in expr_scanner_chomp_substring
> > ? Why there is + 1 there?
> 
> Thanks for the debug! Here is a v9 which does a rebase after the
> reindentation and fixes the bad offset.
Sorry I am back here after a big pause (I hope)

I've applied the patch to the current master, and it seems that one test now 
fails:

regress_log_002_pgbench_no_server:

not ok 70 - pgbench option error: prepare after script err /(?^:query mode .* 
before any)/

#   Failed test 'pgbench option error: prepare after script err /(?^:query 
mode .* before any)/'
#   at /home/nataraj/dev/review-
pgbench/ccc/postgresql/src/bin/pgbench/../../../src/test/perl/TestLib.pm line 
369.
#                   'connection to database "" failed:
# could not connect to server: No such file or directory
# 	Is the server running locally and accepting
# 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
# '
#     doesn't match '(?^:query mode .* before any)'
opts=-i -S, stat=1, out=(?^:^$), err=(?^:cannot be used in initialization), 
name=pgbench option error: init vs run# Running: pgbench -i -S


-- 
Do code for fun. Can do it for money (Perl & C/C++ ~10h/week)


Commits

  1. Add much-more-extensive TAP tests for pgbench.

  2. Be more careful about newline-chomping in pgbench.

  3. Fix some subtle problems in pgbench transaction stats counting.