Skip to content
Snippets Groups Projects
  1. Feb 22, 2016
  2. Feb 20, 2016
  3. Feb 19, 2016
  4. Feb 18, 2016
  5. Feb 17, 2016
  6. Feb 13, 2016
  7. Feb 12, 2016
  8. Feb 10, 2016
    • Mike Pennisi's avatar
      Runner: Re-use lock to share access to stdout · b791cc4f
      Mike Pennisi authored
      When executing multiple tests in parallel, each "child" thread would
      write to the process's standard output buffer immediately upon test
      completion. Because thread execution order and instruction interleaving
      is non-deterministic, this made it possible for characters to be emitted
      out-of-order.
      
      When extended to support multiple concurrent threads, the runner was
      outfitted with a "log lock" dedicated to sharing access to the output
      file (when applicable). Re-use this lock when writing to standard out,
      ensuring proper ordering of test result messages.
      b791cc4f
    • Mike Pennisi's avatar
      Test runner: Avoid race condition · 21781289
      Mike Pennisi authored
      A recent extension to the test runner introduced support for running
      tests in parallel using multi-threading. Following this, the runner
      would incorrectly emit the "final report" before all individual test
      results.
      
      In order to emit the "final report" at the end of the output stream, the
      parent thread would initialize all children and wait for availability of
      a "log lock" shared by all children.
      
      According to the documentation on the "threading" module's Lock object
      [1]:
      
      > When more than one thread is blocked in acquire() waiting for the state
      > to turn to unlocked, only one thread proceeds when a release() call
      > resets the state to unlocked; which one of the waiting threads proceeds
      > is not defined, and may vary across implementations.
      
      This means the primitive cannot be used by the parent thread to reliably
      detect completion of all child threads.
      
      Update the parent to maintain a reference for each child thread, and to
      explicitly wait for every child thread to complete before emitting the
      final result.
      
      [1] https://docs.python.org/2/library/threading.html#lock-objects
      21781289
    • Mike Pennisi's avatar
      Promise: Add test for constructor access count · e3fae6ee
      Mike Pennisi authored
      Assert that the `constructor` property of the "this" value of
      `Promise.prototype.then` is accessed exactly once. This guards against
      implementations where repeated access is used instead of reference
      passing (possibly motivated by convenience).
      
      Repeated access of this kind was demonstrated by V8's implementation of
      the specification:
      
      https://bugs.chromium.org/p/v8/issues/detail?id=4539
      e3fae6ee
    • Mike Pennisi's avatar
      Promise: Add tests to disallow faulty optimization · 219bdc6f
      Mike Pennisi authored
      Add tests that assert behavior when a Promise is resolved with another
      Promise whose `then` method has been overridden. Because all objects
      with a `then` method are treated equivalently, the presence of a
      [[PromiseState]] internal slot should have no effect on program
      behavior.
      
      These tests guard against a faulty optimization originally implemented
      in V8:
      
      https://bugs.chromium.org/p/v8/issues/detail?id=3641
      219bdc6f
    • Mike Pennisi's avatar
      Reorganize tests for Annex B extensions · fbce4ea1
      Mike Pennisi authored
      The "mainline" tests in Test262 are converging on a more formal
      structure. Files are organized as tests for either either "language"
      (e.g. syntax-driven) or "built-in" (e.g. API-driven). "Language" test
      locations are themselves structured according to whether the syntactic
      form under test is an Expression or a Statement.
      
      To limit ambiguity when locating/adding tests, re-organize the tests for
      Annex B extensions to match this structure.
      fbce4ea1
  9. Feb 08, 2016
  10. Feb 05, 2016
Loading