#1 2014-11-19 01:08:07

restneophyte
Member
Registered: 2014-11-18
Posts: 26

Failed tests when running "TestSQL3"

I am using Delphi XE7 Update 1 on a Windows 8 virtual machine. I downloaded and uncompressed the snapshot of the latest source code repository into "C:\Dev\Lib\". Idownloaded and uncompressed the static 32 bit SQLite3 .obj files into "C:\Dev\Lib\SQLite3\". I opened the TestSQL3.dpr program from the SQLite3 sub-folder. I compiled the program. When I run it, I get the following fails:

1.4. Synopse PDF:
!  - TPdfDocument: 1 / 4 FAILED  50.88ms
  - TPdfDocumentGDI: 8 assertions passed  46.90ms
  Total failed: 1 / 12  - Synopse PDF FAILED  98.96ms


2.8. External database:
  - TQuery: 2,003 assertions passed  8.43ms

! Exception ESQLDBRemote raised with messsage:
!  TSQLDBServerHttpApi.Create: administrator rights needed to register URI root on port 888

What am I doing wrong?

Offline

#2 2014-11-19 03:35:58

Leander007
Member
From: Slovenia
Registered: 2011-04-29
Posts: 113

Re: Failed tests when running "TestSQL3"

For URI problem you can read this explanation.

I did not test this TestSQL3Register on Windows 8, but if it fails, then run it from administrator console (Win button + X -> Command Prompt (Admin)).
This helped me when I registered custom URI via netsh with http.sys for some .NET application.


"Uncertainty in science: There no doubt exist natural laws, but once this fine reason of ours was corrupted, it corrupted everything.", Blaise Pascal

Offline

#3 2014-11-19 08:38:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Failed tests when running "TestSQL3"

For http.sys and administrator rights, see http://synopse.info/files/html/Synopse% … l#TITL_109

The TPdfDocument issue comes from the fact that the test is charset-dependent, so may fail if your system code page is not Win1252.
Any feedback is welcome to fix the test (this is the test which is not working, not the SynPDF library itself!).

Online

#4 2014-11-19 08:57:28

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Failed tests when running "TestSQL3"

@ab,

For me this error (!  - TPdfDocument: 1 / 4 FAILED) occurs on:
Windows 8.1-64 and Windows 10-64.

On Windows 7-32 and 7-64 All is OK.

Michal

Offline

#5 2014-11-19 14:40:15

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Failed tests when running "TestSQL3"

I do not have neither Windows 8.1 nor Windows 10.
Could you help by finding out what is the difference?
Just save the generated pdf file on both systems, and do a binary comparison.

I suspect our tests are too much aggressive, since we check for the hash of the generated pdf.
They may be some difference between the OS implementation. A single bit of change, and the test fails.

Online

#6 2014-11-19 20:32:28

restneophyte
Member
Registered: 2014-11-18
Posts: 26

Re: Failed tests when running "TestSQL3"

After reading 'Leander007' and 'ab' suggestions regarding my URI problem, I compiled and run the 'TestSQL3Register.' This solved my original URI problem. Even though this problem was solved, I now have new ones:

2.8. External database:
  - TQuery: 2,003 assertions passed  9.69ms
  - SynDBRemote: 20,036 assertions passed  525.28ms
  - External records: 2 assertions passed  262us
  - Auto adapt SQL: 633 assertions passed  48.43ms
  - Crypted database: 253,275 assertions passed  284.52ms
!  - External via REST: 21,981 / 170,325 FAILED  2.36s
!  - External via virtual table: 21,893 / 170,325 FAILED  2.96s
!  - External via REST with change tracking: 22,904 / 180,425 FAILED  4.22s

In regard of the '1.4. Synopse PDF: !  - TPdfDocument: 1 / 4 FAILED  50.88ms' error, I did switch my system code page from 437 to 1252 and rebooted my machine. This did not solve my original problem.

FYI:
----
Synopse framework used: 1.18.533
Running on wEight_64 with code page 1252
SQlite3 engine used: 3.8.7.1
Generated with: Delphi XE7 compiler


By the way, I got the exact same results when compiling and running 'TestSQL3' with Delphi 2010 (on an XP 32-bit machine).

Last edited by restneophyte (2014-11-19 20:34:41)

Offline

#7 2014-12-02 15:23:53

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Failed tests when running "TestSQL3"

@ab

Recently widened the pool of errors in TestSQL3: (1.18.601)

For Windows7-64 is:
!  - TSynTableStatement: 6 / 205 FAILED  1.12ms

