Skip to content
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

testing.ztest.error_hook: fails on lpcxpresso55s16_ns #35102

Closed
hakehuang opened this issue May 11, 2021 · 9 comments
Closed

testing.ztest.error_hook: fails on lpcxpresso55s16_ns #35102

hakehuang opened this issue May 11, 2021 · 9 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP platform: STM32 ST Micro STM32 priority: low Low impact/importance bug
Milestone

Comments

@hakehuang
Copy link
Collaborator

Describe the bug
assert error

To Reproduce
Steps to reproduce the behavior:

  1. cd tests/ztest/error_hook;mkdir build; cd build
  2. cmake -DBOARD=lpcxpresso55s16_ns ..
  3. make; make flash
  4. See error

Expected behavior
tes pass

Impact
ztest error_hook support

Logs and console output

testing.ztest.error_hook

    *** Booting Zephyr OS build zephyr-v2.5.0-3761-g730acbd6ed85  ***
    Running test suite error_hook_tests
    ===================================================================
    START - test_catch_assert_fail
    ASSERTION FAIL [a != ((void *)0)] @ WEST_TOPDIR/zephyr/tests/ztest/error_hook/src/main.c:41
    	parameter a should not be NULL!
    Caught assert failed
    Assert error expected as part of test case.
     PASS - test_catch_assert_fail in 0.17 seconds
    ===================================================================
    START - test_catch_fatal_error
    case type is 0
    ASSERTION FAIL [esf != ((void *)0)] @ WEST_TOPDIR/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:993
    	ESF could not be retrieved successfully. Shall never occur.
    Caught assert failed
    Assert failed was unexpected, aborting...
    ASSERTION FAIL [esf != ((void *)0)] @ WEST_TOPDIR/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:993
    	ESF could not be retrieved successfully. Shall never occur.
    Caught assert failed
    Assert failed was unexpected, aborting...

Environment (please complete the following information):

  • OS: (e.g. Linux, MacOS, Windows)
  • Toolchain (e.g Zephyr SDK, ...)
  • Commit SHA or Version used: v2.6.0-rc1
@hakehuang hakehuang added bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP labels May 11, 2021
@hakehuang
Copy link
Collaborator Author

@galak galak added this to the v2.6.0 milestone May 11, 2021
@FRASTM
Copy link
Collaborator

FRASTM commented May 11, 2021

Similar failure seen on the stm32g071 nucleo board (CortexM0plus) since the merge of the PR #33886
The test case test_catch_fatal_error of tests/ztest/error_hook/ fails on the part
run_trigger_thread(ZTEST_CATCH_FATAL_DIVIDE_ZERO);
The config has CONFIG_ARCH_HAS_USERSPACE.
See log:

START - test_catch_fatal_error                                                                          
case type is 0                                                                                          
E: ***** HARD FAULT *****                                                                               
E: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x00000000                                           
E: r3/a4:  0x200005e8 r12/ip:  0x0800b4cd r14/lr:  0x080009dd                                           
E:  xpsr:  0x41000000                                                                                   
E: Faulting instruction address (r15/pc): 0x080007c8                                                    
E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0                                                     
E: Current thread: 0x20000100 (unknown)                                                                 
Caught system error -- reason 0 1                                                                       
Fatal error expected as part of test case.                                                              
case type is 1                                                                                          
E: ***** HARD FAULT *****                                                                               
E: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x00000000                                           
E: r3/a4:  0x20001bd4 r12/ip:  0x0800b4cd r14/lr:  0x0800b433                                           
E:  xpsr:  0x00000000                                                                                   
E: Faulting instruction address (r15/pc): 0x20001bd4                                                    
E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0                                                     
E: Current thread: 0x20000100 (unknown)                                                                 
Caught system error -- reason 0 1                                                                       
Fatal error expected as part of test case.                                                              
case type is 2                                                                                          
a is 0                                                                                                  
 FAIL - test_catch_fatal_error in 0.76 seconds   

@galak
Copy link
Collaborator

galak commented May 11, 2021

@hakehuang are you seeing this on lpcxpresso55s69_ns?

@galak galak added the priority: low Low impact/importance bug label May 11, 2021
@hakehuang
Copy link
Collaborator Author

lpcxpresso55s69_ns

@galak 55s69_ns platform does not have required CONFIG_ARCH_HAS_USERSPACE, so I do not test it.

@FRASTM FRASTM added the platform: STM32 ST Micro STM32 label May 12, 2021
@henrikbrixandersen
Copy link
Member

I cannot reproduce this with the changes in #35416.

@galak
Copy link
Collaborator

galak commented May 19, 2021

Closing this, @hakehuang re-open if you still have an issue since we merged #35416.

@galak galak closed this as completed May 19, 2021
@ABOSTM
Copy link
Collaborator

ABOSTM commented May 21, 2021

This test is still failed on nucleo_g071rb and nucleo_l073rz despite #35416.
SHA1: 5f61d89

@henrikbrixandersen
Copy link
Member

This test is still failed on nucleo_g071rb and nucleo_l073rz despite #35416.

SHA1: 5f61d89

Please update the PR (or open a new one?) to reflect which board it is failing on. The problem was fixed for the lpcxpresso55s16.

@ABOSTM
Copy link
Collaborator

ABOSTM commented May 21, 2021

OK, I close this issue and opened a new issue: #35540

@ABOSTM ABOSTM closed this as completed May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP platform: STM32 ST Micro STM32 priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

6 participants