Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/posix/options/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
goto out;

free_timer:
k_mem_slab_free(&posix_timer_slab, (void *)&timer);
k_mem_slab_free(&posix_timer_slab, (void *)timer);

out:
return ret;
Expand Down
5 changes: 5 additions & 0 deletions tests/posix/timers/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ CONFIG_ZTEST=y

CONFIG_POSIX_AEP_CHOICE_BASE=y
CONFIG_POSIX_TIMERS=y

# Needed for timer_create() when using SIGEV_THREAD
CONFIG_DYNAMIC_THREAD=y
CONFIG_DYNAMIC_THREAD_POOL_SIZE=1
CONFIG_THREAD_STACK_INFO=y
12 changes: 1 addition & 11 deletions tests/posix/timers/src/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,4 @@ static void after(void *arg)
}
}

static void before(void *arg)
{
ARG_UNUSED(arg);

if (!IS_ENABLED(CONFIG_DYNAMIC_THREAD)) {
/* skip redundant testing if there is no thread pool / heap allocation */
ztest_test_skip();
}
}

ZTEST_SUITE(posix_timers, NULL, NULL, before, after, NULL);
ZTEST_SUITE(posix_timers, NULL, NULL, NULL, after, NULL);