and for Windows8.1-64:
!  - TSynTable: 187 / 875 FAILED  12.39ms
!  - TSynTableStatement: 6 / 205 FAILED  415us
and old
!  - TPdfDocument: 1 / 2 FAILED  72.43ms

Michal

Offline

#8 2014-12-03 08:43:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Failed tests when running "TestSQL3"

@restneophyte
I tried to reproduce the problem, with XE7, without any issue under Windows 7 - 64 bit.
I run everything also with FullDebugMode for FastMM4, and there was no memory corruption reported.
Note that I do not have Windows 8 available.

@miab3
I was able to reproduce some issue with SynBigTable in TestSQL3, but not in TSynTable.
See http://synopse.info/fossil/info/ec9a72e9fc
But for the remaining failures, I do not have any idea.

To both:
Without any code to reproduce the problem, it is impossible to guess what went wrong.
We need further information (stack trace, execution context, at least an attempt to debug and find out what is wrong) from your side.
But please do not post here huge log files. It fills the forum with mostly unused crap content. Please try to find out what is wrong, identifying the context, and if you have some huge content, please put a link on dropbox, pastebin, or google drive.

Online

#9 2014-12-03 10:36:10

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Failed tests when running "TestSQL3"

@ab

You may try on Windows 10-64 (Build 9879).
For now, it's free.

...
!  - TSynTableStatement: 6 / 205 FAILED  1.45ms
...
!  - TPdfDocument: 1 / 2 FAILED  19.64ms
...
Synopse framework used: 1.18.605
Running on wEight_64 with code page 1252
SQlite3 engine used: 3.8.7.2
Generated with: Delphi XE2 compiler

Time elapsed for all tests: 78.55s
Tests performed at 2014-12-03 11:24:51

Total assertions failed for all test suits:  7 / 17,584,116
! Some tests FAILED: please correct the code.


Done - Press ENTER to Exit

Michal

Offline

#10 2014-12-03 11:07:32

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Failed tests when running "TestSQL3"

I sadly do not own a MSDN account.

Please try to put some more info about the context here.

Online

#11 2014-12-03 12:25:55

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Failed tests when running "TestSQL3"

@ab,

For this you do not need an MSDN account.
Just create an account on the outlook.com.

Michal

Offline

#12 2014-12-03 18:22:45

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Failed tests when running "TestSQL3"

@ab

1.18.610
Remained just good old error on Windows 8/10-64
!  - TPdfDocument: 1 / 2 FAILED  67.73ms

Michal

Offline

#13 2014-12-03 21:03:29

restneophyte
Member
Registered: 2014-11-18
Posts: 26

Re: Failed tests when running "TestSQL3"

@ab

In regards to:

 1.4. Synopse PDF:
!  - TPdfDocument: 1 / 4 FAILED  6.11ms
  - TPdfDocumentGDI: 8 assertions passed  365.98ms
  Total failed: 1 / 12  - Synopse PDF FAILED  372.98ms

using the v. 1.18.610 of the Synopse framework, here is what I found (so far) while trying to debug the problem:

The problem occurs within 'procedure TTestSynopsePDF._TPdfDocument;' (file: 'SynSelfTests.pas') when executing statement 'Check(Hash32(MS.Memory,MS.Position)=Hash[embed]);' (with 'embed' set to False).

On my Windows 8 (64 bit) Pro N machine, 'Hash32(MS.Memory,MS.Position)' returns '2317878866' whereas 'Hash[embed]' returns '2451964498'.

Offline

#14 2014-12-03 22:04:50

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Failed tests when running "TestSQL3"

Sounds like if some low-level API structure did change with Windows 8.
Not a huge issue I suspect.
Our "hash" based should probably be modified for Windows 8.

Is the generated pdf correct?

Online

#15 2014-12-03 23:05:01

restneophyte
Member
Registered: 2014-11-18
Posts: 26

Re: Failed tests when running "TestSQL3"

@ab

A 'pdf' is generated. Is it the right one? I am not certain but I believe that it is. Here is a copy of it if you want to double check.

Offline

#16 2014-12-03 23:10:34

restneophyte
Member
Registered: 2014-11-18
Posts: 26

Re: Failed tests when running "TestSQL3"

@ab

In regards to:

 2.8. External database:
  - TQuery: 2,003 assertions passed  13.71ms
  - SynDBRemote: 30,095 assertions passed  1.34s
  - External records: 2 assertions passed  182us
  - Auto adapt SQL: 543 assertions passed  54.21ms
  - Crypted database: 253,275 assertions passed  254.20ms
