Opened 8 years ago

Closed 8 years ago

#3624 closed defect (fixed)

load_outdb related tests fail for 2.2.2 & 2.3.0-beta1 on Debian unstable

Reported by: sebastic Owned by: robe
Priority: blocker Milestone: PostGIS 2.2.3
Component: build Version: 2.2.x
Keywords: Cc:

Description

It seems the -pre.pl & -post.pl scripts are no longer executed, because the load_outdb tests report an error for the missing table:

ERROR:  relation "raster_outdb_template" does not exist at character 22

To troubleshoot this issue I used the following patch:

--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -638,7 +638,11 @@ sub eval_file
         #$pl = <PL>;
         #close(PL);
         #eval($pl);
-                               do $file;
+        unless (my $return = do $file) {
+           warn "couldn't parse $file: $@" if $@;
+           warn "couldn't do $file: $!"    unless defined $return;
+           warn "couldn't run $file"       unless $return;
+       }
     }
 } 

For the load_outdb related tests this reports:

PostgreSQL 9.5.4 on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.1.1-11) 6.1.1 20160802, 64-bit
  Postgis 2.3.0beta1 - r15063 - 2016-09-06 12:24:46
  scripts 2.3.0beta1 r15063
  raster scripts 2.3.0beta1 r15063
  GEOS: 3.5.0-CAPI-1.9.0 r4084
  PROJ: Rel. 4.9.3, 15 August 2016
  GDAL: GDAL 2.1.1, released 2016/07/07

Running tests

 check_gdal ..couldn't do load_outdb-pre.pl: No such file or directory at ../../../regress/run_test.pl line 643.
couldn't run load_outdb-pre.pl at ../../../regress/run_test.pl line 644.
 failed (diff expected obtained: /tmp/pgis_reg/test_1_diff)
 load_outdb ..couldn't do load_outdb-post.pl: No such file or directory at ../../../regress/run_test.pl line 643.
couldn't run load_outdb-post.pl at ../../../regress/run_test.pl line 644.
 failed (diff expected obtained: /tmp/pgis_reg/test_2_diff)

This seems to be caused by . being removed from @INC in perl to fix This seems to be caused by . being removed from @INC in perl to fix ​CVE-2016-1238. n.org/tracker/CVE-2016-1238 CVE-2016-1238.

The -pre.pl & -post.pl scripts for loader/ tests aren't executed either, but those tests handle that gracefully when they cannot read the expected files.

attachment:run_test-INC.patch adds . to @INC if it's not present, which resolves this issue.

Attachments (1)

run_test-INC.patch (630 bytes ) - added by sebastic 8 years ago.

Download all attachments as: .zip

Change History (9)

by sebastic, 8 years ago

Attachment: run_test-INC.patch added

comment:1 by sebastic, 8 years ago

Summary: load_outdb related tests fail for 2.2.2 & 2.3.0-beta1on Debian unstableload_outdb related tests fail for 2.2.2 & 2.3.0-beta1 on Debian unstable

comment:2 by sebastic, 8 years ago

The Debian perl maintainers sent an extensive announcement about this change recently, see:

Upcoming change to perl: current directory in @INC

comment:4 by robe, 8 years ago

Status: newreopened

oops sorry flagged wrong ticket.

comment:5 by robe, 8 years ago

Milestone: PostGIS 2.3.0PostGIS 2.2.3
Priority: mediumblocker

comment:6 by robe, 8 years ago

Owner: changed from pramsey to robe
Status: reopenednew

comment:7 by robe, 8 years ago

Committed patch for trunk (2.3) at r15072

comment:8 by robe, 8 years ago

Component: postgisbuild/upgrade/install

comment:9 by robe, 8 years ago

Resolution: fixed
Status: newclosed

In 15073:

load_outdb related tests fix for @INC change in perl
patch from Sebastiaan Couwenberg
closes #3624 for PostGIS 2.2

Note: See TracTickets for help on using tickets.