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>
If the same signal is quickly repeated multiple times, the signal may be ignored.
In SMP since we cannot control thread scheduling to ensure timely signal processing,
it is best to use semaphores to wait for signal processing to complete, which can also shorten the ostest time
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Summary:
- This commit adds ASSERT in case of errors to stop the
execution of ostest
- Also, add some 'ERROR' messages
Impact:
- None
Testing:
- Run ostest with several configs
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Gregory Nutt is has submitted the SGA
Mark Schulte has submitted the ICLA
Ken Pettit has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro
Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>