Here's qemu's own strace log:
farino ~ # /usr/bin/qemu-riscv32 -strace /chroot/riscv-ilp32/tmp/wait-test-short 10123 brk(NULL) = 0x00073000 10123 brk(0x00073880) = 0x00073880 10123 uname(0x407ffed8) = 0 10123 readlinkat(AT_FDCWD,"/proc/self/exe",0x407feff0,4096) = 39 10123 brk(0x00094880) = 0x00094880 10123 brk(0x00095000) = 0x00095000 10123 mprotect(0x0006e000,8192,PROT_READ) = 0 10123 clone(CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|0x11,child_stack=0x00000000,parent_tidptr=0x00000000,tls=0x00000000,child_tidptr=0x00073068) = 10125 10123 clone(CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|0x11,child_stack=0x00000000,parent_tidptr=0x00000000,tls=0x00000000,child_tidptr=0x00073068) = 0 10125 exit_group(42) 10123 waitid(0,-1,0x407fff8c,0x4) = 0 10123 statx(1,"",AT_EMPTY_PATH,STATX_BASIC_STATS,0x407ff8e8) = 0 child wants to return 42 (0x2A), parent received 40 (0x28), difference -2 10123 write(1,0x73ad0,74) = 74 10123 exit_group(0)
Here's qemu's own strace log:
farino ~ # /usr/bin/ qemu-riscv32 -strace /chroot/ riscv-ilp32/ tmp/wait- test-short AT_FDCWD, "/proc/ self/exe" ,0x407feff0, 4096) = 39 0x0006e000, 8192,PROT_ READ) = 0 CHILD_CLEARTID| CLONE_CHILD_ SETTID| 0x11,child_ stack=0x0000000 0,parent_ tidptr= 0x00000000, tls=0x00000000, child_tidptr= 0x00073068) = 10125 CHILD_CLEARTID| CLONE_CHILD_ SETTID| 0x11,child_ stack=0x0000000 0,parent_ tidptr= 0x00000000, tls=0x00000000, child_tidptr= 0x00073068) = 0 0,-1,0x407fff8c ,0x4) = 0 "",AT_EMPTY_ PATH,STATX_ BASIC_STATS, 0x407ff8e8) = 0
10123 brk(NULL) = 0x00073000
10123 brk(0x00073880) = 0x00073880
10123 uname(0x407ffed8) = 0
10123 readlinkat(
10123 brk(0x00094880) = 0x00094880
10123 brk(0x00095000) = 0x00095000
10123 mprotect(
10123 clone(CLONE_
10123 clone(CLONE_
10125 exit_group(42)
10123 waitid(
10123 statx(1,
child wants to return 42 (0x2A), parent received 40 (0x28), difference -2
10123 write(1,0x73ad0,74) = 74
10123 exit_group(0)