Skip to content

Commit ab41d3a

Browse files
aescolarfabiobaltieri
authored andcommitted
Revert "tests/kernel/threads: Augment abort_from_isr test to detect FMW"
This reverts commit 3ef282b. This PR introduced 2 regressions in main CI: 71977 & 71978 Let's revert it by now to get main's CI passing again. Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent 17b4e6c commit ab41d3a

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

tests/kernel/threads/thread_apis/src/test_threads_cancel_abort.c

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,6 @@ static void offload_func(const void *param)
166166

167167
k_thread_abort(t);
168168

169-
/* Thread memory is unused now, validate that we can clobber it. */
170-
if (!IS_ENABLED(CONFIG_ARCH_POSIX)) {
171-
memset(t, 0, sizeof(*t));
172-
}
173-
174169
/* k_thread_abort() in an isr shouldn't affect the ISR's execution */
175170
isr_finished = true;
176171
}
@@ -206,19 +201,6 @@ ZTEST(threads_lifecycle, test_abort_from_isr)
206201
k_thread_join(&tdata, K_FOREVER);
207202
zassert_true(isr_finished, "ISR did not complete");
208203

209-
/* Thread struct was cleared after the abort, make sure it is
210-
* still clear (i.e. that the arch layer didn't write to it
211-
* during interrupt exit). Doesn't work on posix, which needs
212-
* the thread struct for its swap code.
213-
*/
214-
uint8_t *p = (uint8_t *)&tdata;
215-
216-
if (!IS_ENABLED(CONFIG_ARCH_POSIX)) {
217-
for (int i = 0; i < sizeof(tdata); i++) {
218-
zassert_true(p[i] == 0, "Free memory write to aborted thread");
219-
}
220-
}
221-
222204
/* Notice: Recover back the offload_sem: This is use for releasing
223205
* offload_sem which might be held when thread aborts itself in ISR
224206
* context, it will cause irq_offload cannot be used again.
@@ -266,5 +248,6 @@ ZTEST(threads_lifecycle, test_abort_from_isr_not_self)
266248
/* Simulate taking an interrupt which kills spwan thread */
267249
irq_offload(offload_func, (void *)tid);
268250

251+
k_thread_join(&tdata, K_FOREVER);
269252
zassert_true(isr_finished, "ISR did not complete");
270253
}

0 commit comments

Comments
 (0)