Re: BUG #15605: Unstable regression test "tablespace"

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15605: Unstable regression test "tablespace"
Date: 2019-01-23 15:27:16
Message-ID: e98b295c-6799-6725-001f-20536296b5b2@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

23.01.2019 17:53, Tom Lane пишет:
> =?utf-8?q?PG_Bug_reporting_form?= <noreply(at)postgresql(dot)org> writes:
>> When running 'TESTS="$(printf "tablespace %.0s" `seq 1000`)" make
>> check-tests' I get:
>> ...
>> It seems that the following query in src/test/regress/sql/tablespace.sql:
>> SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c
>> where c.reltablespace = t.oid AND c.relname LIKE 'part%_idx';
>> needs an "ORDER BY".
> I'm totally unexcited by this. Almost every script in our standard
> regression suite is somewhat context-dependent, eg many of them depend
> on tables or other objects created by previous scripts. Trying to make
> them be robust when run standalone would be a huge and ultimately pretty
> pointless exercise.
>
> In the case of the tablespace script, it evidently has some dependency on
> being run in a fresh database, but so what? It always will be, when used
> as directed. (I do not recall the reason why we run it first, but
> I remember that there was some good reason, possibly to do with crash
> recovery.)
Yes, I understand that there are some dependencies between test scripts
and most of the scripts are not repeatable, but the tablespace test is.
I can run:
TESTS="$(printf "tablespace %.0s" `seq 10`)" make check-tests
and the test executes fine:
============== running regression test queries        ==============
test tablespace                   ... ok
test tablespace                   ... ok
test tablespace                   ... ok
test tablespace                   ... ok
test tablespace                   ... ok
test tablespace                   ... ok
test tablespace                   ... ok
test tablespace                   ... ok
test tablespace                   ... ok
test tablespace                   ... ok
============== shutting down postmaster               ==============
============== removing temporary instance            ==============

======================
 All 10 tests passed.
======================

So the issue is not with repetition itself but with the random change of
the SELECT results.

Best regards,
Alexander

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Brad DeJong 2019-01-23 15:55:58 postgresql-9.6.11-1-windows-x64.exe VC++ runtime installer
Previous Message Tom Lane 2019-01-23 14:53:31 Re: BUG #15605: Unstable regression test "tablespace"