masayuki2009 commented on PR #8486:
URL: https://github.com/apache/nuttx/pull/8486#issuecomment-1425192882

   @pussuw 
   We can reproduce the same issue if we add some configs like
   
   ```
   --- a/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
   +++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
   @@ -55,6 +55,8 @@ CONFIG_RAM_START=0x80000000
    CONFIG_READLINE_CMD_HISTORY=y
    CONFIG_RISCV_SEMIHOSTING_HOSTFS=y
    CONFIG_RR_INTERVAL=200
   +CONFIG_SCHED_CHILD_STATUS=y
   +CONFIG_SCHED_HAVE_PARENT=y
    CONFIG_SCHED_WAITPID=y
    CONFIG_SERIAL_UART_ARCH_MMIO=y
    CONFIG_STACK_COLORATION=y
   ```
   
   And run ostest
   
   ```
   + /home/ishikawa/opensource/QEMU/qemu-7.1/build/qemu-system-riscv32 
-semihosting -nographic -cpu rv32 -smp 8 -M virt,aclint=on -bios none -kernel 
nuttx
   NuttShell (NSH) NuttX-12.0.0
   nsh> ps
     PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK   STACK   
USED  FILLED COMMAND
       0     0   0 FIFO     Kthread N-- Ready              00000000 002016 
000552  27.3%  Idle Task
       1     1 100 RR       Task    --- Running            00000000 001984 
001228  61.8%  nsh_main
   nsh> help
   help usage:  help [-v] [<cmd>]
   
     .         cd        dmesg     free      mkrd      rm        time      
uptime
     [         cp        echo      help      mount     rmdir     true      
usleep
     ?         cmp       env       hexdump   mv        set       truncate  xd
     basename  dirname   exec      kill      printf    sleep     uname
     break     dd        exit      ls        ps        source    umount
     cat       df        false     mkdir     pwd       test      unset
   
   Builtin Apps:
     ostest  sh      nsh
   nsh> ostest
   ...
   user_main: waitpid test
   
   Test waitpid()
   waitpid_start_child: Started waitpid_main at PID=5
   waitpid_start_child: Started waitpid_main at PID=6
   waitpid_start_child: Started waitpid_main at PID=7
   waitpid_test: Waiting for PID=5 with waitpid()
   waitpid_main: PID 5 Started
   waitpid_main: PID 6 Started
   waitpid_main: PID 7 Started
   waitpid_main: PID 5 exitting with result=14
   waitpid_main: PID 6 exitting with result=14
   waitpid_main: PID 7 exitting with result=14
   waitpid_test: ERROR: PID 5 return status is 0, expected 14
   _assert: Current Version: NuttX  12.0.0 739688f6c6-dirty Feb 10 2023 
14:23:10 risc-v
   _assert: Assertion failed : at file: waitpid.c:220 task: ostest 0x80014988
   up_dump_register: EPC: 80014552
   up_dump_register: A0: 00000000 A1: 80028274 A2: 10000000 A3: 00000001
   up_dump_register: A4: 0000000a A5: 00000000 A6: 80000000 A7: 00008000
   up_dump_register: T0: 00000030 T1: 40000000 T2: 00000020 T3: 0000002a
   up_dump_register: T4: 0000002e T5: 000001ff T6: 0000002d
   up_dump_register: S0: 8002bb00 S1: 00000000 S2: 8001e1d4 S3: 800288f0
   up_dump_register: S4: 80021c04 S5: 000000dc S6: 00000000 S7: 00000000
   up_dump_register: S8: 00000000 S9: 00000000 S10: 00000000 S11: 00000000
   up_dump_register: SP: 8002dda0 FP: 8002bb00 TP: 00000000 RA: 80010a48
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to