Bug 22275 - [Anolis23-6.6.88][aarch64]xfstests->xfs/157测试失败,尝试使用一个非常大的日志设备,但是mkfs.xfs不允许超过1048576 blocks
Summary: [Anolis23-6.6.88][aarch64]xfstests->xfs/157测试失败,尝试使用一个非常大的日志设备,但是mkfs.xfs不允许超...
Status: NEW
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: lv0322
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-01 17:19 UTC by yunhe123
Modified: 2025-07-03 15:23 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 2025-07-01 17:19:56 UTC
Description of problem:
xfstests->xfs/157测试失败,mkfs.xfs 因日志大小超出限制失败,具体日志如下:

xfs/157       - output mismatch (see /var/tmp/tone/run/xfstests/results//xfs/157.out.bad)
    --- tests/xfs/157.out       2025-07-01 11:32:23.327703440 +0800
    +++ /var/tmp/tone/run/xfstests/results//xfs/157.out.bad     2025-07-01 15:42:36.070608211 +0800
    @@ -6,8 +6,37 @@
     label = "oldlabel"
     label = "newlabel"
     S3: Check that setting with rtdev works
    -label = "oldlabel"
    +log size 3124992 blocks too large, maximum size is 1048576 blocks
    +Usage: mkfs.xfs
    +/* blocksize */            [-b size=num]
    ...
    (Run 'diff -u /var/tmp/tone/run/xfstests/tests/xfs/157.out /var/tmp/tone/run/xfstests/results//xfs/157.out.bad'  to see the entire diff)


# diff -u /var/tmp/tone/run/xfstests/tests/xfs/157.out /var/tmp/tone/run/xfstests/results//xfs/157.out.bad
--- /var/tmp/tone/run/xfstests/tests/xfs/157.out        2025-07-01 11:32:23.327703440 +0800
+++ /var/tmp/tone/run/xfstests/results//xfs/157.out.bad 2025-07-01 15:42:36.070608211 +0800
@@ -6,8 +6,37 @@
 label = "oldlabel"
 label = "newlabel"
 S3: Check that setting with rtdev works
-label = "oldlabel"
+log size 3124992 blocks too large, maximum size is 1048576 blocks
+Usage: mkfs.xfs
+/* blocksize */                [-b size=num]
+/* config file */      [-c options=xxx]
+/* metadata */         [-m crc=0|1,finobt=0|1,uuid=xxx,rmapbt=0|1,reflink=0|1,
+                           inobtcount=0|1,bigtime=0|1]
+/* data subvol */      [-d agcount=n,agsize=n,file,name=xxx,size=num,
+                           (sunit=value,swidth=value|su=num,sw=num|noalign),
+                           sectsize=num
+/* force overwrite */  [-f]
+/* inode size */       [-i perblock=n|size=num,maxpct=n,attr=0|1|2,
+                           projid32bit=0|1,sparse=0|1,nrext64=0|1]
+/* no discard */       [-K]
+/* log subvol */       [-l agnum=n,internal,size=num,logdev=xxx,version=n
+                           sunit=value|su=num,sectsize=num,lazy-count=0|1]
+/* label */            [-L label (maximum 12 characters)]
+/* naming */           [-n size=num,version=2|ci,ftype=0|1]
+/* no-op info only */  [-N]
+/* prototype file */   [-p fname]
+/* quiet */            [-q]
+/* realtime subvol */  [-r extsize=num,size=num,rtdev=xxx]
+/* sectorsize */       [-s size=num]
+/* version */          [-V]
+                       devicename
+<devicename> is required unless -d name=xxx is given.
+<num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),
+      xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB).
+<value> is xxx (512 byte blocks).
+label = "newlabel"
 label = "newlabel"
+Check failed?
 S4: Check that setting with rtdev + logdev works
 label = "oldlabel"
 label = "newlabel"



Version-Release number of selected component (if applicable):
# rpm -qa |grep xfsprogs
xfsprogs-6.6.0-1.an23.aarch64
xfsprogs-devel-6.6.0-1.an23.aarch64



How reproducible:
必现


Steps to Reproduce:
# 下载并编译测试套
git clone http://gitlab-sp.alibaba-inc.com/AKTF/xfstests-dev.git -b anck-6.6
cd xfstests-dev
make

