Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testRunner_v7.js - test failures - test_cors #1473

Open
dwrobel opened this issue Sep 21, 2018 · 4 comments
Open

testRunner_v7.js - test failures - test_cors #1473

dwrobel opened this issue Sep 21, 2018 · 4 comments

Comments

@dwrobel
Copy link
Contributor

dwrobel commented Sep 21, 2018

This provides some more detailed information related to recently introduces regressions in some of the tests.

The complete list of observed failures are in the following git commit message: dwrobel@9a04fb8

For the two failures:

  • test_imports.url: FAILURE: api differs: URL
  • test_imports.crypto: FAILURE: api differs: ECDH

the following modifications were done to the test script:

--- test_imports_v2.js	2018-09-17 23:52:50.000000000 +0200
+++ test_imports_v2-dw.js	2018-09-21 08:12:01.658369469 +0200
@@ -30,9 +30,14 @@
 
   function test_arrays_equal(a1, a2) {
     return function () {
+      console.log("dw:expected: " + a1);
+      console.log("dw:existing: " + a2);
+
       var diff1 = a1.filter(function (v) { return -1 === a2.indexOf(v); });
       var diff2 = a2.filter(function (v) { return -1 === a1.indexOf(v); });
       var diff = diff1.concat(diff2);
+      console.log("dw:diff    : " + diff);
+      console.log("dw:--------");
       return Promise.resolve(assert(diff.length === 0, 'api differs: ' + diff));
     };
   }
@@ -60,6 +65,7 @@
             resolve(assert(false, 'px.import did not return a promise'));
           } else {
             js.api.ready.then(function (module) {
+              console.log("dw:module: " + name);
               test_api(module, expectedApi)().then(resolve);
             }, function () {
               resolve(assert(typeof expectedApi === 'undefined', 'px.import promise failed'));

Then grepping the output of the log for failed tests for dw: gives the following:

dw:expected: parse,resolve,resolveObject,format,Url
dw:existing: Url,parse,resolve,resolveObject,format,URL,URLSearchParams,domainToASCII,domainToUnicode
dw:diff    : URL,URLSearchParams,domainToASCII,domainToUnicode
dw:expected: DEFAULT_ENCODING,constants,_toBuf,Hash,createHash,Hmac,createHmac,Cipher,createCipher,Cipheriv,createCipheriv,Decipher,createDecipher,Decipheriv,createDecipheriv,Sign,createSign,Verify,createVerify,publicEncrypt,publicDecrypt,privateEncrypt,privateDecrypt,DiffieHellman,createDiffieHellman,getDiffieHellman,createDiffieHellmanGroup,DiffieHellmanGroup,createECDH,pbkdf2,pbkdf2Sync,Certificate,setEngine,pseudoRandomBytes,randomBytes,prng,rng,getCiphers,getHashes,getCurves,timingSafeEqual,createCredentials,Credentials
dw:existing: DEFAULT_ENCODING,constants,_toBuf,Hash,createHash,Hmac,createHmac,Cipher,createCipher,Cipheriv,createCipheriv,Decipher,createDecipher,Decipheriv,createDecipheriv,Sign,createSign,Verify,createVerify,publicEncrypt,publicDecrypt,privateEncrypt,privateDecrypt,DiffieHellman,createDiffieHellman,getDiffieHellman,createDiffieHellmanGroup,DiffieHellmanGroup,ECDH,createECDH,pbkdf2,pbkdf2Sync,Certificate,setEngine,randomFillSync,randomFill,pseudoRandomBytes,randomBytes,prng,rng,getCiphers,getHashes,getCurves,timingSafeEqual,createCredentials,Credentials
dw:diff    : ECDH,randomFillSync,randomFill

The test failures are consistent while using both nodejs versions v6.13.0 and v8.11.1.

@conniefry
Copy link
Contributor

Thank you for the debugging, Damian! It looks like this is failing for you because it is matching to node 6.9.0; we will have to revise the test. Thanks!

@dwrobel
Copy link
Contributor Author

dwrobel commented Sep 21, 2018

For completeness here is the output from compiling Spark with SUPPORT_V8 and using v8 version v8-6.7.17:

  • rt: WARN pxScene2d.cpp:4027 -- Thread-29197: [LOG LOG] test_imports.querystring: FAILURE: api differs: unescapeBuffer
  • rt: WARN pxScene2d.cpp:4027 -- Thread-29197: [LOG LOG] test_imports.crypto: FAILURE: module is null
rt: WARN pxScene2d.cpp:4027 -- Thread-29197: [LOG LOG] dw:module: querystring
rt: WARN pxScene2d.cpp:4027 -- Thread-29197: [LOG LOG] dw:expected: unescapeBuffer,unescape,escape,encode,stringify,decode,parse
rt: WARN pxScene2d.cpp:4027 -- Thread-29197: [LOG LOG] dw:existing: unescape,escape,encode,stringify,decode,parse
rt: WARN pxScene2d.cpp:4027 -- Thread-29197: [LOG LOG] dw:diff    : unescapeBuffer

@conniefry
Copy link
Contributor

Internal reference: XRE2-1750

@dwrobel
Copy link
Contributor Author

dwrobel commented Oct 3, 2018

The complete list of observed failures are in the following git commit message: dwrobel/pxCore@9a04fb8

From the original list, at the time of writing, the following tests fails on node8 :

  • test_cors_v4.js:
test_cors.test_foobar:  FAILURE: able to read response
test_cors.test_no_header:  FAILURE: able to read response
test_cors.test_empty:  FAILURE: able to read response

An attempt to use test_cors_v5.js version results in:

test_cors.allow:  FAILURE: TypeError: http2_module.request is not a function
test_cors.allow *:  FAILURE: TypeError: http2_module.request is not a function
test_cors.allow null:  FAILURE: TypeError: http2_module.request is not a function
test_cors.disallow foo.bar:  FAILURE: TypeError: http2_module.request is not a function
test_cors.disallow empty:  FAILURE: TypeError: http2_module.request is not a function
test_cors.disallow no headers:  FAILURE: TypeError: http2_module.request is not a function
test_cors.allow with credentials:  FAILURE: TypeError: http2_module.request is not a function
test_cors.disallow with credentials:  FAILURE: TypeError: http2_module.request is not a function
test_cors.allow without credentials:  FAILURE: TypeError: http2_module.request is not a function
test_cors.allow same origin:  FAILURE: TypeError: http2_module.request is not a function

@dwrobel dwrobel changed the title testRunner_v7.js - test failures - test_imports.{url,crypto} testRunner_v7.js - test failures - test_cors Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants