ExpoSEJS / ExpoSE

A Dynamic Symbolic Execution (DSE) engine for JavaScript. ExpoSE is highly scalable, compatible with recent JavaScript standards, and supports symbolic modelling of strings and regular expressions.
MIT License
183 stars 36 forks source link

Error while running test #86

Closed artem-barmin-dev closed 4 years ago

artem-barmin-dev commented 4 years ago

Setup:

  1. MacOS 10.14.4
  2. Docker Desktop 2.1.0.1
  3. master branch of repository

When running tests inside Docker container or on host get following output:

*** [3/167] [1 running] [2 errors] ***
./tests/regex/search/not_at_start.js failed with errors (1). Printing output
[+] ExpoSE /source/tests/regex/search/not_at_start.js concurrent: 1 timeout: 7200000 per-test: 2400000
[|] [1 done /0 queued / 0 running / 1 errors / 0% coverage ] ***
[+] {"_bound":0} took 0.93s
[!] Exception E: SyntaxError: Unexpected end of JSON input of test data on 
[!] Exception E: SyntaxError: Unexpected end of JSON input of coverage data on 
[!] Exit code non-zero
[!] Error extracting final output - a fatal error must have occured
[!] expoSE replay '/source/tests/regex/search/not_at_start.js' '{"_bound":0}'
[!] Stats
[!] Done
[+] Total Lines Of Code 0
[+] Total Coverage: NaN%
[+] EXPOSE_PRINT_COVERAGE=1 for line by line breakdown
[+] ExpoSE Finished. 1 paths, 1 errors
jawline commented 4 years ago

Thanks for the report, could you rerun npm test with the EXPOSE_PRINT_PATHS=1 environment variable set? That will give me the debug info I need.

artem-barmin-dev commented 4 years ago

Thanks for hint! It helped. After exposing full error I was able to find cause and recompiled child dependencies. You should probably just print errors in case if they can't be parsed as JSON.


[+] ExpoSE /Users/artem/Work/ExpoSE/tests/bool/hello.js concurrent: 4 timeout: 7200000 per-test: 2400000
[\] [0 done /0 queued / 1 running / 0 errors / 0% coverage ] ***/Users/artem/Work/ExpoSE/Analyser/node_modules/bindings/bindings.js:91
  throw err
  ^

Error: Could not locate the bindings file. Tried:
 → /Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/build/ffi_bindings.node
 → /Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/build/Debug/ffi_bindings.node
 → /Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/build/Release/ffi_bindings.node
 → /Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/out/Debug/ffi_bindings.node
 → /Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/Debug/ffi_bindings.node
 → /Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/out/Release/ffi_bindings.node
 → /Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/Release/ffi_bindings.node
 → /Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/build/default/ffi_bindings.node
 → /Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/compiled/7.5.0/darwin/x64/ffi_bindings.node
    at bindings (/Users/artem/Work/ExpoSE/Analyser/node_modules/bindings/bindings.js:88:9)
    at Object.<anonymous> (/Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/lib/bindings.js:2:37)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/artem/Work/ExpoSE/Analyser/node_modules/ffi/lib/ffi.js:10:16)
[|] [1 done /0 queued / 0 running / 1 errors / 0% coverage ] ***
[+] {"_bound":0} took 0.742s
[!] Exception E: SyntaxError: Unexpected end of JSON input of coverage data on 
[!] Exception E: SyntaxError: Unexpected end of JSON input of test data on 
[!] Exit code non-zero
[!] Error extracting final output - a fatal error must have occured
[!] expoSE replay '/Users/artem/Work/ExpoSE/tests/bool/hello.js' '{"_bound":0}'
[!] Stats
[!] Done
[+] Total Lines Of Code 0
[+] Total Coverage: NaN%
[+] EXPOSE_PRINT_COVERAGE=1 for line by line breakdown
[+] ExpoSE Finished. 1 paths, 1 errors```