<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.openanolis.cn/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.openanolis.cn/"
          
          maintainer="service@openanolis.org"
>

    <bug>
          <bug_id>4512</bug_id>
          
          <creation_ts>2023-03-14 15:01:13 +0000</creation_ts>
          <short_desc>[Anolis8][anck-5.10][aarch64][nightly社区版] kernel-selftest测试套net.reuseaddr_ports_exhausted.sh执行fail</short_desc>
          <delta_ts>2023-03-14 15:20:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Infrastructures</classification>
          <product>Antest</product>
          <component>测试用例</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>4510</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3-Medium</priority>
          <bug_severity>S3-normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="yunhe123">zgy01497303</reporter>
          <assigned_to name="Jacob">qibo.qb</assigned_to>
          <cc>qibo.qb</cc>
    
    
    <cc>wb-lyf900195</cc>
    
    
    <cc>wb-yyc939293</cc>
    
    
    <cc>wxm01174540</cc>
    
    
    <cc>zgy01497303</cc>
    
    
    <cc>zx01468051</cc>
          
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>15093</commentid>
    <comment_count>0</comment_count>
    <who name="yunhe123">zgy01497303</who>
    <bug_when>2023-03-14 15:01:13 +0000</bug_when>
    <thetext>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=&quot;Anolis OS&quot;
VERSION=&quot;8.8&quot;
ID=&quot;anolis&quot;
ID_LIKE=&quot;rhel fedora centos&quot;
VERSION_ID=&quot;8.8&quot;
PLATFORM_ID=&quot;platform:an8&quot;
PRETTY_NAME=&quot;Anolis OS 8.8&quot;
ANSI_COLOR=&quot;0;31&quot;
HOME_URL=&quot;https://openanolis.cn/&quot;

内核信息：
]# 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15095</commentid>
    <comment_count>1</comment_count>
    <who name="yunhe123">zgy01497303</who>
    <bug_when>2023-03-14 15:20:08 +0000</bug_when>
    <thetext>https://bugzilla.openanolis.cn/show_bug.cgi?id=4510 和这个单重复

*** This bug has been marked as a duplicate of bug 4510 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>