Bug 4512 - [Anolis8][anck-5.10][aarch64][nightly社区版] kernel-selftest测试套net.reuseaddr_ports_exhausted.sh执行fail
Summary: [Anolis8][anck-5.10][aarch64][nightly社区版] kernel-selftest测试套net.reuseaddr_por...
Status: RESOLVED DUPLICATE of bug 4510
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Jacob
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-14 15:01 UTC by yunhe123
Modified: 2023-03-14 15:20 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yunhe123 alibaba_cloud_group 2023-03-14 15:01:13 UTC
Description of problem:
kernel-selftest测试套net.reuseaddr_ports_exhausted.sh执行fail,日志如下:

# cd /tmp/tone/run/kernel-selftests/net
# ./reuseaddr_ports_exhausted.sh
####################
TAP version 13
1..3
# Starting 3 tests from 1 test cases.
#  RUN           global.reuseaddr_ports_exhausted_unreusable ...
#            OK  global.reuseaddr_ports_exhausted_unreusable
ok 1 global.reuseaddr_ports_exhausted_unreusable
#  RUN           global.reuseaddr_ports_exhausted_reusable_same_euid ...
#            OK  global.reuseaddr_ports_exhausted_reusable_same_euid
ok 2 global.reuseaddr_ports_exhausted_reusable_same_euid
#  RUN           global.reuseaddr_ports_exhausted_reusable_different_euid ...
# reuseaddr_ports_exhausted.c:153:reuseaddr_ports_exhausted_reusable_different_euid:Expected -1 (-1) == ret (0)
# reuseaddr_ports_exhausted.c:153:reuseaddr_ports_exhausted_reusable_different_euid:should fail to listen because only one uid reserves the port in TCP_LISTEN.
# reuseaddr_ports_exhausted.c:153:reuseaddr_ports_exhausted_reusable_different_euid:Expected -1 (-1) == ret (0)
# reuseaddr_ports_exhausted.c:153:reuseaddr_ports_exhausted_reusable_different_euid:should fail to listen because only one uid reserves the port in TCP_LISTEN.
# reuseaddr_ports_exhausted.c:153:reuseaddr_ports_exhausted_reusable_different_euid:Expected -1 (-1) == ret (0)
# reuseaddr_ports_exhausted.c:153:reuseaddr_ports_exhausted_reusable_different_euid:should fail to listen because only one uid reserves the port in TCP_LISTEN.
# reuseaddr_ports_exhausted.c:153:reuseaddr_ports_exhausted_reusable_different_euid:Expected -1 (-1) == ret (0)
# reuseaddr_ports_exhausted.c:153:reuseaddr_ports_exhausted_reusable_different_euid:should fail to listen because only one uid reserves the port in TCP_LISTEN.
# reuseaddr_ports_exhausted_reusable_different_euid: Test failed at step #13
#          FAIL  global.reuseaddr_ports_exhausted_reusable_different_euid
not ok 3 global.reuseaddr_ports_exhausted_reusable_different_euid
# FAILED: 2 / 3 tests passed.
# Totals: pass:2 fail:1 xfail:0 xpass:0 skip:0 error:0


Version-Release number of selected component (if applicable):


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/net
./reuseaddr_ports_exhausted.sh

Actual results:
用例执行fail


Expected results:
用例执行pass


Additional info:
版本信息:
# cat /etc/os-release
NAME="Anolis OS"
VERSION="8.8"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.8"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.8"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

内核信息:
]# uname -r
5.10.134-329.git.b9e0e840126f.an8.aarch64

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

内存信息:
]# free -h
              total        used        free      shared  buff/cache   available
Mem:           15Gi       241Mi        13Gi        91Mi       1.2Gi        14Gi
Swap:            0B          0B          0B
Comment 1 yunhe123 alibaba_cloud_group 2023-03-14 15:20:08 UTC
https://bugzilla.openanolis.cn/show_bug.cgi?id=4510 和这个单重复

*** This bug has been marked as a duplicate of bug 4510 ***