Bug 906525 - Re-enable PJS timeout tests. (r=nmatsakis)
authorShu-yu Guo <shu@rfrn.org>
Tue, 22 Apr 2014 14:13:15 -0700
changeset 179658 31b79b2c4a7a1afb3c521a74564a520bf044cbd8
parent 179657 c2672cd82c959f0289b759a1fb63eb790ba3ed14
child 179659 95391b25bc110b66652ced35c86f993a776b4952
push id26635
push usercbook@mozilla.com
push dateWed, 23 Apr 2014 12:51:44 +0000
treeherdermozilla-central@b747c35ac54b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnmatsakis
bugs906525
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 906525 - Re-enable PJS timeout tests. (r=nmatsakis)
js/src/jit-test/tests/parallel/gc-timeout.js
js/src/jit-test/tests/parallel/timeout.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/parallel/gc-timeout.js
@@ -0,0 +1,27 @@
+// |jit-test| exitstatus: 6;
+
+// One sneaky way to run GC during a parallel section is to invoke the
+// gc() function during the parallel timeout!
+
+load(libdir + "parallelarray-helpers.js");
+
+function iterate(x) {
+  while (x == 2046) {
+    // for exactly one index, this infinitely loops!
+    // this ensures that the warmup doesn't loop.
+  }
+  return 22;
+}
+
+function timeoutfunc() {
+  print("Timed out, invoking the GC");
+  gc();
+  return false;
+}
+
+timeout(1, timeoutfunc);
+
+if (getBuildConfiguration().parallelJS)
+  Array.buildPar(2048, iterate);
+else
+  while(true);
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/parallel/timeout.js
@@ -0,0 +1,17 @@
+// |jit-test| exitstatus: 6;
+
+load(libdir + "parallelarray-helpers.js");
+
+function iterate(x) {
+  while (x == 2046) {
+    // for exactly one index, this infinitely loops!
+    // this ensures that the warmup doesn't loop.
+  }
+  return 22;
+}
+
+timeout(1);
+if (getBuildConfiguration().parallelJS)
+  Array.buildPar(2048, iterate);
+else
+  while (true);