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

Trap frame address mismatch with test specs #3

Open
eternalNight opened this issue Sep 8, 2012 · 1 comment
Open

Trap frame address mismatch with test specs #3

eternalNight opened this issue Sep 8, 2012 · 1 comment

Comments

@eternalNight
Copy link
Collaborator

Description

From the serial console, we get "trapframe at 0xdfe87fbc", while test specs requires the address of the trap frames should be "0xc.......".
The test cases affected by this issue include badsegment, divzero, faultread, faultreadkernel, testbss and softint.

Commit

b8ad77a unittest: Bring in the complete set of tests from the original uCore.

Reproduce Steps

cd ucore
make ARCH=i386 menuconfig
UCORE_TEST=/testbin/divzero make kernel
UCORE_TEST=/testbin/divzero make sfsimg
make swapimg
./uCore_test -sf src/user-ucore/testspecs/divzero.testspec

Current Result

The unit tests involved fail with "!! error: missing 'trapframe at 0xc.......'"

Expected Result

The unit tests involved should not fail because of this issue, either by update the test specs if it is reasonable or by a fix in uCore itself.

@eternalNight
Copy link
Collaborator Author

With the following commit:
eaf6a02 unittest: Update badbrktest
this issue disappears. I guess it is because when uCore has 512M memory, the range of the remapped physical memory is [0xc0000000, 0xe0000000), while with 128M memory it's [0xc0000000, 0xc8000000). If a trap frame is randomly allocated using malloc(), it's address is uncertain and may fall in [0xd0000000, 0xe0000000) in the former case.

Still need some investigation to confirm this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant