Bug 11902 - [ltp测试]net.nfs:nfsstat02用例执行fail,/proc/net/rpc/nfs missing in net namespaces
Summary: [ltp测试]net.nfs:nfsstat02用例执行fail,/proc/net/rpc/nfs missing in net namespaces
Status: NEW
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: yunmeng365524
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-15 14:13 UTC by Banana
Modified: 2024-12-11 15:22 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Banana alibaba_cloud_group 2024-11-15 14:13:55 UTC
[问题描述]:
ltp测试net.nfs:nfsstat02用例执行fail,/proc/net/rpc/nfs missing in net namespaces

<<<test_output>>>
incrementing stop
nfsstat02 1 TINFO: Running: nfsstat02.sh
nfsstat02 1 TINFO: Tested kernel: Linux 4f7Lab15 6.6.25-2.2_rc1.an23.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Oct 31 21:22:28 CST 2024 aarch64 aarch64 aarch64 GNU/Linux
nfsstat02 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
nfsstat02 1 TINFO: add local addr 10.0.0.2/24
nfsstat02 1 TINFO: add local addr fd00:1:1:1::2/64
nfsstat02 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
nfsstat02 1 TINFO: add remote addr 10.0.0.1/24
nfsstat02 1 TINFO: add remote addr fd00:1:1:1::1/64
nfsstat02 1 TINFO: Network config (local -- remote):
nfsstat02 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
nfsstat02 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
nfsstat02 1 TINFO: fd00:1:1:1::2/64 -- fd00:1:1:1::1/64
nfsstat02 1 TINFO: Using /tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P as tmpdir (tmpfs filesystem)
tst_device.c:96: TINFO: Found free device 0 '/dev/loop0'
tst_supported_fs_types.c:169: TINFO: Skipping ext2 as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping ext3 as requested by the test
tst_supported_fs_types.c:97: TINFO: Kernel supports ext4
tst_supported_fs_types.c:62: TINFO: mkfs.ext4 does exist
tst_supported_fs_types.c:97: TINFO: Kernel supports xfs
tst_supported_fs_types.c:62: TINFO: mkfs.xfs does exist
tst_supported_fs_types.c:97: TINFO: Kernel supports btrfs
tst_supported_fs_types.c:58: TINFO: mkfs.btrfs does not exist
tst_supported_fs_types.c:105: TINFO: Skipping bcachefs because of FUSE blacklist
tst_supported_fs_types.c:169: TINFO: Skipping vfat as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping exfat as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping ntfs as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping tmpfs as requested by the test
nfsstat02 1 TINFO: === Testing on ext4 ===
nfsstat02 1 TINFO: Formatting ext4 with opts='/dev/loop0'
nfsstat02 1 TINFO: Mounting device: mount -t ext4 /dev/loop0 /tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P/mntpoint
nfsstat02 1 TINFO: timeout per run is 0h 5m 0s
nfsstat02 1 TINFO: mount.nfs: (linux nfs-utils 2.6.3)
nfsstat02 1 TINFO: setup NFSv4.2, socket type tcp
nfsstat02 1 TINFO: Mounting /tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P/4.2/0
nfsstat02 1 TINFO: Mounting NFS: mount -v -t nfs -o proto=tcp,vers=4.2 10.0.0.2:/tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P/mntpoint/4.2/tcp /tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P/4.2/0
nfsstat02 1 TFAIL: /proc/net/rpc/nfs missing in net namespaces
nfsstat02 2 TINFO: Cleaning up testcase
nfsstat02 2 TINFO: Unmounting /tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P/4.2/0
nfsstat02 2 TINFO: === Testing on xfs ===
nfsstat02 2 TINFO: Formatting xfs with opts='/dev/loop0'
nfsstat02 2 TINFO: Mounting device: mount -t xfs /dev/loop0 /tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P/mntpoint
nfsstat02 2 TINFO: timeout per run is 0h 5m 0s
nfsstat02 2 TINFO: mount.nfs: (linux nfs-utils 2.6.3)
nfsstat02 2 TINFO: setup NFSv4.2, socket type tcp
nfsstat02 2 TINFO: Mounting /tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P/4.2/0
nfsstat02 2 TINFO: Mounting NFS: mount -v -t nfs -o proto=tcp,vers=4.2 10.0.0.2:/tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P/mntpoint/4.2/tcp /tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P/4.2/0
nfsstat02 2 TFAIL: /proc/net/rpc/nfs missing in net namespaces
nfsstat02 3 TINFO: Cleaning up testcase
nfsstat02 3 TINFO: Unmounting /tmp/ltp-BmBkSfCV9w/LTP_nfsstat02.EXqrVthw0P/4.2/0

