Files
mbedtls/tests/suites
Gilles Peskine 4877c0838d Fix an infinite loop if cleanup fails in some tests
Don't call a macro that does `goto exit` on failure after the `exit:` label:
that would cause an infinite loop if something does go wrong.

Generally, cleanup functions don't error out, so it is unlikely to be a
problem in practice. If an error does happen during cleanup, it's probably
due to memory corruption caused by a bug that happened earlier, and that is
likely to have been detected in an earlier function. So we don't really need
to assert the return code of functions called during cleanup, and normally
we don't. Only a few places did so, wrongly.

I found the problematic places with
```
ag 'exit:[^}]*(PSA_ASSERT|TEST_ASSERT|TEST_EQUAL)' tests/suites/*.function
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-10 11:48:46 +02:00
..
2026-03-03 15:19:58 +01:00
2024-01-16 18:38:55 +00:00
2024-01-16 16:27:34 +00:00
2023-07-27 14:17:27 +01:00
2024-02-01 13:54:46 +00:00
2023-07-27 14:17:27 +01:00
2023-07-27 14:17:27 +01:00
2023-07-27 16:02:42 +01:00
2023-07-27 14:17:27 +01:00
2024-05-23 21:43:55 +02:00
2023-03-31 18:04:34 +01:00
2026-03-26 21:48:57 +00:00