-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Driver test issue fix #2951
Driver test issue fix #2951
Conversation
Signed-off-by: tengshuangshuang <[email protected]>
…int to a stack space ==1805058==ERROR: AddressSanitizer: heap-use-after-free on address 0xe18126a0 at pc 0x52b06320 bp 0xd7b13ee8 sp 0xd7b13ed8 READ of size 1 at 0xe18126a0 thread T0 #0 0x52b0631f in tre_parse regex/regcomp.c:1356 apache#1 0x52b2b1d0 in regcomp regex/regcomp.c:3710 apache#2 0x48f55435 in c_regexmatch cmocka/src/cmocka.c:494 apache#3 0x48f65bcf in _cmocka_run_group_tests cmocka/src/cmocka.c:3252 apache#4 0x48f67e2d in cmocka_fs_test_main apps/testing/testsuites/kernel/fs/cmocka_fs_test.c:201 apache#5 0x46210b2a in nxtask_startup sched/task_startup.c:72 apache#6 0x45ff40fb in nxtask_start task/task_start.c:116 apache#7 0x462695bb in pre_start sim/sim_initialstate.c:52 Signed-off-by: zhangshoukui <[email protected]>
cmocka_driver_gpio //gpio input/output is tested by default cmocka_driver_gpio -a /dev/gpio0 -b /dev/gpio1 -l // test loop cmocka_driver_gpio -a /dev/gpio0 -b /dev/gpio0 // gpio input/output is tested by default Signed-off-by: zhangshoukui <[email protected]>
[Experimental Bot, please feedback here] This PR does not fully meet the NuttX requirements. While it provides some information, it lacks crucial details. Here's a breakdown:
Example of how to improve the PR description: SummaryThis PR fixes two issues related to the GPIO driver test in the simulator:
Related NuttX Issue: [If applicable, link to the related issue] Impact
TestingI confirm that changes are verified on local setup and works as intended:
Testing logs before change:
Testing logs after change:
By providing more specific information, the PR becomes much easier to review and understand, increasing its chances of being accepted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Zhangshoukui :-)
Summary
1.Fixed skipped logic errors
2.Fix the GPIO test sim error
Impact
driver test
Testing
./tools/configure.sh -l sim:citest
make -j20
nsh> cmocka_driver_gpio
[==========] tests: Running 1 test(s).
[ RUN ] drivertest_gpio
[input and output test] outvalue is 1, invalue is 1
[input and output test] outvalue is 0, invalue is 0
[input and output test] outvalue is 0, invalue is 0
[input and output test] outvalue is 0, invalue is 0
[input and output test] outvalue is 1, invalue is 1
[input and output test] outvalue is 0, invalue is 0
[input and output test] outvalue is 0, invalue is 0
[input and output test] outvalue is 0, invalue is 0
[input and output test] outvalue is 1, invalue is 1
[input and output test] outvalue is 1, invalue is 1
[ OK ] drivertest_gpio
[==========] tests: 1 test(s) run.
[ PASSED ] 1 test(s).