Bug 4636 - [anolis23][社区nightly][x86_64] ltp测试套case:syscalls/mount_setattr01 run fail
Summary: [anolis23][社区nightly][x86_64] ltp测试套case:syscalls/mount_setattr01 run fail
Status: RESOLVED WONTFIX
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: Others (show other bugs) Others
Version: 23.0
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Ferry Meng
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-29 18:25 UTC by anolislw
Modified: 2023-06-28 12:47 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anolislw alibaba_cloud_group 2023-03-29 18:25:34 UTC
Description of problem:
anolis23 x86_64 ECS环境,社区nightly测试, ltp测试case:syscalls/mount_setattr01 run fail

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

How reproducible:

Steps to Reproduce:
1.git clone https://gitee.com/anolis/ltp.git --branch 20230315
2.make autotools;./configure;make && make install
3.cd /opt/ltp;./runltp  -f syscalls -s mount_setattr01

Actual results:
Running tests.......
<<<test_start>>>
tag=mount_setattr01 stime=1680085454
cmdline="mount_setattr01"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
tst_device.c:93: TINFO: Found free device 0 '/dev/loop0'
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_supported_fs_types.c:90: TINFO: Kernel supports ext2
tst_supported_fs_types.c:55: TINFO: mkfs.ext2 does exist
tst_supported_fs_types.c:90: TINFO: Kernel supports ext3
tst_supported_fs_types.c:55: TINFO: mkfs.ext3 does exist
tst_supported_fs_types.c:90: TINFO: Kernel supports ext4
tst_supported_fs_types.c:55: TINFO: mkfs.ext4 does exist
tst_supported_fs_types.c:90: TINFO: Kernel supports xfs
tst_supported_fs_types.c:55: TINFO: mkfs.xfs does exist
tst_supported_fs_types.c:116: TINFO: Filesystem btrfs is not supported
tst_supported_fs_types.c:90: TINFO: Kernel supports vfat
tst_supported_fs_types.c:55: TINFO: mkfs.vfat does exist
tst_supported_fs_types.c:116: TINFO: Filesystem exfat is not supported
tst_supported_fs_types.c:116: TINFO: Filesystem ntfs is not supported
tst_supported_fs_types.c:90: TINFO: Kernel supports tmpfs
tst_supported_fs_types.c:42: TINFO: mkfs is not needed for tmpfs
tst_test.c:1634: TINFO: === Testing on ext2 ===
tst_test.c:1093: TINFO: Formatting /dev/loop0 with ext2 opts='' extra opts=''
mke2fs 1.46.5 (30-Dec-2021)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_RDONLY set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSUID set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODEV set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOEXEC set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSYMFOLLOW set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODIRATIME set failed: ENOSYS (38)
tst_test.c:1634: TINFO: === Testing on ext3 ===
tst_test.c:1093: TINFO: Formatting /dev/loop0 with ext3 opts='' extra opts=''
mke2fs 1.46.5 (30-Dec-2021)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_RDONLY set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSUID set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODEV set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOEXEC set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSYMFOLLOW set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODIRATIME set failed: ENOSYS (38)
tst_test.c:1634: TINFO: === Testing on ext4 ===
tst_test.c:1093: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
mke2fs 1.46.5 (30-Dec-2021)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_RDONLY set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSUID set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODEV set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOEXEC set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSYMFOLLOW set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODIRATIME set failed: ENOSYS (38)
tst_test.c:1634: TINFO: === Testing on xfs ===
tst_test.c:1093: TINFO: Formatting /dev/loop0 with xfs opts='' extra opts=''
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_RDONLY set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSUID set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODEV set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOEXEC set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSYMFOLLOW set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODIRATIME set failed: ENOSYS (38)
tst_test.c:1634: TINFO: === Testing on vfat ===
tst_test.c:1093: TINFO: Formatting /dev/loop0 with vfat opts='' extra opts=''
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_RDONLY set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSUID set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODEV set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOEXEC set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSYMFOLLOW set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODIRATIME set failed: ENOSYS (38)
tst_test.c:1634: TINFO: === Testing on tmpfs ===
tst_test.c:1093: TINFO: Skipping mkfs for TMPFS filesystem
tst_test.c:1074: TINFO: Limiting tmpfs size to 32MB
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_RDONLY set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSUID set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODEV set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOEXEC set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NOSYMFOLLOW set failed: ENOSYS (38)
mount_setattr01.c:93: TFAIL: MOUNT_ATTR_NODIRATIME set failed: ENOSYS (38)

