-
Couldn't load subscription status.
- Fork 8.1k
Description
Is your enhancement proposal related to a problem? Please describe.
This is a follow-up for PR #24367 to be completed during the stabilization period before 2.3.0 is released.
Several tests are disabled in tests/net/socket/socketpair/src/main.c due to incorrect userspace permissions, incorrect initialization of userspace k_objects, etc.
Describe the solution you'd like
I would like to submit another patch to correct it, hopefully with the help of @andrewboie (he seems to know a lot of the detail I am unfamiliar with).
Describe alternatives you've considered
Additional context
Currently, if I re-enable the tests and build for BOARD=qemu_cortex_m3 or native_posix_64, It executes successfully with
$ grep -v ^# ~/.zephyrrc | sed -e '/^$/d'
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=~/zephyr-sdk-0.11.2
export BOARD=qemu_cortex_m3
export ZEPHYR_PROJECT=tests/net/socket/socketpair
$ source zephyr-env.sh
$ west build -p always $ZEPHYR_PROJECT -t runHowever, if I run the following sanity check, then the fun begins.
$ ./scripts/sanitycheck --enable-slow --inline-logs -j8 --testcase-root tests/net/socket/socketpair/
Renaming output directory to /home/cfriedt/workspace/zephyrproject/zephyr/sanity-out.8
INFO - JOBS: 8
INFO - Selecting default platforms per test case
INFO - Building initial testcase list...
INFO - 6 test configurations selected, 242 configurations discarded due to filters.
INFO - Adding tasks to the queue...
INFO - Total complete: 1/ 6 16% skipped: 0, failed: 0
ERROR - mps2_an385 tests/net/socket/socketpair/net.socket.socketpair FAILED: Timeout
INFO - /home/cfriedt/workspace/zephyrproject/zephyr/sanity-out/mps2_an385/tests/net/socket/socketpair/net.socket.socketpair/handler.log
ERROR - *** Booting Zephyr OS build v2.3.0-rc1-26-g4980a13fc4f7 ***
...
Running test suite socketpair_only_kernel
===================================================================
starting test - test_socketpair_write_block
E: 0x20000180 is not a valid k_thread
E: syscall z_vrfy_k_thread_create failed check: access denied
E: r0/a1: 0x00000000 r1/a2: 0x00000000 r2/a3: 0x00000000
E: r3/a4: 0x00000000 r12/ip: 0x00000000 r14/lr: 0x00000000
E: xpsr: 0x00000000
E: Faulting instruction address (r15/pc): 0x00000000
E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
E: Current thread: 0x2000126c (unknown)
E: Halting system
INFO - /home/cfriedt/workspace/zephyrproject/zephyr/sanity-out/mps2_an385/tests/net/socket/socketpair/net.socket.socketpair/handler.log
INFO - Total complete: 4/ 6 66% skipped: 0, failed: 1
ERROR - qemu_x86 tests/net/socket/socketpair/net.socket.socketpair FAILED: Exited with 2
INFO - /home/cfriedt/workspace/zephyrproject/zephyr/sanity-out/qemu_x86/tests/net/socket/socketpair/net.socket.socketpair/handler.log
ERROR - SeaBIOS (version rel-1.12.1-0-ga5cab58-dirty-20200214_052440-f7294c49af13-zephyr
)
Booting from ROM..Optimal CONFIG_X86_MMU_PAGE_POOL_PAGES 11
*** Booting Zephyr OS build v2.3.0-rc1-26-g4980a13fc4f7 ***
...
Running test suite socketpair_only_kernel
===================================================================
starting test - test_socketpair_write_block
E: 0x001251a0 is not a valid k_thread
E: syscall z_vrfy_k_thread_create failed check: access denied
E: EAX: 0x00000000, EBX: 0x00000000, ECX: 0x00000000, EDX: 0x00000000
E: ESI: 0x00000000, EDI: 0x00000000, EBP: 0x00000000, ESP: 0x00161f84
E: EFLAGS: 0x00000246 CS: 0x002b CR3: 0x001361e0
E: call trace:
E: EIP: 0x001006a6
E: NULL base ptr
E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
E: Current thread: 0x00136ea0 (unknown)
E: Halting system
INFO - /home/cfriedt/workspace/zephyrproject/zephyr/sanity-out/qemu_x86/tests/net/socket/socketpair/net.socket.socketpair/handler.log
INFO - Total complete: 6/ 6 100% skipped: 0, failed: 2
INFO - 4 of 6 tests passed (66.67%), 2 failed, 0 skipped with 0 warnings in 89.14 seconds
INFO - In total 1 test cases were executed on 6 out of total 249 platforms (2.41%)
INFO - 4 tests executed on platforms, 2 tests were only built.