From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Failure with regression test largeobject if pg_regress invoked from external paths |
Date: | 2016-01-06 01:50:56 |
Message-ID: | CAB7nPqQV56fFkBXxRAz8pybds50K7SdMHRMrdDv8VOYWh_4rtg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi all,
Today a colleague (Kingter Wang) has reminded me about a failure with
the test case largeobject that can happen if pg_regress is run from an
external path that has not results/ available at hand:
*** /home/packages/stuff/expected/largeobject.out Tue Jan 5 07:56:58 2016
--- /home/packages/stuff/results/largeobject.out Tue Jan 5 07:57:21 2016
***************
*** 388,405 ****
(1 row)
\lo_import 'results/lotest.txt'
\set newloid :LASTOID
-- just make sure \lo_export does not barf
\lo_export :newloid 'results/lotest2.txt'
-- This is a hack to test that export/import are reversible
-- This uses knowledge about the inner workings of large object mechanism
-- which should not be used outside it. This makes it a HACK
SELECT pageno, data FROM pg_largeobject WHERE loid = (SELECT loid
from lotest_stash_values)
EXCEPT
SELECT pageno, data FROM pg_largeobject WHERE loid = :newloid;
! pageno | data
! --------+------
! (0 rows)
SELECT lo_unlink(loid) FROM lotest_stash_values;
lo_unlink
--- 388,735 ----
(1 row)
\lo_import 'results/lotest.txt'
+ could not open file "results/lotest.txt": No such file or directory
\set newloid :LASTOID
-- just make sure \lo_export does not barf
\lo_export :newloid 'results/lotest2.txt'
+ ERROR: large object 0 does not exist
While looking at largeobject.source, it is indeed surprising to see
that we use a relative path for this test and not an absolute path.
For the sake of this test's portability, shouldn't we append
@abs_builddir@ then? Attached is a patch to address this issue.
I would imagine that I am not the only one seeing those tests run in
such ways...
Regards,
--
Michael
Attachment | Content-Type | Size |
---|---|---|
20160106_largeobject_absolute.patch | application/x-patch | 3.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-01-06 02:35:30 | Re: Failure with regression test largeobject if pg_regress invoked from external paths |
Previous Message | extra43 | 2016-01-05 23:07:59 | BUG #13850: Need a parameter added similar to "edb_stmt_level_tx" |