Re: [HACKERS] pgbench tap tests & minor fixes - Mailing list pgsql-hackers

From Nikolay Shaplov
Subject Re: [HACKERS] pgbench tap tests & minor fixes
Date
Msg-id 6432511.g5juFK04N8@x200m
Whole thread Raw
In response to [HACKERS] pgbench tap tests & minor fixes  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: [HACKERS] pgbench tap tests & minor fixes
List pgsql-hackers
В письме от 25 июня 2017 19:03:54 пользователь Fabien COELHO написал:
> Hello Nikolay,
>
> >> Is the attached version better to your test?
> >
> > I've expected from expr_scanner_chomp_substring to decrement end_offset,
> > so it would work more like perl chomp function, but the way you've done
> > is also good.
>
> Ok.
>
> > The sad think is that in v7 and v8 TAP tests fails. (in v6 it still works,
> > I have local branches for all your patches versions). I did not check it
> > bdefore in v7, just read the code. It was my mistake
>
> Could you be more precise please? Which TAP tests are failing? Could you
> give the log showing the issues encountered?

I am building dev postgres with --enable-cassert

and get a lot of

'pgbench: exprscan.l:354: expr_scanner_get_substring: Assertion `end_offset <=
strlen(state->scanbuf)' failed.

may be this it because of "end_offset + 1" in expr_scanner_chomp_substring ?

Why there is + 1 there?

>
> I did "make check" and "make check-world", both PASS.
>
> ISTM that manually in pgbench right know with patch v8 I have:
>
>   sh> make check
>   rm -rf '/home/fabien/DEV/GIT/postgresql'/tmp_install
>   /bin/mkdir -p '/home/fabien/DEV/GIT/postgresql'/tmp_install/log
>   make -C '../../..' DESTDIR='/home/fabien/DEV/GIT/postgresql'/tmp_install
>   install >'/home/fabien/DEV/GIT/postgresql'/tmp_install/log/install.log
> 2>&1 rm -rf /home/fabien/DEV/GIT/postgresql/src/bin/pgbench/tmp_check/log
> cd . && TESTDIR='/home/fabien/DEV/GIT/postgresql/src/bin/pgbench'
> PATH="/home/fabien/DEV/GIT/postgresql/tmp_install/usr/local/pgsql/bin:$PATH
> "
> LD_LIBRARY_PATH="/home/fabien/DEV/GIT/postgresql/tmp_install/usr/local/pgsq
> l/lib" PGPORT='65432'
> PG_REGRESS='/home/fabien/DEV/GIT/postgresql/src/bin/pgbench/../../../src/te
> st/regress/pg_regress' prove -I ../../../src/test/perl/ -I .  t/*.pl
> t/001_pgbench_with_server.pl .. ok
>   t/002_pgbench_no_server.pl .... ok
>   All tests successful.
>   Files=2, Tests=360,  6 wallclock secs ( 0.04 usr  0.02 sys +  4.53 cusr
> 0.22 csys =  4.81 CPU) Result: PASS
>
> Which looks ok.

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



pgsql-hackers by date:

Previous
From: Nikolay Shaplov
Date:
Subject: Re: [HACKERS] pgbench tap tests & minor fixes
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] pgbench tap tests & minor fixes