Repository navigation
testing/drivertest: Run all framebuffer cases and select one via cmocka - #4006
Merged
Merged
Conversation
Register all four framebuffer testcases in main() and drop the private -t <number> option. A single case can now be selected with the cmocka runner's own filter, e.g. "cmocka -s cmocka_driver_framebuffer -t drivertest_framebuffer_white", and running the program directly executes every case. Update the usage text accordingly and remove the macros that were only used by the old option parsing. Signed-off-by: duxiaoliang <duxiaoliang@xiaomi.com>
Add the blank lines required after declarations. Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
xiaoxiang781216
approved these changes
Nov 11, 2026
GUIDINGLI
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
drivertest_framebufferselected a testcase with a private-t <number>option and ran only case 0 by default. Register all four cases in
main()and drop that option. A single case is now selected with thecmocka runner's own filter:
Running
cmocka_driver_framebuffer -p <devpath>directly runs every case.The usage text is updated, and the macros that only served the old option
parsing are removed.
A second commit fixes existing nxstyle errors in the file (missing blank
lines after declarations).
checkpatch.shchecks whole files, so theywould otherwise fail CI.
Impact
testing/drivers/drivertest/drivertest_framebuffer.c.-t <number>is removed, and running the programwithout a filter now runs all four cases instead of case 0.
Testing
066314c6373, nuttx-appsee3d67104plus this PRsim:nshplusCONFIG_SIM_X11FB,CONFIG_VIDEO_FB,CONFIG_TESTING_CMOCKA,CONFIG_TESTING_CMOCKA_PROG,CONFIG_TESTING_DRIVER_TEST(andCONFIG_ALLOW_MIT_COMPONENTSforregex). Clean build: no warnings.
checkpatch.sh -c -u -m -gon the commits, and-fon the file: pass.