Description of problem: kernel-selftest测试套多个用例由于config未开启导致用例失败,具体如下: kernelselftests测试集下多个用例因为相关config未开启失败,麻烦帮忙评估确认下如下config是否需要开启? bpf.test_lwt_seg6local.sh CONFIG_IPV6_SEG6_BPF filesystems/binderfs.binderfs_test CONFIG_ANDROID_BINDERFS firmware.fw_run_tests.sh CONFIG_TEST_FIRMWARE net.test_blackhole_dev.sh CONFIG_TEST_BLACKHOLE_DEV vm.'gup_benchmark_-U'_(normal/slow_gup)/vm.gup_benchmark_-b_(pin_user_pages) CONFIG_GUP_BENCHMARK drivers/dma-buf:udmabuf CONFIG_UDMABUF pstore:pstore_tests CONFIG_PSTORE_CONSOLE 日志如下: [root@qibo-anolis8-nightly-func-arm-3 tone]# cat /boot/config-`uname -r` |grep CONFIG_IPV6_SEG6_BPF [root@qibo-anolis8-nightly-func-arm-3 tone]# cat /boot/config-`uname -r` |grep CONFIG_ANDROID_BINDERFS [root@qibo-anolis8-nightly-func-arm-3 tone]# cat /boot/config-`uname -r` |grep CONFIG_TEST_FIRMWARE # CONFIG_TEST_FIRMWARE is not set [root@qibo-anolis8-nightly-func-arm-3 tone]# cat /boot/config-`uname -r` |grep CONFIG_TEST_BLACKHOLE_DEV # CONFIG_TEST_BLACKHOLE_DEV is not set [root@qibo-anolis8-nightly-func-arm-3 tone]# cat /boot/config-`uname -r` |grep CONFIG_GUP_BENCHMARK # CONFIG_GUP_BENCHMARK is not set [root@qibo-anolis8-nightly-func-arm-3 tone]# cat /boot/config-`uname -r` |grep CONFIG_UDMABUF # CONFIG_UDMABUF is not set [root@qibo-anolis8-nightly-func-arm-3 tone]# cat /boot/config-`uname -r` |grep CONFIG_PSTORE_CONSOLE # CONFIG_PSTORE_CONSOLE is not set How reproducible: 必现 Steps to Reproduce: 【复现步骤】 下载当前内核对应的kernel源码包 rpm -ivh xxx.src.rpm 默认安装到/root下 yum-builddep -y rpmbuild/SPECS/kernel.spec 自动安装前置依赖包,需要yum-utils rpmbuild -bp ./rpmbuild/SPECS/kernel.spec # 这个步骤会打相关的patch, 解压缩tar包,生成BUILD目录 cd rpmbuild/BUILD/kernel-xxx/linux-xxx/ 接下来就可以编译测试了 cd /tools/testing/selftests/bpf/ make 执行相关用例: cd kernel-selftests/filesystems/binderfs ./binderfs_test # ./binderfs_test TAP version 13 1..3 # Starting 3 tests from 1 test cases. # RUN global.binderfs_stress ... # binderfs_test.c:397:binderfs_stress:Expected ret (-1) == 0 (0) # binderfs_test.c:398:binderfs_stress:No such device - Failed to mount binderfs # binderfs_test.c:470:binderfs_stress:Expected ret (-1) == 0 (0) # binderfs_test.c:471:binderfs_stress:wait_for_pid() failed # binderfs_stress: Test terminated by assertion # FAIL global.binderfs_stress not ok 1 global.binderfs_stress # RUN global.binderfs_test_privileged ... # binderfs_test.c:75:binderfs_test_privileged:Expected ret (-1) == 0 (0) # SKIP binderfs missing # SKIP The Android binderfs filesystem is not available # OK global.binderfs_test_privileged ok 2 # SKIP The Android binderfs filesystem is not available # RUN global.binderfs_test_unprivileged ... # binderfs_test.c:75:binderfs_test_unprivileged:Expected ret (-1) == 0 (0) # SKIP binderfs missing # SKIP The Android binderfs filesystem is not available # OK global.binderfs_test_unprivileged ok 3 # SKIP The Android binderfs filesystem is not available # FAILED: 2 / 3 tests passed. # Totals: pass:0 fail:1 xfail:0 xpass:0 skip:2 error:0 Actual results: 相关用例执行fail Expected results: config开启,相关用例执行pass Additional info: 版本信息: cat /etc/os-release NAME="Anolis OS" VERSION="8.6" ID="anolis" ID_LIKE="rhel fedora centos" VERSION_ID="8.6" PLATFORM_ID="platform:an8" PRETTY_NAME="Anolis OS 8.6" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" 内核信息: # uname -r 5.10.134-259.git.a5a0ae7bf175.an8.aarch64 内存信息: # free -h total used free shared buff/cache available Mem: 15Gi 262Mi 14Gi 11Mi 754Mi 14Gi Swap: 0B 0B 0B cpu信息: # lscpu Architecture: aarch64 Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per cluster: 4 Socket(s): 1 Cluster(s): 1 NUMA node(s): 1 Vendor ID: ARM BIOS Vendor ID: Alibaba Cloud Model: 1 Model name: Neoverse-N1 BIOS Model name: virt-rhel7.6.0 Stepping: r3p1 BogoMIPS: 50.00 NUMA node0 CPU(s): 0-3 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
vm.HMM_smoke_test用例也是一样的,因为CONFIG_TEST_HMM config未打开,无法测试
还有以下config麻烦一起确认下: splice.short_splice_read.sh CONFIG_TEST_LKM 日志如下: [root@qibo-anolis8-nightly-func-arm-3 splice]# cat /boot/config-`uname -r` |grep CONFIG_TEST_LKM # CONFIG_TEST_LKM is not set
这条用例net.test_tc_tunnel.sh需要打开CONFIG_NET_FOU config才能测试 报错信息: modprobe: FATAL: Module fou not found in directory /lib/modules/5.10.134-271.git.0fce10d0413c.an8.x86_64 RTNETLINK answers: No such file or directory Error talking to the kernel # grep -i fou /boot/config-5.10.134-271.git.0fce10d0413c.an8.x86_64 # CONFIG_NET_FOU is not set # CONFIG_NET_FOU_IP_TUNNELS is not set
这条用例bpf.test_progs-no_alu32需要打开CONFIG_IPV6_SEG6_LWTUNNEL config才能测试 详见bug 1859开发分析结论:https://bugzilla.openanolis.cn/show_bug.cgi?id=1859