casaroli opened a new pull request, #20839:
URL: https://github.com/apache/nuttx/pull/20839

   ## Summary
   
   libc does not build `popen()`, `pclose()`, `dpopen()` and `dpclose()` when 
`CONFIG_SYSTEM_POPEN` selects the copy in `apps/system/popen` ([1/5] 
apache/nuttx#20778). [4/5] apache/nuttx-apps#3890 removes that copy and the 
option from apps, so this PR removes the check from `libs/libc/stdio` and 
`libs/libc/unistd` (Make.defs and CMakeLists.txt).
   
   The second commit removes the documentation page of `apps/system/popen` and 
describes the libc functions in a new page of the libc documentation: the 
options they need, the shell they start, and how they start a command when 
there is no shell.
   
   ## Impact
   
   No change for configurations without `CONFIG_SYSTEM_POPEN`, which are all 
configurations after [3/5] apache/nuttx#20792 and [4/5]. With an older apps 
tree that still sets `CONFIG_SYSTEM_POPEN=y`, both copies are compiled; the 
link takes the apps copy, as before.
   
   ## Testing
   
   Built with [4/5] (apps); in each, libc builds `lib_popen.o` and 
`lib_dpopen.o`, and no option of the defconfig is lost after `make 
olddefconfig`:
   
   | Configuration | Result |
   |---|---|
   | `qemu-armv8a:fastboot` | builds, `CONFIG_SYSTEM_FASTBOOTD_SHELL=y` |
   | `sabre-6quad:citest`, `rv-virt:citest`, `rv-virt:citest64` | build, 
`CONFIG_EXAMPLES_POPEN=y` |
   | `lx_cpu:nsh` | builds |
   | `esp32s3-devkit:fastboot`, `:fastboot_tcp`, `:fastboot_usb`, 
`lckfb-szpi-esp32s3:fastboot`, `:fastboot_tcp`, `:fastboot_usb` | build, 
`CONFIG_SYSTEM_FASTBOOTD_SHELL=y` |
   | `sim:citest`, `sim:quickjs` (x86_64 Linux in Docker) | build, 
`CONFIG_EXAMPLES_POPEN=y` in `sim:citest` |
   | `qemu-intel64:citest_smp` (x86_64 Linux in Docker) | builds, 
`CONFIG_EXAMPLES_POPEN=y` |
   
   `sim:sqlite` was not built: the build host has no `tclsh`, which the SQLite 
build needs.
   
   Runtime on `qemu-armv8a:knsh` and `qemu-armv8a:nsh` (QEMU with HVF) with 
`CONFIG_TESTING_POPEN` and `CONFIG_EXAMPLES_POPEN`: `popen_test` ends with `=== 
Results: 0 failed ===` (8 tests), and the `popen` example reads the output of 
`help` and exits with 0.
   
   With apps master (`system/popen` still present) and `CONFIG_SYSTEM_POPEN=y` 
on `qemu-armv8a:nsh`: both copies compile, the image links without errors and 
has one `popen()`, the apps copy.
   
   `tools/checkpatch.sh -c -u -m -g` passes.
   
   depends-on: [apache/nuttx-apps/pull/3890]
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to