nuttx-apps/testing/ltp
Marco Casaroli 795ea8d534 testing, system: do not build tests that call fork() where it is absent.
Two places call fork() from code that is compiled unconditionally, which is
fine only for as long as every architecture provides it.  NuttX is splitting
fork() into three primitives -- see apache/nuttx#19562 -- after which
ARCH_HAVE_FORK announces POSIX fork() specifically, and is off until an
architecture implements it.  Both then fail to link.  Each is dropped only
where ARCH_HAVE_FORK is unset, so builds that have fork() are unaffected.

system/libuv: test-fork.c and test-pipe-close-stdout-read-stdin.c are
filtered out of the test-*.c glob.  Nothing is lost even where they are
dropped: every test they define is already excluded from the task list on
NuttX by 0001-libuv-port-for-nuttx.patch, which extends the _WIN32 guards
around them to __NuttX__ -- all nine fork_* entries and
pipe_close_stdout_read_stdin.  They are compiled today but never run.

testing/ltp: the open_posix_testsuite is filtered through LTP's existing
BLACKWORDS mechanism, which already drops tests for absent features and is
already conditioned on configuration symbols.  The pattern spares vfork()
and task_fork().  Where fork() is absent this drops 278 of 1943 test files;
those tests exercise fork() and cannot link without it, and they return per
architecture as fork() lands.

Against today's master this is a no-op: ARCH_HAVE_FORK is set everywhere, so
neither filter drops anything.  It is part of what lets the NuttX side build
against apps master.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-08-03 09:22:39 -03:00
..
.gitignore testing/ltp: add ltp zip file to gitignore 2025-12-05 17:53:57 +01:00
0001-pthread_rwlock_unlock-follow-linux.patch ltp/makefile: apply that patch that to fix the build warning in ltp 2023-09-03 22:12:57 +08:00
0002-Use-ifdef-instead-of-if-for-__linux__.patch ltp/makefile: apply that patch that to fix the build warning in ltp 2023-09-03 22:12:57 +08:00
0003-LTP-Re-init-static-variable-to-avoid-errors-during-m.patch ltp/makefile: apply that patch that to fix the build warning in ltp 2023-09-03 22:12:57 +08:00
0004-test-update-ltp-test-case.patch ltp/makefile: apply that patch that to fix the build warning in ltp 2023-09-03 22:12:57 +08:00
0005-ltp-update-pthread_cond_timedwait-testcase.patch ltp/makefile: apply that patch that to fix the build warning in ltp 2023-09-03 22:12:57 +08:00
0006-test-modified-ltp-rwlock-need-init.patch ltp/makefile: apply that patch that to fix the build warning in ltp 2023-09-03 22:12:57 +08:00
0007-pthread_kill-add-usleep-aviod-semcount-overturn.patch ltp/makefile: apply that patch that to fix the build warning in ltp 2023-09-03 22:12:57 +08:00
0008-test-ltp-fix-ltp_interfaces_sigaction_23_10-deadloop.patch ltp/makefile: apply that patch that to fix the build warning in ltp 2023-09-03 22:12:57 +08:00
0009-ltp-modify-user-code-for-fdcheck-compatibility.patch ltp/makefile: apply that patch that to fix the build warning in ltp 2023-09-03 22:12:57 +08:00
0010-ltp-fix-build-warning.patch ltp/makefile: apply that patch that to fix the build warning in ltp 2023-09-03 22:12:57 +08:00
0011-ltp-fix-the-proc.h-header-file-duplicate-inclusion.patch ltp: fix the link error raised by "proc.h" inclusion error 2024-08-18 20:00:57 +08:00
0012-ltp-fix-build-error.patch ltp: fix the build warning 2024-08-18 20:00:57 +08:00
CMakeLists.txt testing, system: do not build tests that call fork() where it is absent. 2026-08-03 09:22:39 -03:00
config.h testing: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Kconfig testing/ltp: Increase Stack Size 2024-12-17 02:20:15 +08:00
Make.defs testing: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Makefile testing, system: do not build tests that call fork() where it is absent. 2026-08-03 09:22:39 -03:00