Skip to content

samples/mpu/mpu_stack_guard_test: Found "Test not passed" #14870

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

Closed
cinlyooi-intel opened this issue Mar 25, 2019 · 4 comments
Closed

samples/mpu/mpu_stack_guard_test: Found "Test not passed" #14870

cinlyooi-intel opened this issue Mar 25, 2019 · 4 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@cinlyooi-intel
Copy link
Contributor

cinlyooi-intel commented Mar 25, 2019

** Description **
For "test" Test case in sample.yaml, i.e. no prj_stack_guard.conf, we see Test not passed.

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=frdm_k64f
  3. make
  4. make run

Screenshots or console output

***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS v1.14.0-rc1-1386-g5d35b6632765 (delayed boot 1000ms) *****
STACK_ALIGN 0x8
MPU STACK GUARD Test
Canary Initial Value = 0xf0cacc1a threads 0x20000ea0
Canary = 0x0000000f	Test not passed.
***** BUS FAULT *****
  Instruction bus error
  NXP MPU error, port 3
    Mode: Supervisor, Instruction Address: 0x20000ed0
    Type: Read, Master: 0, Regions: 0x8800
***** Hardware exception *****
Current thread ID = 0x20000ea0
Faulting instruction address = 0x20000ed0
Fatal fault in thread 0x20000ea0! Aborting.
***** HARD FAULT *****
  Fault escalation (see below)
***** USAGE FAULT *****
  Illegal use of the EPSR
***** Hardware exception *****
Current thread ID = 0x20000ea0
Faulting instruction address = 0x0
Fatal fault in ISR! Spinning...

Environment (please complete the following information):

  • OS: fedora29
  • Toolchain: zephyr
  • Commit SHA or Version used: 5d35b66
@cinlyooi-intel cinlyooi-intel added the bug The issue is a bug, or the PR is fixing a bug label Mar 25, 2019
@ioannisg
Copy link
Member

I think this is expected. Try to execute with CONFIG_HW_STACK_PROTECTION=y (I think it is set in the alternative prj.conf). You should expect not to see: "Test not passed".

@agansari
Copy link
Collaborator

@cinlyooi-intel building with:

cmake -DBOARD=frdm_k64f -DCONF_FILE=prj_stack_guard.conf ..

Will make the test pass as mentioned above.
I can't reproduce ***** HARD FAULT ***** part.

@rljordan-zz rljordan-zz added the priority: low Low impact/importance bug label Mar 26, 2019
@cinlyooi-intel
Copy link
Contributor Author

@ioannisg : You are right. Examining sample.yaml says we are expecting the console output I am seeing.
@agansari : With CONF_FILE=prj_stack_guard.conf (sample.yaml's test_stack_guard testcase ) I don't see the Hard Fault either. Hard Fault only with "sample.yaml's test testcase"

I am closing this test case.

@cinlyooi-intel
Copy link
Contributor Author

cinlyooi-intel commented Mar 26, 2019

I am reopenning this because I noticed the "Test not passed" mentioned by @IanisG on the same line as "Canary = 0x0000000f". Missed that initially. I also only see that line with the "test" testcase, and not seeing it with the "test_stack_guard" testcase

I consider -DCONF_FILE=prj_stack_guard.conf case, i.e. sample.yaml's test_stack_guard testcase as a Pass because I am not seeing "Test not passed".

Also updated the title and bug description

@cinlyooi-intel cinlyooi-intel changed the title samples/mpu/mpu_stack_guard_test: Fatal fault in ISR! Spinning samples/mpu/mpu_stack_guard_test: Found "Test not passed" Mar 26, 2019
andrewboie pushed a commit to andrewboie/zephyr that referenced this issue Apr 2, 2019
This old "test" has been superseded by test cases in
tests/kernel/mem_protect.

Fixes: zephyrproject-rtos#14870

Signed-off-by: Andrew Boie <[email protected]>
nashif pushed a commit that referenced this issue Apr 2, 2019
This old "test" has been superseded by test cases in
tests/kernel/mem_protect.

Fixes: #14870

Signed-off-by: Andrew Boie <[email protected]>
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 priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants