Skip to content

Commit 86c1953

Browse files
committed
Fixed a bug when only one core was selected and a random test order was selected.
Also fixed bug when no valid core could be selected.
1 parent f298508 commit 86c1953

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

script-corecycler.ps1

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.AUTHOR
33
sp00n
44
.VERSION
5-
0.9.6.1
5+
0.9.6.2
66
.DESCRIPTION
77
Sets the affinity of the selected stress test program process to only one
88
core and cycles through all the cores which allows to test the stability of
@@ -17,7 +17,7 @@
1717

1818

1919
# Our current version
20-
$version = '0.9.6.1'
20+
$version = '0.9.6.2'
2121

2222

2323
# This defines the strict mode
@@ -9820,7 +9820,7 @@ try {
98209820
# Randomized
98219821
elseif ($coreTestOrderMode -eq 'random') {
98229822
Write-Verbose('Random test order selected, building the test order array...')
9823-
[System.Collections.ArrayList] $coreTestOrderArray = ($coreTestOrderArray | Sort-Object { Get-Random })
9823+
[System.Collections.ArrayList] $coreTestOrderArray = @(@($coreTestOrderArray) | Sort-Object { Get-Random })
98249824
}
98259825

98269826
# Custom
@@ -9846,6 +9846,9 @@ try {
98469846
Write-Debug('The number of cores with a WHEA error: ' + $numCoresWithWheaError)
98479847

98489848

9849+
if (@($coreTestOrderArray).Count -lt 1) {
9850+
Exit-WithFatalError('No valid core to test selected!')
9851+
}
98499852

98509853

98519854
# Iterate over each core

0 commit comments

Comments
 (0)