[root@4f7Lab15 ltp]# systemctl status nfs-server
sudo systemctl status rpcbind
● nfs-server.service - NFS server and services
     Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; preset: disabled)
     Active: active (exited) since Fri 2024-11-15 14:07:24 CST; 1min 33s ago
    Process: 2477093 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
    Process: 2477094 ExecStart=/usr/sbin/rpc.nfsd (code=exited, status=0/SUCCESS)
    Process: 2477112 ExecStart=/bin/sh -c if systemctl -q is-active gssproxy; then systemctl reload gssproxy ; fi (code=exited, status=0/SUCCESS)
   Main PID: 2477112 (code=exited, status=0/SUCCESS)
        CPU: 30ms

11月 15 14:07:24 4f7Lab15 systemd[1]: Starting nfs-server.service - NFS server and services...
11月 15 14:07:24 4f7Lab15 systemd[1]: Finished nfs-server.service - NFS server and services.
● rpcbind.service - RPC Bind
     Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; preset: enabled)
     Active: active (running) since Fri 2024-11-15 14:08:36 CST; 22s ago
TriggeredBy: ● rpcbind.socket
       Docs: man:rpcbind(8)
   Main PID: 2477768 (rpcbind)
      Tasks: 1 (limit: 629145)
     Memory: 820.0K (peak: 1000.0K)
        CPU: 25ms
     CGroup: /system.slice/rpcbind.service
             └─2477768 /usr/bin/rpcbind -w -f

11月 15 14:08:36 4f7Lab15 (rpcbind)[2477768]: rpcbind.service: Referenced but unset environment variable evaluates to an empty string: RPCBIND_OPTIONS
11月 15 14:08:36 4f7Lab15 systemd[1]: Starting rpcbind.service - RPC Bind...
11月 15 14:08:36 4f7Lab15 systemd[1]: Started rpcbind.service - RPC Bind.
[root@4f7Lab15 ltp]# lsmod | grep nfs
nfsv4                 962560  0
dns_resolver           12288  1 nfsv4
nfs                   495616  1 nfsv4
fscache               385024  1 nfs
netfs                  57344  2 fscache,nfs
nfsd                  663552  3
auth_rpcgss           151552  2 nfsd,rpcsec_gss_krb5
nfs_acl                12288  1 nfsd
lockd                 122880  2 nfsd,nfs
grace                  12288  2 nfsd,lockd
sunrpc                684032  22 nfsd,rpcrdma,nfsv4,auth_rpcgss,lockd,rpcsec_gss_krb5,nfs_acl,nfs

[环境信息]:
物理机

[内核信息]:
6.6.25-2.2_rc1.an23.aarch64

[操作系统信息]:
[root@localhost ~]# cat /etc/os-release
NAME="Anolis OS"
VERSION="23.1"
ID="anolis"
VERSION_ID="23.1"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23.1"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"

[期望结果]:
执行pass

[实际结果]:
fail

[复现步骤]:
1、安装ltp测试套
2、执行./runltp -f net.nfs -s nfsstat02
Comment 1 yunmeng365524 2024-12-04 14:14:45 UTC
非新增问题,后续版本跟踪,记录做基线
Comment 2 yuki_syq alibaba_cloud_group 2024-12-11 15:22:57 UTC
这个用例是针对https://lore.kernel.org/linux-nfs/ad5c97b53255a08cf443bb34460847e92cfe6410.1708026931.git.josef@toxicpanda.com/ 这个patch引入的 将一些统计数据在net namespaces中展示的功能进行测试的。但是目前该patch并没有合入当前版本内核中,因此用例失败属于预期行为