Re: pgbench tap tests & minor fixes

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Nikolay Shaplov <dhyan@nataraj.su>, PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-05-08T19:07:16Z
Lists: pgsql-hackers
Hello Alvaro,

>> Here is a v3, with less files. I cannot say I find it better, but it 
>> still works.
>>
>> The "command_likes" function has been renamed "command_checks".
>
> Do parts of this need to be backpatched?

I would not bother too much about backpatching.

> I notice that you're patching pgbench.c, probably to fix some bug(s);

The bug fix part is about small issues that I noticed while writing 
extensive tests. Probably nobody would have noticed otherwise for some 
time.

> is the idea that we would backpatch all the new tests on whatever old 
> branches need the bugfixes too? If so, how far back do the fixes need to 
> go?

I'd say 9.6. There has been quite some changes and significant 
restructuring on pgbench wrt to prior versions.

> ISTM TestLib::command_checks() needs a comment explaining what it does.
> Its API seems pretty opaque.

Ok. That I can do. I'm wondering about Windows portability that I cannot 
check.

-- 
Fabien.


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.