sqlite-3.20.1: test/date.test fails on i686 target due to FPU wibbles

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

sqlite-3.20.1: test/date.test fails on i686 target due to FPU wibbles

Sergei Trofimovich
The original bug is reported as https://bugs.gentoo.org/628242

I think test fails due to slight precision variation
caused by FPU being 80-bit internally.

If we add the following to CFLAGS, then:
-mfpmath=387 (default on i686): test fails
-mfpmath=sse (default on x86_64): test passes

Quick reproduce howto:

$ ./configure CFLAGS="-O2 -m32 -mfpmath=387" LDFLAGS=-m32
$ make testfixture
$ ./testfixture test/date.test

date-2.2c-1...
! date-2.2c-1 expected: [06:28:00.001]
! date-2.2c-1 got:      [06:28:00.000]
date-2.2c-2... Ok
date-2.2c-3... Ok
date-2.2c-4...
! date-2.2c-4 expected: [06:28:00.004]
! date-2.2c-4 got:      [06:28:00.003]
date-2.2c-5... Ok
date-2.2c-6... Ok
date-2.2c-7...
! date-2.2c-7 expected: [06:28:00.007]
! date-2.2c-7 got:      [06:28:00.006]
date-2.2c-8...
! date-2.2c-8 expected: [06:28:00.008]
! date-2.2c-8 got:      [06:28:00.007]
date-2.2c-9... Ok
date-2.2c-10...
! date-2.2c-10 expected: [06:28:00.010]
! date-2.2c-10 got:      [06:28:00.009]
date-2.2c-11...
! date-2.2c-11 expected: [06:28:00.011]
! date-2.2c-11 got:      [06:28:00.010]
date-2.2c-12... Ok
date-2.2c-13... Ok
date-2.2c-14...
! date-2.2c-14 expected: [06:28:00.014]
! date-2.2c-14 got:      [06:28:00.013]

SQLite 2017-09-20 18:47:51 8e89ade69e1499a061b430c9dac2a13a2afd21281737207720f9ccbc7b41e6bf
464 errors out of 1595 tests on sf Linux 32-bit little-endian

Note the  drift here.
Worth disabling tests on i?86?

--

  Sergei

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

attachment0 (201 bytes) Download Attachment