Bug 19063 - [ANCK6.6.71-3 rc1][aarch64][倚天710机器]kernel-selftests测试套pidfd.pidfd_test用例失败,pidfd_clone函数创建指定进程能返回进程id,但不能执行函数并报错Bail out!
Summary: [ANCK6.6.71-3 rc1][aarch64][倚天710机器]kernel-selftests测试套pidfd.pidfd_test用例失败,p...
Status: CLOSED FIXED
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: aarch64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: shuancue
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-26 17:25 UTC by zhixin01
Modified: 2025-03-25 10:59 UTC (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhixin01 alibaba_cloud_group 2025-02-26 17:25:12 UTC
[缺陷描述]:
kernel-selftests测试套pidfd.pidfd_test用例失败,pidfd_clone函数创建指定进程能返回进程id,但不能执行函数并报错Bail out! 
 
测试日志:
#./pidfd_test
TAP version 13
1..8
# Parent: pid: 1387844
# Parent: Waiting for Child (1387845) to complete.
# Time waited for child: 0
Bail out! pidfd_poll check for premature notification on child thread exec test: Failed
# Planned tests != run tests (8 != 0)
# Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0


[重现概率]:
必现

[重现环境]:
环境信息:倚天710机器
11.163.178.238

#uname -r
6.6.71-3_rc1.al8.aarch64

#cat /etc/os-release
NAME="Alibaba Cloud Linux"
VERSION="3 (Soaring Falcon)"
ID="alinux"
ID_LIKE="rhel fedora centos anolis"
VERSION_ID="3"
UPDATE_ID="10"
PLATFORM_ID="platform:al8"
PRETTY_NAME="Alibaba Cloud Linux 3 (Soaring Falcon)"
ANSI_COLOR="0;31"
HOME_URL="https://www.aliyun.com/"

#lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              128
On-line CPU(s) list: 0-127
Thread(s) per core:  1
Core(s) per socket:  128
Socket(s):           1
NUMA node(s):        2
Vendor ID:           ARM
BIOS Vendor ID:      T-HEAD
Model:               0
Model name:          Neoverse-N2
BIOS Model name:     Yitian710-128
Stepping:            r0p0
CPU MHz:             2750.000
BogoMIPS:            100.00
Hypervisor vendor:   Alibaba
Virtualization type: full
L1d cache:           64K
L1i cache:           64K
L2 cache:            1024K
L3 cache:            65536K
NUMA node0 CPU(s):   0-63
NUMA node1 CPU(s):   64-127
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh

#free -h
              total        used        free      shared  buff/cache   available
Mem:          125Gi       3.6Gi       121Gi        12Mi       1.0Gi       122Gi
Swap:         2.0Gi          0B       2.0Gi

#cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/boot/vmlinuz-6.6.71-3_rc1.al8.aarch64 root=UUID=d0af582f-7147-41de-85e3-deb2e14cde99 ro biosdevname=0 rd.driver.pre=ahci iommu.passthrough=1 iommu.strict=0 nospectre_bhb ssbd=force-off systemd.unified_cgroup_hierarchy=0 cgroup.memory=nokmem console=ttyS0,115200 fsck.repair=yes crashkernel=0M-2G:0M,2G-256G:256M,256G-1024G:320M,1024G-:384M

#gcc --version
gcc (GCC) 12.3.0 20230508 (Red Hat 12.3.0-1)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

[重现步骤]:
# 下载并编译用例
wget 内核对应src.rpm包(从这里获取https://koji.alibaba-inc.com/taskinfo?taskID=730244)
rpm -ivh xxx.src.rpm 默认安装到/root下
yum install yum-utils
yum-builddep -y /root/rpmbuild/SPECS/kernel.spec 自动安装前置依赖包 需要yum-utils
rpmbuild -bp /root/rpmbuild/SPECS/kernel.spec # 这个步骤会打相关的patch, 解压缩tar包,生成BUILD目录
cd /root/rpmbuild/BUILD/kernel-*/linux-*
make -C tools/testing/selftests/
cd /root/rpmbuild/BUILD/kernel-*/linux-*/tools/testing/selftests/pidfd

执行用例
./pidfd_test

[期望结果]:
用例执行pass

[实际结果]:
用例执行失败,报Bail out! pidfd_poll check for premature notification on child thread exec test: Failed

[分析定位]
pidfd_clone函数创建指定进程能返回进程id,但不能执行函数并报错Bail out! 

具体失败位置如下:
443 static void test_pidfd_poll_exec(int use_waitpid)
444 {
445     int pid, pidfd = 0;
446     int status, ret;
447     time_t prog_start = time(NULL);
448     const char *test_name = "pidfd_poll check for premature notification on child thread exec";
449
450     ksft_print_msg("Parent: pid: %d\n", getpid());
451     pid = pidfd_clone(CLONE_PIDFD, &pidfd, child_poll_exec_test);
452     perror
453     if (pid < 0)
454         ksft_exit_fail_msg("%s test: pidfd_clone failed (ret %d, errno %d)\n",
455                    test_name, pid, errno);
456
457     ksft_print_msg("Parent: Waiting for Child (%d) to complete.\n", pid);
458
459     if (use_waitpid) {
460         ret = waitpid(pid, &status, 0);
461         if (ret == -1)
462             ksft_print_msg("Parent: error\n");
463
464         if (ret == pid)
465             ksft_print_msg("Parent: Child process waited for.\n");
466     } else {
467         poll_pidfd(test_name, pidfd);
468     }
469
470     time_t prog_time = time(NULL) - prog_start;
471
472     ksft_print_msg("Time waited for child: %lu\n", prog_time);
473
474     close(pidfd);
475
476     if (prog_time < CHILD_THREAD_MIN_WAIT || prog_time > CHILD_THREAD_MIN_WAIT + 2)
477         ksft_exit_fail_msg("%s test: Failed\n", test_name);
478     else
479         ksft_test_result_pass("%s test: Passed\n", test_name);
480 }
Comment 1 CruzZhao alibaba_cloud_group 2025-03-10 14:51:30 UTC
在debug的时候有一个意外发现:
在pidfd_clone中添加一个无用变量ret,并且赋一个初始值0,测试用例就可以通过。

static pid_t pidfd_clone(int flags, int *pidfd, int (*fn)(void *))
{
        size_t stack_size = 1024;
        char *stack[1024] = { 0 };
        int ret = 0;
            
#ifdef __ia64__ 
        return __clone2(fn, stack, stack_size, flags | SIGCHLD, NULL, pidfd);
#else       
        return clone(fn, stack + stack_size, flags | SIGCHLD, NULL, pidfd);
#endif
}

但是如果不给ret赋初始值,那么测试用例就会fail。
对比两者的汇编,发现通过的用例多了一行汇编指令:
  4015fc:   b92037ff    str wzr, [sp, #8244]

其中wzr是清零指令

需要arm或者编译器的同学帮忙看一下
Comment 2 CruzZhao alibaba_cloud_group 2025-03-10 16:20:15 UTC
使用strace追踪测试用例的syscall,发现是因为收到SIGCHLD才结束了epoll_wait,导致提前返回
使用bpftrace追踪child退出的事件,抓到其exit code为0x87,并且多次重复测试exit code都是0x87:
# Parent: Waiting for Child (764173) to complete.
Process exited - PID: 764173, COMM: pidfd_test      , Exit Code: 0x87


在日志中看到了core dump的日志:

Mar 10 15:23:37 t50a07416.sqa.eu95 systemd[1]: Started Process Core Dump (PID 764174/UID 0).
Mar 10 15:23:37 t50a07416.sqa.eu95 systemd-coredump[764175]: Process 764173 (pidfd_test) of user 0 dumped core.

Stack trace of thread 764173:
#0  0x00000000004020b8 n/a (/root/rpmbuild/BUILD/kernel-6.6.71-3_rc1.al8/linux-6.6.71-3_rc1.al8.aarch64/tools/testing/selftests/pidfd/pidfd_test)
#1  0x0000ffffab4b8f9c thread_start (libc.so.6)
Comment 3 CruzZhao alibaba_cloud_group 2025-03-10 16:50:14 UTC
(In reply to CruzZhao from comment #2)
> 使用strace追踪测试用例的syscall,发现是因为收到SIGCHLD才结束了epoll_wait,导致提前返回
> 使用bpftrace追踪child退出的事件,抓到其exit code为0x87,并且多次重复测试exit code都是0x87:
> # Parent: Waiting for Child (764173) to complete.
> Process exited - PID: 764173, COMM: pidfd_test      , Exit Code: 0x87
> 
> 
> 在日志中看到了core dump的日志:
> 
> Mar 10 15:23:37 t50a07416.sqa.eu95 systemd[1]: Started Process Core Dump
> (PID 764174/UID 0).
> Mar 10 15:23:37 t50a07416.sqa.eu95 systemd-coredump[764175]: Process 764173
> (pidfd_test) of user 0 dumped core.
> 
> Stack trace of thread 764173:
> #0  0x00000000004020b8 n/a
> (/root/rpmbuild/BUILD/kernel-6.6.71-3_rc1.al8/linux-6.6.71-3_rc1.al8.aarch64/
> tools/testing/selftests/pidfd/pidfd_test)
> #1  0x0000ffffab4b8f9c thread_start (libc.so.6)

找到了coredump文件,进行分析,发现child是在thread_start阶段收到了SIGBUS信号而退出的:
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./pidfd_test'.
Program terminated with signal SIGBUS, Bus error.
#0  child_poll_exec_test (args=0x0) at pidfd_test.c:428
428	{
[Current thread is 1 (LWP 764173)]
(gdb) bt
#0  child_poll_exec_test (args=0x0) at pidfd_test.c:428
#1  0x0000ffffab4b8f9c in thread_start () from /lib64/libc.so.6
(gdb) disas thread_start
Dump of assembler code for function thread_start:
   0x0000ffffab4b8f90 <+0>:	mov	x29, #0x0                   	// #0
   0x0000ffffab4b8f94 <+4>:	mov	x0, x12
   0x0000ffffab4b8f98 <+8>:	blr	x10
   0x0000ffffab4b8f9c <+12>:	mov	x8, #0x5d                  	// #93
   0x0000ffffab4b8fa0 <+16>:	svc	#0x0
End of assembler dump.
Comment 4 Vincent alibaba_cloud_group 2025-03-11 14:14:08 UTC
[  211.405296] CPU: 83 PID: 14910 Comm: pidfd_test Kdump: loaded Tainted: G        W   E      6.6.71-cbp.git.3b16f8301.al8.aarch64 #1
[  211.405306] Hardware name: AlibabaCloud AliServer-Xuanwu2.0AM-1UC1P-5B/AS1111MG1, BIOS 1.2.M1.AL.P.157.00 07/29/2023
[  211.405308] Call trace:
[  211.405311]  dump_backtrace+0x9c/0x120
[  211.405319]  show_stack+0x1c/0x58
[  211.405322]  dump_stack_lvl+0x70/0xb8
[  211.405328]  dump_stack+0x14/0x20
[  211.405331]  __send_signal_locked+0x230/0x430
[  211.405337]  send_signal_locked+0xdc/0x128
[  211.405339]  force_sig_info_to_task+0x9c/0x168
[  211.405341]  force_sig_fault+0x60/0x98
[  211.405344]  arm64_notify_die+0x80/0xd0
[  211.405345]  do_sp_pc_abort+0x30/0x38
[  211.405348]  el0_sp+0x44/0x178
[  211.405351]  el0t_64_sync_handler+0xa4/0x128
[  211.405353]  el0t_64_sync+0x17c/0x180
[  211.405355] SIGBUS singal current pid:14910, comm:pidfd_test
[  211.405356] send_singal current pid:14910, comm:pidfd_test, current sig:7

抓取了发生信号异常的堆栈,其中根据el0_sp函数以及代码中的
case ESR_ELx_EC_SP_ALIGN:
el0_sp(regs, esr);
break;
对应的ESR_ELx_EC_SP_ALIGN的异常,可以判定是用户态的栈对齐出错导致的子进程异常退出。
Comment 5 XueShuai alibaba_cloud_group 2025-03-11 20:28:52 UTC
打开异常trace,确认为SP/PC alignment exception

[root@t50a07416.sqa.eu95 /root/rpmbuild/BUILD/kernel-6.6.71-3_rc1.al8/linux-6.6.71-3_rc1.al8.aarch64/tools/testing/selftests/pidfd]
#echo 1 > /proc/sys/debug/exception-trace

[root@t50a07416.sqa.eu95 /root/rpmbuild/BUILD/kernel-6.6.71-3_rc1.al8/linux-6.6.71-3_rc1.al8.aarch64/tools/testing/selftests/pidfd]
#./pidfd_test
TAP version 13
1..8
# Parent: pid: 15094
# Parent: Waiting for Child (15095) to complete.
test_pidfd_poll_exec: poll_pidfd: pidfd: 3
events: 1, data.ptr: 0x3, data.fd: 3, data.u32: 3, data.u64: 3
epoll_wait return value: 1, errno: 0
# Time waited for child: 0
Bail out! pidfd_poll check for premature notification on child thread exec test: Failed
# Planned tests != run tests (8 != 0)
# Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0

[root@t50a07416.sqa.eu95 /root/rpmbuild/BUILD/kernel-6.6.71-3_rc1.al8/linux-6.6.71-3_rc1.al8.aarch64/tools/testing/selftests/pidfd]
#dmesg | less

[root@t50a07416.sqa.eu95 /root/rpmbuild/BUILD/kernel-6.6.71-3_rc1.al8/linux-6.6.71-3_rc1.al8.aarch64/tools/testing/selftests/pidfd]
#dmesg | tail -n 20
[   21.301594] mlx5_core 0000:b1:00.0: shared_fdb:0 mode:queue_affinity
[   26.604007] mlx5_core 0000:b1:00.0: lag map: port 1:1 port 2:1
[   26.604064] mlx5_core 0000:b1:00.0: lag map: port 1:1 port 2:2
[  428.004788] pidfd_test[15095]: unhandled exception: SP Alignment, ESR 0x000000009a000000, SP/PC alignment exception in pidfd_test[400000+4000]
[  428.004811] CPU: 17 PID: 15095 Comm: pidfd_test Kdump: loaded Tainted: G        W   E      6.6.71-3_rc1.al8.aarch64 #1
[  428.004815] Hardware name: AlibabaCloud AliServer-Xuanwu2.0AM-1UC1P-5B/AS1111MG1, BIOS 1.2.M1.AL.P.157.00 07/29/2023
[  428.004817] pstate: 60001800 (nZCv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=-c)
[  428.004819] pc : 00000000004020ec
[  428.004820] lr : 0000ffff9a8b8f9c
[  428.004821] sp : 0000ffffd6611738
[  428.004822] x29: 0000000000000000 x28: 0000000000000000 x27: 0000000000000000
[  428.004825] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
[  428.004827] x23: 0000000000000000 x22: 0000000000000000 x21: 0000000000400e80
[  428.004830] x20: 0000000000000000 x19: 0000000000402640 x18: 0000000000000000
[  428.004832] x17: 00000000004200d8 x16: 0000ffff9a8b8f40 x15: 0000ffffd66115d3
[  428.004835] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[  428.004837] x11: 0000000000001011 x10: 00000000004020ec x9 : 000000000000000a
[  428.004839] x8 : 00000000000000dc x7 : 00000000fffffffb x6 : 000000000000000a
[  428.004842] x5 : 0000ffffd6611738 x4 : 000000000000000a x3 : 0000ffffd6611738
[  428.004844] x2 : 0000ffffd661176c x1 : 0000ffffd6611738 x0 : 0000000000000000
Comment 6 XueShuai alibaba_cloud_group 2025-03-11 20:44:24 UTC
根据ARM ARM:
D1.3.10.2 SP alignment checking
RRDMXG When the SP is used as the base address of a calculation, regardless of any offset applied by the instruction, if bits
[3:0] of the SP are not 0b0000, there is a misaligned SP.

If SP alignment checking is enabled, then the execution of a load or store using the SP with a misaligned SP
generates a synchronous SP Alignment exception on that load or store.

根据sp : 0000ffffd6611738
低4位为0b1000

产生SP Alignment exception符合预期。
Comment 7 XueShuai alibaba_cloud_group 2025-03-12 09:51:24 UTC
修改测试用例,增加如下打印,确认栈帧的地址是否16字节对齐:
$git diff
diff --git a/tools/testing/selftests/pidfd/pidfd_test.c b/tools/testing/selftests/pidfd/pidfd_test.c
index c081ae91313a..d67f131cad08 100644
--- a/tools/testing/selftests/pidfd/pidfd_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_test.c
@@ -34,6 +34,7 @@ static pid_t pidfd_clone(int flags, int *pidfd, int (*fn)(void *))
 {
        size_t stack_size = 1024;
        char *stack[1024] = { 0 };
+       printf("Address of stack: %p\n", (void*)&stack);
 
 #ifdef __ia64__
        return __clone2(fn, stack, stack_size, flags | SIGCHLD, NULL, pidfd);


#./pidfd_test
TAP version 13
1..8
# Parent: pid: 1082141
Address of stack: 0xffffde49baa8
# Parent: Waiting for Child (1082142) to complete.
test_pidfd_poll_exec: poll_pidfd: pidfd: 3
events: 1, data.ptr: 0x3, data.fd: 3, data.u32: 3, data.u64: 3
epoll_wait return value: 1, errno: 0
# Time waited for child: 1
Bail out! pidfd_poll check for premature notification on child thread exec test: Failed
# Planned tests != run tests (8 != 0)
# Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0

[root@t50a07416.sqa.eu95 /root/rpmbuild/BUILD/kernel-6.6.71-3_rc1.al8/linux-6.6.71-3_rc1.al8.aarch64/tools/testing/selftests/pidfd]
#dmesg | tail -n 20
[ 3214.210919] x8 : 00000000000000dc x7 : 00000000fffffffb x6 : 000000000000000a
[ 3214.210921] x5 : 0000ffffebf27268 x4 : 000000000000000a x3 : 0000ffffebf27268
[ 3214.210923] x2 : 0000ffffebf2729c x1 : 0000ffffebf27268 x0 : 0000000000000000
[48628.713023] pidfd_test[1082142]: unhandled exception: SP Alignment, ESR 0x000000009a000000, SP/PC alignment exception in pidfd_test[400000+4000]
[48628.713049] CPU: 21 PID: 1082142 Comm: pidfd_test Kdump: loaded Tainted: G        W   E      6.6.71-3_rc1.al8.aarch64 #1
[48628.713051] Hardware name: AlibabaCloud AliServer-Xuanwu2.0AM-1UC1P-5B/AS1111MG1, BIOS 1.2.M1.AL.P.157.00 07/29/2023
[48628.713053] pstate: 60001800 (nZCv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=-c)
[48628.713055] pc : 0000000000402100
[48628.713056] lr : 0000ffff98288f9c
[48628.713056] sp : 0000ffffde49daa8
[48628.713057] x29: 0000000000000000 x28: 0000000000000000 x27: 0000000000000000
[48628.713060] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
[48628.713062] x23: 0000000000000000 x22: 0000000000000000 x21: 0000000000400e80
[48628.713065] x20: 0000000000000000 x19: 0000000000402650 x18: 0000000000000000
[48628.713067] x17: 00000000004200d8 x16: 0000ffff98288f40 x15: 0000ffffde49b92c
[48628.713070] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[48628.713072] x11: 0000000000001011 x10: 0000000000402100 x9 : 0000000000000010
[48628.713074] x8 : 00000000000000dc x7 : 3861616239346564 x6 : 000000000000000a
[48628.713077] x5 : 0000ffffde49daa8 x4 : 000000000000000a x3 : 0000ffffde49daa8
[48628.713079] x2 : 0000ffffde49dadc x1 : 0000ffffde49daa8 x0 : 0000000000000000


sp 0000ffffde49daa8即为stack的地址,非16字节对齐。
Comment 8 XueShuai alibaba_cloud_group 2025-03-12 10:04:34 UTC
5.10.134内核同样存在这个问题:


#./pidfd_test 
TAP version 13
1..8
# Parent: pid: 1838033
Address of stack: 0xfffffd787b98
# Parent: Waiting for Child (1838034) to complete.
# Time waited for child: 0
Bail out! pidfd_poll check for premature notification on child thread exec test: Failed
# Planned tests != run tests (8 != 0)
# Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0



#dmesg | tail -n 25
[45042.523703] 1 retries left
[76530.335814] ipmi_si IPI0001:00: IPMI BT: timeout in RD_WAIT [ ] 
[76530.335821] 1 retries left
[82112.593964] pidfd_test[1838034]: unhandled exception: SP Alignment, ESR 0x9a000000, SP/PC alignment exception in pidfd_test[400000+4000]
[82112.593980] CPU: 100 PID: 1838034 Comm: pidfd_test Not tainted 5.10.134-010.ali5000.al8.aarch64 #1
[82112.593981] Hardware name: Huawei TaiShan 200 (Model 2280)/BC82AMDD, BIOS 1.91 07/29/2022
[82112.593984] pstate: 60000000 (nZCv daif -PAN -UAO -TCO BTYPE=--)
[82112.593985] pc : 00000000004020d0
[82112.593986] lr : 0000ffff8b9878dc
[82112.593987] sp : 0000fffffd789b98
[82112.593988] x29: 0000000000000000 x28: 0000000000000000 
[82112.593991] x27: 0000000000000000 x26: 0000000000000000 
[82112.593993] x25: 0000000000000000 x24: 0000000000000000 
[82112.593995] x23: 0000000000000000 x22: 0000000000000000 
[82112.593998] x21: 0000000000400e80 x20: 0000000000000000 
[82112.594000] x19: 00000000004025f0 x18: 0000000000000002 
[82112.594002] x17: 00000000004200d8 x16: 0000ffff8b987880 
[82112.594005] x15: 0000fffffd787a1c x14: 0000000000000000 
[82112.594007] x13: 0000000000000000 x12: 0000000000000000 
[82112.594009] x11: 0000000000001011 x10: 00000000004020d0 
[82112.594011] x9 : 0000000000000010 x8 : 00000000000000dc 
[82112.594014] x7 : 3839623738376466 x6 : 000000000000000a 
[82112.594016] x5 : 0000fffffd789b98 x4 : 000000000000000a 
[82112.594018] x3 : 0000fffffd789b98 x2 : 0000fffffd789bcc 
[82112.594020] x1 : 0000fffffd789b98 x0 : 0000000000000000
Comment 9 小龙 admin 2025-03-19 10:45:59 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/4843
Comment 10 zhixin01 alibaba_cloud_group 2025-03-25 10:59:16 UTC
在6.6.71-3.100_rc2.2.al8.aarch64内核上,pidfd.pidfd_test用例执行成功,问题已解决

#./pidfd_test
TAP version 13
1..8
# Parent: pid: 1337809
# Parent: Waiting for Child (1337810) to complete.
# Child (pidfd): starting. pid 1337810 tid 1337810
# Child Thread: starting. pid 1337810 tid 1337811 ; and sleeping
# Child Thread: doing exec of sleep
# Time waited for child: 3
ok 1 pidfd_poll check for premature notification on child thread exec test: Passed
# Parent: pid: 1337809
# Parent: Waiting for Child (1337832) to complete.
# Child (pidfd): starting. pid 1337832 tid 1337832
# Child Thread: starting. pid 1337832 tid 1337833 ; and sleeping
# Child Thread: doing exec of sleep
# Parent: Child process waited for.
# Time waited for child: 3
ok 2 pidfd_poll check for premature notification on child thread exec test: Passed
# Parent: pid: 1337809
# Parent: Waiting for Child (1337873) to complete.
# Child: starting. pid 1337873 tid 1337873
# Child Thread: starting. pid 1337873 tid 1337874 ; and sleeping
# Child Thread: starting. pid 1337873 tid 1337875 ; and sleeping
# Child Thread: DONE. pid 1337873 tid 1337874
# Child Thread: DONE. pid 1337873 tid 1337875
# Time since child exit: 3
ok 3 pidfd_poll check for premature notification on non-emptygroup leader exit test: Passed
# Parent: pid: 1337809
# Parent: Waiting for Child (1337888) to complete.
# Child: starting. pid 1337888 tid 1337888
# Child Thread: starting. pid 1337888 tid 1337889 ; and sleeping
# Child Thread: starting. pid 1337888 tid 1337890 ; and sleeping
# Child Thread: DONE. pid 1337888 tid 1337889
# Child Thread: DONE. pid 1337888 tid 1337890
# Parent: Child process waited for.
# Time since child exit: 3
ok 4 pidfd_poll check for premature notification on non-emptygroup leader exit test: Passed
ok 5 pidfd_send_signal check for support test: pidfd_send_signal() syscall is supported. Tests can be executed
ok 6 pidfd_send_signal send SIGUSR1 test: Sent signal
# waitpid WEXITSTATUS=0
ok 7 pidfd_send_signal signal exited process test: Failed to send signal as expected
# pid to recycle is 1000
ok 8 # SKIP pidfd_send_signal signal recycled pid test: Skipping test
# Totals: pass:7 fail:0 xfail:0 xpass:0 skip:1 error:0

[root@v43c07451.sqa.na131 /var/tmp/tone/run/kernel-selftests/pidfd]
#echo $?
0

[root@v43c07451.sqa.na131 /var/tmp/tone/run/kernel-selftests/pidfd]
#uname -r
6.6.71-3.100_rc2.2.al8.aarch64