Issue #200: added regression tests jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 11 Apr 2018 14:58:09 +0100
branchjv
changeset 1968 6d251802f109
parent 1967 520545b0b5d9
child 1971 de93bc901dba
Issue #200: added regression tests Note that these tests are skipped on systems with less than 10GB physical RAM. The reason is that this bug only manifested on systems with > 6GB RAM. https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
RegressionTests__VMCrashTests.st
--- a/RegressionTests__VMCrashTests.st	Tue Mar 27 09:18:33 2018 +0100
+++ b/RegressionTests__VMCrashTests.st	Wed Apr 11 14:58:09 2018 +0100
@@ -4,12 +4,52 @@
 
 VMCrashTestCase subclass:#VMCrashTests
 	instanceVariableNames:'x y'
-	classVariableNames:''
+	classVariableNames:'SkipIssue200'
 	poolDictionaries:''
 	category:'tests-Regression-RuntimeSystem'
 !
 
 
+!VMCrashTests class methodsFor:'initialization'!
+
+initialize
+    "Invoked at system start or when the class is dynamically loaded."
+
+    "/ Following hack is to make tests for Issue #200 run on
+    "/ JV's machine but noone else.
+
+    SkipIssue200 := (#('sao' 'win7') includes: OperatingSystem getHostName) not
+
+    "
+    SkipIssue200 := true.
+    SkipIssue200 := false.
+    "
+
+    "Modified (comment): / 23-05-2018 / 14:46:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+skipIssue200
+    ^ SkipIssue200
+
+    "
+    SkipIssue200 := true.
+    SkipIssue200 := false.
+    "
+
+    "Created: / 23-05-2018 / 14:45:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+skipIssue200: aBoolean
+    SkipIssue200 := aBoolean
+
+    "
+    SkipIssue200 := true.
+    SkipIssue200 := false.
+    "
+
+    "Created: / 23-05-2018 / 14:45:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !VMCrashTests methodsFor:'private'!
 
 childOf: aSimpleView withUUID: aUUIDOrString
@@ -774,6 +814,36 @@
 
 !VMCrashTests methodsFor:'tests - regression'!
 
+iter_issue_200: class
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    | t e |
+
+    "
+    SkipIssue200 := true.
+    SkipIssue200 := false.
+    "
+    self skipIf: SkipIssue200 description: 'Skipped bu default since it may crash systems with less memory (especially Linux)'.
+    self skipIf: ((OperatingSystem getSystemInfo includesKey: #physicalRam) not or:[(OperatingSystem getSystemInfo at: #physicalRam) < (10 * 1024 * 1024 * 1024)]) description: 'This bug required > 6GB RAM physical to manifest'.
+
+    t := class new: 46. 
+    Stdout nextPutLine: class name.
+    [ 
+        1 to: 64 do:[:i | 
+            Stdout nextPutLine: 'Iteration ', i printString , ' - ', (t size*2) printString. 
+            t := t , t.
+        ] 
+    ] on: Error do:[:ex | 
+        Stdout nextPutLine: ex description.
+        e := ex.
+    ]. 
+    self assert: e class == AllocationFailure
+
+    "Created: / 12-04-2018 / 11:20:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (format): / 23-05-2018 / 14:46:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 test_issue_197a
     "
     https://swing.fit.cvut.cz/projects/stx-jv/ticket/197
@@ -788,6 +858,138 @@
     OperatingSystem primGetFileAttributes: path
 
     "Created: / 27-03-2018 / 09:05:57 / jv"
+!
+
+test_issue_200_Array
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: Array
+
+    "Created: / 12-04-2018 / 11:21:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_200_ByteArray
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: ByteArray
+
+    "Created: / 12-04-2018 / 11:21:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_200_DoubleArray
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: DoubleArray
+
+    "Created: / 12-04-2018 / 11:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_200_FloatArray
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: FloatArray
+
+    "Created: / 12-04-2018 / 11:23:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_200_IntegerArray
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: IntegerArray
+
+    "Created: / 12-04-2018 / 11:22:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_200_LongIntegerArray
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: LongIntegerArray
+
+    "Created: / 12-04-2018 / 11:21:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_200_SignedIntegerArray
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: SignedIntegerArray
+
+    "Created: / 12-04-2018 / 11:22:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_200_SignedLongIntegerArray
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: SignedLongIntegerArray
+
+    "Created: / 12-04-2018 / 11:21:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_200_String
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: String
+
+    "Created: / 12-04-2018 / 11:21:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_200_Unicode16String
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: Unicode16String.
+
+    "Created: / 12-04-2018 / 11:17:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_200_Unicode32String
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
+    "
+    <spawn: true>
+    <timeout: 660> "11min" 
+
+    self iter_issue_200: Unicode32String.
+
+    "Created: / 12-04-2018 / 11:21:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !VMCrashTests class methodsFor:'documentation'!
@@ -805,3 +1007,5 @@
     ^ '$Changeset: <not expanded> $'
 ! !
 
+
+VMCrashTests initialize!