!  - External via REST: 21,893 / 170,325 FAILED  1.83s
!  - External via virtual table: 21,893 / 170,325 FAILED  2.67s
!  - External via REST with change tracking: 22,904 / 180,425 FAILED  3.84s
  - JET database: 7,007 assertions passed  3.30s
  Total failed: 66,690 / 814,000  - External database FAILED  13.31s

using the v. 1.18.610 of the Synopse framework, here is what I found (so far) while trying to debug the problem:

It is as if the value of variable 'Start' in 'procedure TTestExternalDatabase.Test(StaticVirtualTableDirect, TrackChanges: boolean);' (file: 'SynSelfTests.pas') is always less than the values of 'RExt.LastChange' and 'RExt.CreatedAt.'

Offline

#17 2014-12-10 10:02:56

JerryC_ph
Member
Registered: 2013-03-11
Posts: 16

Re: Failed tests when running "TestSQL3"

I set up a new PC Win 8.1, downloaded the nightly build and latest sqlite3.obj and run the testsql3.exe with the following results:

   Synopse mORMot Framework Automated tests
  ------------------------------------------


1. Synopse libraries

 1.1. Low level common:
  - System copy record: 22 assertions passed  87us
  - TRawUTF8List: 70,005 assertions passed  32.94ms
!  - TDynArray: 2 / 1,027,709 FAILED  109.47ms
  - TDynArrayHashed: 1,200,629 assertions passed  74.46ms
  - TObjectListHashed: 999,889 assertions passed  294.46ms
  - TObjectDynArrayWrapper: 167,501 assertions passed  12.39ms
  - Fast string compare: 7 assertions passed  106us
  - IdemPropName: 30 assertions passed  134us
  - Url encoding: 132 assertions passed  844us
  - GUID: 9,007 assertions passed  2.38ms
  - IsMatch: 599 assertions passed  163us
  - Soundex: 35 assertions passed  177us
  - Numerical conversions: 1,115,443 assertions passed  192.36ms
  - crc32c: 30,030 assertions passed  61.50ms
      pas 23.29ms 256.1 MB/s fast 2.89ms 2.0 GB/s sse42 1.15ms 1.0 GB/s
  - Curr 64: 20,053 assertions passed  611us
  - CamelCase: 11 assertions passed  60us
  - Bits: 4,774 assertions passed  111us
  - Ini files: 7,004 assertions passed  11.55ms
  - UTF8: 82,129 assertions passed  889.48ms
  - Iso 8601 date and time: 36,015 assertions passed  3.64ms
  - Url decoding: 1,100 assertions passed  291us
  - Mime types: 23 assertions passed  90us
  - TSynTable: 875 assertions passed  2.71ms
  - TSynCache: 404 assertions passed  151us
  - TSynFilter: 1,005 assertions passed  2.11ms
  - TSynValidate: 677 assertions passed  536us
  - TSynLogFile: 42 assertions passed  402us
  Total failed: 2 / 4,775,150  - Low level common FAILED  1.69s

 1.2. Low level types:
  - RTTI: 58 assertions passed  195us
  - Url encoding: 200 assertions passed  452us

! Exception EAccessViolation raised with messsage:
!  Access violation at address 00463941 in module 'TestSQL3.exe'. Read of addres
s 00000003


Synopse framework used: 1.18.625
Running on wEight_64 with code page 1252
Generated with: Delphi XE2 compiler

Time elapsed for all tests: 1.77s
Tests performed at 12/10/2014 5:57:45 PM

Total assertions failed for all test suits:  2 / 4,775,150
! Some tests FAILED: please correct the code.

Done - Press ENTER to Exit

Is there anything that I've missed?

Offline

#18 2014-12-10 14:38:50

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Failed tests when running "TestSQL3"

Last commit was certainly in an unstable state...
We are currently making a deep refactoring of mORMotWrappers.pas.

Please be patient!
We hope to finish this refactoring tonight.
smile

Online

#19 2014-12-10 21:36:05

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Failed tests when running "TestSQL3"

Update: refactoring has been finished.
Now all cross-platform wrapper generation code has been moved into mORMotWrappers.pas instead of SynCommons.pas and mORMot.pas.

On our side, all regression tests pass as expected.

Online

#20 2014-12-12 07:41:04

JerryC_ph
Member
Registered: 2013-03-11
Posts: 16

Re: Failed tests when running "TestSQL3"

I updated my Windows 8.0 to Windows 8.1 and the errors are gone.

Offline

#21 2014-12-12 08:50:32

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Failed tests when running "TestSQL3"

Pretty weird...

Online

Board footer

Powered by FluxBB