fangxinyong ba075747be ostest: Add initial support for CONFIG_BUILD_KERNEL
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>
2023-12-27 10:01:05 -08:00
..
2023-03-16 12:00:28 +01:00
2023-03-16 12:00:28 +01:00
2023-03-16 12:00:28 +01:00
2023-03-16 12:00:28 +01:00
2023-08-09 15:07:25 +08:00
2023-03-16 12:00:28 +01:00
2023-04-24 09:55:54 +02:00
2023-04-24 09:55:54 +02:00
2023-05-16 11:59:08 +08:00
2023-03-16 12:00:28 +01:00
2023-03-16 12:00:28 +01:00
2023-09-16 00:08:34 +03:00
2023-03-16 12:00:28 +01:00
2023-03-16 12:00:28 +01:00
2023-03-16 12:00:28 +01:00
2023-03-16 12:00:28 +01:00
2023-03-16 12:00:28 +01:00