segasai / q3c

PostgreSQL extension for spatial indexing on a sphere
GNU General Public License v2.0
77 stars 27 forks source link

q3c regression test failures on ppc64el, and i386/trusty #11

Closed df7cb closed 7 years ago

df7cb commented 7 years ago

Hi, q3c is failing regression tests for apt.postgresql.org in all Debian and Ubuntu releases on ppc64el. All PG versions from 9.2..9.6 are affected. The diff is always:

00:02:25.466 diff results/ellipse.out expected/ellipse.expected
00:02:25.466 2838c2838
00:02:25.466 <    804
00:02:25.466 ---
00:02:25.466 >    803
00:02:25.466 Makefile:37: recipe for target 'test' failed

Additionally, it is failing on i386, Ubuntu trusty only (again, all PG versions affected):

00:06:32.113 diff results/ellipse.out expected/ellipse.expected
00:06:32.114 2838c2838
00:06:32.114 <    804
00:06:32.114 ---
00:06:32.114 >    803
00:06:32.114 make: *** [test] Error 1

Btw, diff -u would make the output more easy to inspect. Or maybe even better, did you consider using pg_regress instead? It would take care of all the run-and-check-diff logic. Using it should be as easy as adding this to Makefile:

REGRESS=ang2ipix area cone ellipse join poly version

Thanks!

segasai commented 7 years ago

Thanks for the report. It is a bit difficult to fix the problem, as I don't have access to ppc64el architecture. I also couldn't immediately reproduce the issue on i386/trusty using docker (but that may have been a limitation of docker). From the diff it looks like it is a harmless floating point precision problem (i.e. on one platorm the point is exactly within a circle, and on another one, outside), but that's to be verified. I'll see if I can do anything in next couple of weeks.

Regarding the pg_regress, I think at certain point I was considering using it, but I probably didn't figure out how to migrate my current setup of the tables to pg_regress, so I decided not to do it.

segasai commented 7 years ago

Hi,

I've updated the regression tests in 6a36daaf6a495e8687cede9a1f96bb265308965b so the tests shouldn't fail now. I've also verified that the case in question was caused by a point lying exactly on an edge of the query radius.

Thanks for the report. Sergey

df7cb commented 7 years ago

Hi,

thanks for the fixes! The Debian package passes the tests on ppc64el now.

Unfortunately, the 32-bit i386/trusty is still failing on all PostgreSQL versions:

13:04:04 diff results/ellipse.out expected/ellipse.expected
13:04:04 3598c3598
13:04:04 <   2764
13:04:04 ---
13:04:04 >   2763