task_* APIs are unavailable in kernel build mode, replacing with
posix_spawn or pthread_* API to pass the case. But posix_spawn requires
some dependency, for example CONFIG_BUILTIN and CONFIG_LIBC_EXECFUNCS,
so pthread_* APIs are used in most scenarios. Some tests should be
re-visited because the intent is to user another task (in this case
another process) to e.g. receive signals.
That will require quite a bit of extra work.
Tests that had to be disabled:
- restart: task_restart() does not work at all with kernel mode so it is
disabled entirely
- fpu: make sure the FPU test is not even attempted, because it will cause
ASSERT() and stop the test
- vfork: vfork() does not work for some reason in CONFIG_BUILD_KERNEL,
there is something missing on the kernel side, so just disable the test for now
Tests that should be re-visited:
- The signal tests, now they signal the process itself while before the
signal was sent to another task. This will require building the part
that receives the signal as a separate process
- waitpid: Like stated above, waitpid does not work for pthreads
- suspend: kill to send signal does not work for pthreads
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
Co-authored-by: Ville Juven <ville.juven@unikie.com>