Summary:
passed   0
failed   36
broken   0
skipped  0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=1 cstime=5
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20220527-692-g147bb6499

       ###############################################################

            Done executing testcases.
            LTP Version:  20220527-692-g147bb6499
       ###############################################################


Expected results:
case pass

Additional info:
[root@qibo-anolis23-nightly-func-x86-1 ltp]# uname -r
5.10.134-62.git.3077700446b3.an23.x86_64
[root@qibo-anolis23-nightly-func-x86-1 ltp]# cat /etc/anolis-release
Anolis OS release 23
[root@qibo-anolis23-nightly-func-x86-1 ltp]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.0M     0  4.0M   0% /dev
tmpfs           7.6G     0  7.6G   0% /dev/shm
tmpfs           3.1G  612K  3.1G   1% /run
/dev/vda1        40G   18G   23G  43% /
tmpfs           7.6G  1.6G  6.1G  21% /tmp
tmpfs           1.6G     0  1.6G   0% /run/user/0
[root@qibo-anolis23-nightly-func-x86-1 ltp]# free -g
               total        used        free      shared  buff/cache   available
Mem:              15           0          12           1           1          12
Swap:              0           0           0
[root@qibo-anolis23-nightly-func-x86-1 ltp]# lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         46 bits physical, 57 bits virtual
  Byte Order:            Little Endian
CPU(s):                  4
  On-line CPU(s) list:   0-3
Vendor ID:               GenuineIntel
  BIOS Vendor ID:        Alibaba Cloud
  Model name:            Intel(R) Xeon(R) Platinum 8369B CPU @ 2.70GHz
    BIOS Model name:     pc-i440fx-2.1  CPU @ 0.0GHz
    BIOS CPU family:     1
    CPU family:          6
    Model:               106
    Thread(s) per core:  2
    Core(s) per socket:  2
    Socket(s):           1
    Stepping:            6
    BogoMIPS:            5399.99
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss
                         ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid tsc_known_freq pni pclmu
                         lqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervis
                         or lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 s
                         mep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx
                         512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi pku ospke avx512_vbmi2 gfni va
                         es vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm arch_capabilities
Virtualization features:
  Hypervisor vendor:     KVM
  Virtualization type:   full
Caches (sum of all):
  L1d:                   96 KiB (2 instances)
  L1i:                   64 KiB (2 instances)
  L2:                    2.5 MiB (2 instances)
  L3:                    48 MiB (1 instance)
NUMA:
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-3
Vulnerabilities:
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
  Retbleed:              Not affected
  Spec store bypass:     Vulnerable
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Enhanced IBRS, RSB filling, PBRSB-eIBRS SW sequence
  Srbds:                 Not affected
  Tsx async abort:       Not affected
