1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
From: Simon McVittie <smcv@debian.org>
Date: Mon, 21 Feb 2022 00:09:10 +0000
Subject: tests: Accept "out of memory" as close enough to "allocation size
overflow"
On weaker machines like Debian's mipsel porterbox eller, some of these
tests will run out of memory before the allocation size can overflow.
Signed-off-by: Simon McVittie <smcv@debian.org>
Bug-Debian: #1006196
---
js/src/tests/non262/Array/regress-157652.js | 6 +++---
js/src/tests/non262/Array/regress-330812.js | 6 +++---
js/src/tests/non262/extensions/regress-336409-1.js | 6 +++---
js/src/tests/non262/regress/regress-303213.js | 6 +++---
js/src/tests/non262/regress/regress-422348.js | 4 ++--
5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/js/src/tests/non262/Array/regress-157652.js b/js/src/tests/non262/Array/regress-157652.js
index fd48df3..af6d362 100644
--- a/js/src/tests/non262/Array/regress-157652.js
+++ b/js/src/tests/non262/Array/regress-157652.js
@@ -84,7 +84,7 @@
//-----------------------------------------------------------------------------
var BUGNUMBER = 157652;
var summary = "Testing that Array.sort() doesn't crash on very large arrays";
-var expect = 'No Crash';
+var expect = /No Crash/;
var actual = 'No Crash';
printBugNumber(BUGNUMBER);
@@ -110,8 +110,8 @@ try
catch(ex)
{
// handle changed 1.9 branch behavior. see bug 422348
- expect = 'InternalError: allocation size overflow';
+ expect = /InternalError: allocation size overflow|out of memory/;
actual = ex + '';
}
-reportCompare(expect, actual, summary);
+reportMatch(expect, actual, summary);
diff --git a/js/src/tests/non262/Array/regress-330812.js b/js/src/tests/non262/Array/regress-330812.js
index 82715b2..1d276b9 100644
--- a/js/src/tests/non262/Array/regress-330812.js
+++ b/js/src/tests/non262/Array/regress-330812.js
@@ -8,7 +8,7 @@
var BUGNUMBER = 330812;
var summary = 'Making Array(1<<29).sort() less problematic';
var actual = 'No Crash';
-var expect = 'No Crash';
+var expect = /No Crash/;
printBugNumber(BUGNUMBER);
printStatus (summary);
@@ -26,8 +26,8 @@ try
catch(ex)
{
// handle changed 1.9 branch behavior. see bug 422348
- expect = 'InternalError: allocation size overflow';
+ expect = /InternalError: allocation size overflow|out of memory/;
actual = ex + '';
}
-reportCompare(expect, actual, summary);
+reportMatch(expect, actual, summary);
diff --git a/js/src/tests/non262/extensions/regress-336409-1.js b/js/src/tests/non262/extensions/regress-336409-1.js
index 1f03dfd..2d65a68 100644
--- a/js/src/tests/non262/extensions/regress-336409-1.js
+++ b/js/src/tests/non262/extensions/regress-336409-1.js
@@ -8,7 +8,7 @@
var BUGNUMBER = 336409;
var summary = 'Integer overflow in js_obj_toSource';
var actual = 'No Crash';
-var expect = 'No Crash';
+var expect = /No Crash/;
printBugNumber(BUGNUMBER);
printStatus (summary);
@@ -42,9 +42,9 @@ try
}
catch(ex)
{
- expect = 'InternalError: allocation size overflow';
+ expect = /InternalError: allocation size overflow|out of memory/
actual = ex + '';
print(actual);
}
-reportCompare(expect, actual, summary);
+reportMatch(expect, actual, summary);
diff --git a/js/src/tests/non262/regress/regress-303213.js b/js/src/tests/non262/regress/regress-303213.js
index d01c28d..835f49e 100644
--- a/js/src/tests/non262/regress/regress-303213.js
+++ b/js/src/tests/non262/regress/regress-303213.js
@@ -8,7 +8,7 @@
var BUGNUMBER = 303213;
var summary = 'integer overflow in js';
var actual = 'No Crash';
-var expect = 'No Crash';
+var expect = /No Crash/;
printBugNumber(BUGNUMBER);
printStatus (summary);
@@ -49,8 +49,8 @@ try
catch(ex)
{
// handle changed 1.9 branch behavior. see bug 422348
- expect = 'InternalError: allocation size overflow';
+ expect = /InternalError: allocation size overflow|out of memory/;
actual = ex + '';
}
-reportCompare(expect, actual, summary);
+reportMatch(expect, actual, summary);
diff --git a/js/src/tests/non262/regress/regress-422348.js b/js/src/tests/non262/regress/regress-422348.js
index 7be60ba..d4b0e14 100644
--- a/js/src/tests/non262/regress/regress-422348.js
+++ b/js/src/tests/non262/regress/regress-422348.js
@@ -20,7 +20,7 @@ function test()
printBugNumber(BUGNUMBER);
printStatus (summary);
- expect = 'InternalError: allocation size overflow';
+ expect = /InternalError: allocation size overflow|out of memory/;
try
{
Array(1 << 30).sort();
@@ -31,5 +31,5 @@ function test()
actual = ex + '';
}
- reportCompare(expect, actual, summary);
+ reportMatch(expect, actual, summary);
}
|