13022591351 opened a new pull request, #3759:
URL: https://github.com/apache/nuttx-apps/pull/3759
## Summary
* Extend the existing ostest work queue coverage to dynamically created
queues with one and two workers.
* Run scheduler queues and custom queues in Flat builds, and libc custom user
queues in non-Flat builds.
* Add `ostest wqueue` as a focused entry without changing the original
no-argument ostest flow.
* Cover explicit caller priorities, invalid arguments, periodic requeue,
pending replacement, synchronous and parallel cancellation, multiple
simultaneous queues, self-destruction rejection, and teardown.
* Check work queue and semaphore API results and release all local test
resources.
* Depends on apache/nuttx#19982.
## Impact
* New feature: **YES**, test coverage for custom scheduler and libc user work
queues.
* User adaptation: **NO**. The no-argument ostest sequence remains unchanged
in non-Flat builds; the focused test is selected with `ostest wqueue`.
* Build process: **NO**. `CONFIG_TESTING_OSTEST_WQUEUE` defaults to enabled
only when its pthread and work queue dependencies are available.
* Hardware: **NO** production hardware behavior is changed.
* Documentation: **NO** separate application documentation is required; the
Kconfig help describes backend selection.
* Security: **NO** impact.
* Compatibility: Existing Flat ostest work queue coverage is retained and
expanded.
## Testing
Build host:
* Linux 6.8.0-60-generic, x86_64
* GNU Arm Embedded Toolchain 10.3.1 20210824
Target:
* ARM Cortex-M7, STM32H7, PX4 FMUv6C
* Apache nuttx-apps master `48ddaadad1499404addd891190f64cccf50008b2`
* Apache NuttX master plus apache/nuttx#19982
Before change:
```text
The ostest work queue source is selected only with CONFIG_SCHED_WORKQUEUE.
It has no focused command entry and cannot exercise libc custom user queues
in a Protected user process.
```
Build output after change:
```text
master_flat:
FLASH 1470396 B / 1920 KB (74.79%)
AXI_SRAM 63380 B / 512 KB (12.09%)
master_protected user:
uflash 751000 B / 1 MB (71.62%)
usram 8192 B / 384 KB (2.08%)
```
Runtime output summary:
```text
nsh> time "ostest wqueue"
Flat runs:
30.1490 / 30.1490 / 30.1480 s
Protected libc user runs:
15.6540 / 15.6540 / 15.6540 s
Every run:
API validation done
periodic calls = 3, expect = 3
replacement total = 2, expect = 2
sync cancel finished = 1, expect = 1
parallel callbacks = 2, expect = 2
multiple queues loop 1/4 through 4/4 done
self free result = -35, expect = -35
pending callback = 0, expect = 0
running callback = 1, expect = 1
teardown requeue rejected
teardown done
```
All three runs for each backend completed without assertion. Current heap
usage did not increase after the first run, and all custom workers exited.
Validation:
```text
checkpatch commit messages: pass
checkpatch complete patch range: pass
full-file nxstyle for wqueue.c and ostest_main.c: pass
cmake-format: pass
git diff --check: pass
```
## PR verification Self-Check
* [x] This PR introduces only one functional change.
* [x] I have updated all required description fields above.
* [x] My PR adheres to the contributing guidelines and coding standard.
* [ ] My PR is still work in progress.
* [x] My PR is ready for review and can be safely merged.
--
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]