[root@qibo-anolis23-nightly-func-x86-1 ltp]# cat /proc/cmdline
BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-5.10.134-62.git.3077700446b3.an23.x86_64 root=UUID=ece72b7f-465b-433d-8b3b-e5fa53a04642 ro rhgb cryptomgr.notests rcupdate.rcu_cpu_stall_timeout=300 quiet biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200n8 noibrs nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295 cgroup.memory=nokmem crashkernel=0M-2G:0M,2G-8G:192M,8G-:256M
Comment 1 yunmeng365524 2023-06-13 21:33:05 UTC
6.13号的nightly同样全部失败了。an8上没有支持,因此SKIP掉了。请开发同学帮忙分析一下。
如下是an8上的执行日志。
tst_test.c:1065: TINFO: Formatting /dev/loop0 with ext2 opts='' extra opts=''
mke2fs 1.45.6 (20-Mar-2020)
../../../../include/lapi/fsmount.h:111: TCONF: syscall(442) __NR_mount_setattr not supported on your arch
tst_test.c:1599: TINFO: Testing on ext3
tst_test.c:1065: TINFO: Formatting /dev/loop0 with ext3 opts='' extra opts=''
mke2fs 1.45.6 (20-Mar-2020)
../../../../include/lapi/fsmount.h:111: TCONF: syscall(442) __NR_mount_setattr not supported on your arch
tst_test.c:1599: TINFO: Testing on ext4
tst_test.c:1065: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
mke2fs 1.45.6 (20-Mar-2020)
../../../../include/lapi/fsmount.h:111: TCONF: syscall(442) __NR_mount_setattr not supported on your arch
tst_test.c:1599: TINFO: Testing on xfs
tst_test.c:1065: TINFO: Formatting /dev/loop0 with xfs opts='' extra opts=''
../../../../include/lapi/fsmount.h:111: TCONF: syscall(442) __NR_mount_setattr not supported on your arch
tst_test.c:1599: TINFO: Testing on vfat
tst_test.c:1065: TINFO: Formatting /dev/loop0 with vfat opts='' extra opts=''
../../../../include/lapi/fsmount.h:111: TCONF: syscall(442) __NR_mount_setattr not supported on your arch
tst_test.c:1599: TINFO: Testing on tmpfs
tst_test.c:1065: TINFO: Skipping mkfs for TMPFS filesystem
tst_test.c:1045: TINFO: Limiting tmpfs size to 32MB
../../../../include/lapi/fsmount.h:111: TCONF: syscall(442) __NR_mount_setattr not supported on your arch
Comment 2 Ferry Meng alibaba_cloud_group 2023-06-28 10:00:18 UTC
2a1867219c7b fs: add mount_setattr()

mount_attr是linux 5.12 新增的系统调用,在5.10内核下,应该skip该测试。
Comment 3 Ferry Meng alibaba_cloud_group 2023-06-28 12:45:36 UTC
具体解释一下为什么a8会skip而a23不会。

ltp在 configure 阶段,会创建一个 conftest.c 文件,编译并判断glibc中是否存在某一系统调用。如果存在,就会设置 HAVE_MOUNT_SETATTR 该宏为 1 。该宏最终控制syscall的测试是否TPASS。


在a23中,该宏为1,configure阶段的log如下:

configure:5419: checking for mount_setattr
configure:5419: gcc -o conftest -g -O2   conftest.c  >&5
configure:5419: $? = 0
configure:5419: result: yes

在a23中,该宏不存在,configure阶段的log如下:

configure:5219: checking for mount_setattr
configure:5219: gcc -o conftest -g -O2   conftest.c  >&5
/tmp/ccRM1gWI.o: In function `main':
/root/myltp/ltp/conftest.c:111: undefined reference to `mount_setattr'
collect2: error: ld returned 1 exit status
configure:5219: $? = 1

报错信息为,在链接阶段找不到mount_setattr函数,该函数应该是由libc提供的。用grep在/usr目录下搜索:

[anolis23]# grep -nr "mount_setattr" /usr
grep: /usr/lib64/libc.so.6: binary file matches
grep: /usr/lib64/libc.a: binary file matches

而a8中不包含该检索结果,问题应该出在libc上。
用ldd -version 查看c库版本, a8为 2.28 , a23为2.36。

总结一下,建议以后a23测试跳过该case。视业务实际需要,回合mount_setattr这一特性后再开启
Comment 4 Ferry Meng alibaba_cloud_group 2023-06-28 12:47:26 UTC
> 具体解释一下为什么a8会skip而a23不会。
> 
> ltp在 configure 阶段,会创建一个 conftest.c 文件,编译并判断glibc中是否存在某一系统调用。如果存在,就会设置
> HAVE_MOUNT_SETATTR 该宏为 1 。该宏最终控制syscall的测试是否TPASS。
> 

是TSKIP,笔误。