Skip to content

Commit

Permalink
Add failure indication in testCluster
Browse files Browse the repository at this point in the history
  • Loading branch information
Scheremo committed Oct 17, 2024
1 parent 8c9e2a2 commit fc4ec2b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sw/tests/testCluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ int main() {
clusterMemPtr = (volatile int32_t *)CLUSTERMEMORYSTART;
for (int i = 0; i < NUMCLUSTERS; i++) {
result = *(clusterMemPtr);
ret += (result == TESTVAL);
if (result == TESTVAL) {
ret += 1;
} else {
ret += 1 << (NUMCLUSTERS+i);
}
clusterMemPtr += CLUSTERDISTANCE / 4;
}

if (ret == NUMCLUSTERS) {
if ((ret & ((1 << NUMCLUSTERS)-1)) == NUMCLUSTERS) {
return 0;
}

Expand Down

0 comments on commit fc4ec2b

Please sign in to comment.