Opened 9 years ago

Closed 9 years ago

#2505 closed defect (fixed)

dumper-shp.prj: No such file or directory .. ok on bots

Reported by: robe Owned by: strk
Priority: medium Milestone: PostGIS 2.2.0
Component: build/upgrade/install Version: master
Keywords: Cc:

Description

I'm puzzled why is it okay not to find a file?

Both Debbie and Winnie register this line which seems really odd to me.

 dumper/literalsrid .....diff: /var/lib/jenkins/workspace/postgis/tmp/2_2_pg9.3w64/dumper-shp.prj: No such file or directory
.. ok 

Debbie happily moves along, but on Winnie, its followed by

 dumper/literalsrid .....diff: /projects/postgis/tmp/2.2.0dev_pg9.3_geos3.4.2_gdal1.10.0w64/dumper-shp.prj: No such file or directory
.. ok 
sh: /projects/postgis/tmp/2.2.0dev_pg9.3_geos3.4.2_gdal1.10.0w64/test_24_tmp: Permission denied
Cannot open log file /projects/postgis/tmp/2.2.0dev_pg9.3_geos3.4.2_gdal1.10.0w64/test_24_tmp
 failed (Unable to run sql script dumper/literalsrid-post.sql: /projects/postgis/tmp/2.2.0dev_pg9.3_geos3.4.2_gdal1.10.0w64/test_24_tmp)

Is that a test to see if no dumper is created or to see if it is created?

You can close it if it is by design. I have to check permissions on winnie why its giving a permission denied after. Might be a test non-issue

Change History (5)

comment:1 by strk, 9 years ago

So, dumper-shp.prj should supposedly be created by pgsql2shp. But if the command failed you should get a failure before trying to diff. Can it be pgsq2shp is failing to return an error code when the target directory is read-only ?

comment:2 by strk, 9 years ago

Now I see one problem with the "diff" subroutine. Indeed the caller expects it to return a diff as a sign of failure, which isn't possible when one of the files isn't found:

      my $diff = diff($expected,  $obtained);
      if ( $diff )
      { 
        open(FILE, ">$diffile");
        print FILE $diff;
        close(FILE);
        fail("diff expected obtained", $diffile);
        return 0;
      }

That kind of block should change to allow "diff" to return other kind of failures..

comment:3 by strk, 9 years ago

Confirmed that's the problem, working on it (then you'll have a real failure we'll need to find out more about ;)

comment:4 by strk, 9 years ago

r12028 fixes the false negative. Now it should fail. If confirmed please close this and if needed open another for the actual failure :)

comment:5 by robe, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.