Skip to content

Commit f3e180d

Browse files
committed
CXX: removed exception windowspill test
This test randomly fails in CI. Hence the removal until further investigation. The original issue the test was addressing has been fixed in our gcc; it has also been confirmed and fixed in the upstream gcc. This test only crashes at the end of the test function so it is reasonable to assume that it should be safe removing it so far, ie., the test doesn't reveal a problem with the original fix but a different one. Opening an Jira issue IDFCI-76 for the further investigation
1 parent 4a0a331 commit f3e180d

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

components/cxx/test/test_cxx.cpp

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -251,60 +251,6 @@ TEST_CASE("c++ exceptions emergency pool", "[cxx] [exceptions] [ignore] [leaks="
251251
#endif
252252
}
253253

254-
255-
#define TIMEOUT 19
256-
257-
#define RECURSION 19
258-
259-
static esp_timer_handle_t crash_timer;
260-
261-
static uint32_t result = 0;
262-
263-
uint32_t calc_fac(uint32_t n) {
264-
if (n == 1 || n == 0) {
265-
return 1;
266-
} else {
267-
return n * calc_fac(n - 1);
268-
}
269-
}
270-
271-
static void timer_cb(void *arg) {
272-
result = calc_fac(RECURSION);
273-
}
274-
275-
// TODO: Not a unit test, refactor to integration test/system test, etc.
276-
TEST_CASE("frequent interrupts don't interfere with c++ exceptions", "[cxx] [exceptions] [leaks=" LEAKS "]")
277-
{// if exception workaround is disabled, this is almost guaranteed to fail
278-
const esp_timer_create_args_t timer_args {
279-
timer_cb,
280-
NULL,
281-
ESP_TIMER_TASK,
282-
"crash_timer"
283-
};
284-
285-
TEST_ESP_OK(esp_timer_create(&timer_args, &crash_timer));
286-
TEST_ESP_OK(esp_timer_start_periodic(crash_timer, TIMEOUT));
287-
288-
for (int i = 0; i < 500; i++) {
289-
bool thrown_value = false;
290-
try {
291-
throw true;
292-
} catch (bool e) {
293-
thrown_value = e;
294-
}
295-
296-
if (thrown_value) {
297-
printf("ex thrown %d\n", i);
298-
} else {
299-
printf("ex not thrown\n");
300-
TEST_ASSERT(false);
301-
}
302-
}
303-
304-
TEST_ESP_OK(esp_timer_stop(crash_timer));
305-
TEST_ESP_OK(esp_timer_delete(crash_timer));
306-
}
307-
308254
#else // !CONFIG_COMPILER_CXX_EXCEPTIONS
309255

310256
TEST_CASE("std::out_of_range exception when -fno-exceptions", "[cxx][reset=abort,SW_CPU_RESET]")

0 commit comments

Comments
 (0)