commit | 082ca85b7ce06bf00a460b2efcbab801bfb8ec75 | [log] [tgz] |
---|---|---|
author | Tristan Honscheid <honscheid@google.com> | Thu Feb 10 16:41:22 2022 -0700 |
committer | Carles CufĂ <carles.cufi@nordicsemi.no> | Mon Mar 14 11:32:38 2022 +0100 |
tree | 07f282251d7b4a7d011eb9e8e901fcb188507502 | |
parent | 66e8eae66ab6ce3c1c38f11e15579e2b2d5fe314 [diff] |
ztest: bug: Add friendly name helper function for all phases The `handle_signal()` function in the new ztest API (`ztest_new.c`) uses an array of strings to lookup a friendly name for each test phase, but the array only has three elements despite there being six test phases. This can lead to an out-of-bounds issue. Replace the array with a helper function and switch statement. Signed-off-by: Tristan Honscheid <honscheid@google.com>