# 测试准备
wipefs -a -f /dev/vdb
wipefs -a -f /dev/vdb
partprobe /dev/vdb
parted -s /dev/vdb mklabel gpt mkpart primary 2048 12800
partprobe /dev/vdb
parted -s /dev/vdb mkpart primary 12800 25600
partprobe /dev/vdb
parted -s /dev/vdb mkpart primary 25600 38400
partprobe /dev/vdb
parted -s /dev/vdb mkpart primary 38400 51200
mkfs -t xfs -L tone -q -f  -f /dev/vdb2
mount -o inode64 /dev/vdb2 /fs/vdb2
mkfs -t xfs -L tone -q -f  -f /dev/vdb1
mount -o inode64 /dev/vdb1 /fs/vdb1
mkfs -t xfs -L tone -q -f  -f /dev/vdb3
mount -o inode64 /dev/vdb3 /fs/vdb3
mkfs -t xfs -L tone -q -f  -f /dev/vdb4
mount -o inode64 /dev/vdb4 /fs/vdb4
umount -l -f /fs/vdb1
umount -l -f /fs/vdb2
umount -l -f /fs/vdb3
umount -l -f /fs/vdb4


# 执行测试
./check xfs/157

Actual results:
用例执行失败


Expected results:
用例执行通过


Additional info:
[环境信息] ECS

# uname -r
6.6.88-cbp.git.1432012a7.an23.aarch64

# free -h
               total        used        free      shared  buff/cache   available
Mem:            15Gi       884Mi       8.2Gi       7.2Mi       6.2Gi        14Gi
Swap:             0B          0B          0B


# lscpu
Architecture:             aarch64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          48 bits physical, 48 bits virtual
  Byte Order:             Little Endian
CPU(s):                   4
  On-line CPU(s) list:    0-3
Vendor ID:                ARM
  BIOS Vendor ID:         Alibaba Cloud
  Model name:             Neoverse-N1
    BIOS Model name:      virt-rhel7.6.0  CPU @ 2.0GHz
    BIOS CPU family:      1
    Model:                1
    Thread(s) per core:   1
    Core(s) per cluster:  4
    Socket(s):            1
    Cluster(s):           1
    Stepping:             r3p1
    BogoMIPS:             50.00
    Flags:                fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
NUMA:
  NUMA node(s):           1
  NUMA node0 CPU(s):      0-3
Vulnerabilities:
  Gather data sampling:   Not affected
  Itlb multihit:          Not affected
  L1tf:                   Not affected
  Mds:                    Not affected
  Meltdown:               Not affected
  Mmio stale data:        Not affected
  Reg file data sampling: Not affected
  Retbleed:               Not affected
  Spec rstack overflow:   Not affected
  Spec store bypass:      Not affected
  Spectre v1:             Mitigation; __user pointer sanitization
  Spectre v2:             Mitigation; CSV2, but not BHB
  Srbds:                  Not affected
  Tsx async abort:        Not affected
Comment 1 gaohongmei 2025-07-03 15:23:03 UTC
anolis23 x86 6.6.88环境,xfstests xfs,xfs/157用例也报这个错

# uname -r
6.6.88-cbp.git.8c112c479.an23.x86_64

# cat /etc/anolis-release 
Anolis OS release 23

# ./check xfs/157
FSTYP         -- xfs (non-debug)
PLATFORM      -- Linux/x86_64 iZbp1buoq4hel9h1qekepsZ 6.6.88-cbp.git.8c112c479.an23.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul  2 22:32:14 CST 2025
MKFS_OPTIONS  -- -f /dev/vdb2
MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/vdb2 /fs/vdb2

xfs/157       - output mismatch (see /tmp/tone/run/xfstests/results//xfs/157.out.bad)
    --- tests/xfs/157.out       2025-07-03 07:12:08.456195741 +0800
    +++ /tmp/tone/run/xfstests/results//xfs/157.out.bad 2025-07-03 15:21:55.012017493 +0800
    @@ -6,8 +6,37 @@
     label = "oldlabel"
     label = "newlabel"
     S3: Check that setting with rtdev works
    -label = "oldlabel"
    +log size 2499968 blocks too large, maximum size is 1048576 blocks
    +Usage: mkfs.xfs
    +/* blocksize */            [-b size=num]
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/xfs/157.out /tmp/tone/run/xfstests/results//xfs/157.out.bad'  to see the entire diff)
Ran: xfs/157
Failures: xfs/157
Failed 1 of 1 tests