mirror of https://github.com/rusefi/rusefi.git
check for overflow in HW CI (#3313)
This commit is contained in:
parent
39e2cf11ef
commit
26d9f004c9
|
@ -166,6 +166,10 @@ static void cmd_threads(void) {
|
|||
int freeBytes = CountFreeStackSpace(tp->wabase);
|
||||
efiPrintf("%s\t%08x\t%lu\t%d", tp->name, tp->wabase, tp->time, freeBytes);
|
||||
|
||||
if (freeBytes < 100) {
|
||||
firmwareError(OBD_PCM_Processor_Fault, "Ran out of stack on thread %s, %d bytes remain", tp->name, freeBytes);
|
||||
}
|
||||
|
||||
tp = chRegNextThread(tp);
|
||||
}
|
||||
|
||||
|
|
|
@ -458,6 +458,12 @@ public class CommonFunctionalTest extends RusefiTestBase {
|
|||
assertWaveNull("hard limit check", chart, EngineChart.INJECTOR_1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStackOverflow() {
|
||||
// This ECU command has a built in check to make sure no threads are near overflow
|
||||
ecu.sendCommand("threadsinfo");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method waits for longer then usual.
|
||||
* todo: inline this method? complex and less complex seem to have same timeout these days?
|
||||
|
|
Loading…
Reference in New Issue