sanitycheck: CONFIG_TEST_USERSPACE / userspace tag cleanup
- Delete CONFIG_TEST_USERSPACE=n no-ops because it's the default
since commit 7b1ee5cf13
- Some tests have a "userspace" tag pretending to TEST_USERSPACE but
don't and vice versa: fix missing or spurious "userspace" tags in
testcase.yaml files.
Tests have a _spurious_ "userspace" tag when they PASS this command
cause none should pass:
./scripts/sanitycheck --tag=userspace -p qemu_x86 \
--extra-args=CONFIG_TEST_USERSPACE=n \
--extra-args=CONFIG_USERSPACE=n | tee userspace.log
All tests run by this command must either fail to build or fail to run
with some userspace related error. Shortcut to look at all test
failures:
zephyr_failure_logs() {
awk '/see.*log/ {print $2}' "$@"
}
Tests _missing_ "userspace" tag FAIL to either build or to run with some
userspace related error when running this:
./scripts/sanitycheck --exclude=userspace -p qemu_x86 \
--extra-args=CONFIG_TEST_USERSPACE=n \
--extra-args=CONFIG_USERSPACE=n | tee excludeuserspace.log
Note the detection methods above are not 100% perfect because some
flexible tests like tests/kernel/queue/src/main.c evade them with #ifdef
CONFIG_USERSPACE smarts. Considering they never break, it is purely the
test author's decision to include or not such flexible tests in the
"userspace" subset.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
3702d1a0d3
commit
4afcc0f8af
9 changed files with 14 additions and 15 deletions
|
@ -64,8 +64,11 @@ config TEST_USERSPACE
|
|||
bool "Indicate that this test exercises user mode"
|
||||
help
|
||||
This option indicates that a test case puts threads in user mode,
|
||||
and that the build system should enable userspace if the platform
|
||||
supports it. It should be set on a per-test basis.
|
||||
and that the build system will [override and] enable USERSPACE
|
||||
if the platform supports it. It should be set in a .conf file on
|
||||
a per-test basis and is not meant to be used outside test cases.
|
||||
Tests with this option should also have the "userspace" filtering
|
||||
tag in their testcase.yaml file.
|
||||
|
||||
The userspace APIs are no-ops if userspace is not enabled, so it is
|
||||
OK to enable this even if the test will run on platforms which do
|
||||
|
@ -73,7 +76,7 @@ config TEST_USERSPACE
|
|||
just with all threads in supervisor mode.
|
||||
|
||||
If a test *requires* that userspace be enabled in order to
|
||||
function, CONFIG_ARCH_HAS_USERSPACE should be filtered in its
|
||||
pass, CONFIG_ARCH_HAS_USERSPACE should be filtered in its
|
||||
testcase.yaml.
|
||||
|
||||
config TEST_ENABLE_USERSPACE
|
||||
|
@ -84,8 +87,8 @@ config TEST_ENABLE_USERSPACE
|
|||
select DYNAMIC_OBJECTS
|
||||
default y
|
||||
help
|
||||
This hidden option will help test the userspace mode. This will be
|
||||
enabled only when CONFIG_ARCH_HAS_USERSPACE is set, and that the test
|
||||
This hidden option implements the TEST_USERSPACE logic. It turns on
|
||||
USERSPACE when CONFIG_ARCH_HAS_USERSPACE is set and the test
|
||||
case itself indicates that it exercises user mode via
|
||||
CONFIG_TEST_USERSPACE.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue