[缺陷描述]: 背景:xfstests测试代码同步合入gitee xfstests 5.10代码后,新增此用例失败; 失败日志如下: # ./check -overlay overlay/075 FSTYP -- overlay PLATFORM -- Linux/aarch64 VM20200706-16 5.10.134-14.1.al8.aarch64 #1 SMP Thu May 18 13:19:46 CST 2023 MKFS_OPTIONS -- /fs/vdb2 MOUNT_OPTIONS -- /fs/vdb2 /fs/vdb2/ovl-mnt overlay/075 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/075.out.bad) --- tests/overlay/075.out 2023-05-22 10:58:05.914006464 +0800 +++ /tmp/tone/run/xfstests/results//overlay/075.out.bad 2023-05-22 15:47:31.447334715 +0800 @@ -5,7 +5,71 @@ testing immutable as non-root...PASS. testing append-only as non-root...PASS. After directories copy up -testing immutable...PASS. -testing append-only...PASS. -testing immutable as non-root...PASS. -testing append-only as non-root...PASS. ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/075.out /tmp/tone/run/xfstests/results//overlay/075.out.bad' to see the entire diff) Ran: overlay/075 Failures: overlay/075 Failed 1 of 1 tests [复现概率]: 必现 [复现环境]: 内核: # uname -r 5.10.134-14.1.al8.aarch64 # cat /etc/os-release NAME="Alibaba Cloud Linux" VERSION="3 (Soaring Falcon)" ID="alinux" ID_LIKE="rhel fedora centos anolis" VERSION_ID="3" PLATFORM_ID="platform:al8" PRETTY_NAME="Alibaba Cloud Linux 3 (Soaring Falcon)" ANSI_COLOR="0;31" HOME_URL="https://www.aliyun.com/" 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): 4 Cluster(s): 1 NUMA node(s): 1 Vendor ID: HiSilicon BIOS Vendor ID: Alibaba Cloud Model: 0 Model name: Kunpeng-920 BIOS Model name: virt-rhel7.6.0 Stepping: 0x1 BogoMIPS: 200.00 NUMA node0 CPU(s): 0-3 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm 内存信息: # free -h total used free shared buff/cache available Mem: 15Gi 326Mi 14Gi 0.0Ki 532Mi 14Gi Swap: 0B 0B 0B [复现步骤]: 1.下载并编译测试套 git clone --branch kernel-5.10 https://code.alibaba-inc.com/AKTF/xfstests-dev.git cd xfstests export CFLAGS="-fcommon" make configure ./configure make && make install 2.初始化测试盘 dmsetup remove_all wipefs -a --force /dev/vdb1 wipefs -a --force /dev/vdb2 mkfs -t ext4 -q -F /dev/vdb1 mkfs -t ext4 -q -F /dev/vdb2 mkdir -p /fs/vdb1 mount -t ext4 /dev/vdb1 /fs/vdb1 mkdir -p /fs/vdb2 mount -t ext4 /dev/vdb2 /fs/vdb2 umount -f -l /fs/vdb1 /fs/vdb2 3.设置环境变量 export TEST_DIR=/fs/vdb1 export TEST_DEV=/dev/vdb1 export FSTYP=ext4 export SCRATCH_DEV=/dev/vdb2 export SCRATCH_MNT=/fs/vdb2 4.执行测试用例 ./check -overlay overlay/075 [预期结果]: 用例执行成功 [实际结果]: 用例执行失败
anolis8 4.19 aarch64环境该case有相类似的问题 -------------------------------- [root@l57h15217 xfstests]# ./check -overlay overlay/075 mount: /mnt/nvme0n1p1: can't find in /etc/fstab. FSTYP -- overlay PLATFORM -- Linux/aarch64 l57h15217 4.19.91-732.git.205df27f7.an8.aarch64 #1 SMP Wed May 24 13:55:24 UTC 2023 MKFS_OPTIONS -- /mnt/nvme0n1p2 MOUNT_OPTIONS -- /mnt/nvme0n1p2 /mnt/nvme0n1p2/ovl-mnt umount: /mnt/nvme0n1p2: not mounted. mount: /mnt/nvme0n1p1: can't find in /etc/fstab. umount: /mnt/nvme0n1p1: not mounted. overlay/075 mount: /mnt/nvme0n1p2: can't find in /etc/fstab. umount: /mnt/nvme0n1p2: not mounted. - output mismatch (see /tmp/tone/run/xfstests/results//overlay/075.out.bad) --- tests/overlay/075.out 2023-05-25 04:28:47.213330965 +0800 +++ /tmp/tone/run/xfstests/results//overlay/075.out.bad 2023-05-25 09:44:12.681247922 +0800 @@ -1,11 +1,81 @@ QA output created by 075 +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. Before directories copy up testing immutable...PASS. testing append-only...PASS. testing immutable as non-root...PASS. ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/075.out /tmp/tone/run/xfstests/results//overlay/075.out.bad' to see the entire diff) Ran: overlay/075 Failures: overlay/075 Failed 1 of 1 tests [root@l57h15217 xfstests]# diff -u /tmp/tone/run/xfstests/tests/overlay/075.out /tmp/tone/run/xfstests/results//overlay/075.out.bad --- /tmp/tone/run/xfstests/tests/overlay/075.out 2023-05-25 04:28:47.213330965 +0800 +++ /tmp/tone/run/xfstests/results//overlay/075.out.bad 2023-05-25 09:44:12.681247922 +0800 @@ -1,11 +1,81 @@ QA output created by 075 +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. Before directories copy up testing immutable...PASS. testing append-only...PASS. testing immutable as non-root...PASS. testing append-only as non-root...PASS. +umount: /mnt/nvme0n1p2: not mounted. +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. +rm: cannot remove '/mnt/nvme0n1p2/ovl-mnt/testdir.before/empty-append-only.d': Operation not permitted +rm: cannot remove '/mnt/nvme0n1p2/ovl-mnt/testdir.before/empty-immutable.d': Operation not permitted After directories copy up -testing immutable...PASS. -testing append-only...PASS. -testing immutable as non-root...PASS. -testing append-only as non-root...PASS. +link(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/file, /mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/file.link) did not fail +symlink(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/file, /mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/file.link) did not fail +rename(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/file, /mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/file.newname) did not fail +unlink(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/file) did not fail +open(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/newfile, O_RDWR|O_CREAT, 0666) did not fail +mknod(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/newfile, S_IFCHR|0666, 259) did not fail +mkdir(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/newdir, 0777) did not fail +rmdir(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d/dir) did not set errno == EACCES or EPERM +utime(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d, <epoch>) did not fail +utime(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d, NULL) did not fail +chmod(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d, 7777) did not fail +chown(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d, 1, 1) did not fail +del_acl(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d) did not fail +add_acl(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d, trusted.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d, trusted.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d, trusted.test) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d, user.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d, user.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/mnt/nvme0n1p2/ovl-mnt/testdir/immutable.d, user.test) did not fail +rmdir(/mnt/nvme0n1p2/ovl-mnt/testdir/empty-immutable.d) did not set errno == EPERM +open(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_RDWR) did not fail +open(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_WRONLY) did not fail +open(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_RDWR|O_TRUNC) did not fail +open(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_WRONLY|O_TRUNC) did not fail +open(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_RDWR|O_APPEND|O_TRUNC) did not fail +open(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_WRONLY|O_APPEND|O_TRUNC) did not fail +ftruncate(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, 0) did not fail +truncate(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, 0) did not fail +utime(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, <epoch>) did not fail +link(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, /mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f.hardlink) did not fail +chmod(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, 7777) did not fail +chown(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, 1, 1) did not fail +del_acl(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f) did not fail +add_acl(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, trusted.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, trusted.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, trusted.test) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, user.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, user.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, user.test) did not fail +rename(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f, /mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f.newname) did not fail +unlink(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.f) did not fail +unlink(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/file.link-0) did not fail +unlink(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/file.symlink-0) did not fail +rename(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/file, /mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/file.newname) did not fail +unlink(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/file) did not fail +unlink(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/newfile-0) did not fail +unlink(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/newdev-0) did not fail +rmdir(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/newdir-0) did not fail +open(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/newdir-0/newfile-0, O_RDWR|O_CREAT, 0666) failed: No such file or directory +chmod(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/newdir-0/newfile-0, 0700) failed: No such file or directory +chown(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/newdir-0/newfile-0, 1, 1) failed: No such file or directory +rmdir(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d/dir) did not set errno == EPERM +utime(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d, <epoch>) did not fail +chmod(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d, 7777) did not fail +chown(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d, 1, 1) did not fail +del_acl(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d) did not fail +add_acl(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d, trusted.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d, trusted.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d, trusted.test) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d, user.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d, user.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/mnt/nvme0n1p2/ovl-mnt/testdir/append-only.d, user.test) did not fail +rmdir(/mnt/nvme0n1p2/ovl-mnt/testdir/empty-append-only.d) did not set errno == EPERM +testing immutable...FAILED! (21 tests failed) +testing append-only...FAILED! (45 tests failed)
anolis8-5.10-aarch存在同样的问题,日志如下: overlay/075 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/075.out.bad) --- tests/overlay/075.out 2023-05-29 12:16:09.101132460 +0800 +++ /tmp/tone/run/xfstests/results//overlay/075.out.bad 2023-05-29 14:42:29.677132460 +0800 @@ -5,7 +5,71 @@ testing immutable as non-root...PASS. testing append-only as non-root...PASS. After directories copy up -testing immutable...PASS. -testing append-only...PASS. -testing immutable as non-root...PASS. -testing append-only as non-root...PASS. ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/075.out /tmp/tone/run/xfstests/results//overlay/075.out.bad' to see the entire diff)
an8 5.10 x86 nightly存在同样问题 # uname -r 5.10.134-706.git.9eb9e601b.an8.x86_64 overlay/075 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/075.out.bad) --- tests/overlay/075.out 2023-05-31 09:47:53.941143588 +0800 +++ /tmp/tone/run/xfstests/results//overlay/075.out.bad 2023-05-31 10:35:35.476148198 +0800 @@ -5,7 +5,71 @@ testing immutable as non-root...PASS. testing append-only as non-root...PASS. After directories copy up -testing immutable...PASS. -testing append-only...PASS. -testing immutable as non-root...PASS. -testing append-only as non-root...PASS. ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/075.out /tmp/tone/run/xfstests/results//overlay/075.out.bad' to see the entire diff)
alinux2 nightly内核有同样问题 # uname -r 4.19.91-1425.git.f083b89c83ab.al7.x86_64 overlay/075 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/075.out.bad) --- tests/overlay/075.out 2023-05-31 11:03:33.771548324 +0800 +++ /tmp/tone/run/xfstests/results//overlay/075.out.bad 2023-05-31 15:40:18.440190533 +0800 @@ -4,8 +4,74 @@ testing append-only...PASS. testing immutable as non-root...PASS. testing append-only as non-root...PASS. +rm: cannot remove '/fs/vdb2/ovl-mnt/testdir.before/empty-immutable.d': Operation not permitted +rm: cannot remove '/fs/vdb2/ovl-mnt/testdir.before/empty-append-only.d': Operation not permitted After directories copy up -testing immutable...PASS. ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/075.out /tmp/tone/run/xfstests/results//overlay/075.out.bad' to see the entire diff) # diff -u /tmp/tone/run/xfstests/tests/overlay/075.out /tmp/tone/run/xfstests/results//overlay/075.out.bad --- /tmp/tone/run/xfstests/tests/overlay/075.out 2023-05-31 11:03:33.771548324 +0800 +++ /tmp/tone/run/xfstests/results//overlay/075.out.bad 2023-05-31 15:40:18.440190533 +0800 @@ -4,8 +4,74 @@ testing append-only...PASS. testing immutable as non-root...PASS. testing append-only as non-root...PASS. +rm: cannot remove '/fs/vdb2/ovl-mnt/testdir.before/empty-immutable.d': Operation not permitted +rm: cannot remove '/fs/vdb2/ovl-mnt/testdir.before/empty-append-only.d': Operation not permitted After directories copy up -testing immutable...PASS. -testing append-only...PASS. -testing immutable as non-root...PASS. -testing append-only as non-root...PASS. +link(/fs/vdb2/ovl-mnt/testdir/immutable.d/file, /fs/vdb2/ovl-mnt/testdir/immutable.d/file.link) did not fail +symlink(/fs/vdb2/ovl-mnt/testdir/immutable.d/file, /fs/vdb2/ovl-mnt/testdir/immutable.d/file.link) did not fail +rename(/fs/vdb2/ovl-mnt/testdir/immutable.d/file, /fs/vdb2/ovl-mnt/testdir/immutable.d/file.newname) did not fail +unlink(/fs/vdb2/ovl-mnt/testdir/immutable.d/file) did not fail +open(/fs/vdb2/ovl-mnt/testdir/immutable.d/newfile, O_RDWR|O_CREAT, 0666) did not fail +mknod(/fs/vdb2/ovl-mnt/testdir/immutable.d/newfile, S_IFCHR|0666, 259) did not fail +mkdir(/fs/vdb2/ovl-mnt/testdir/immutable.d/newdir, 0777) did not fail +rmdir(/fs/vdb2/ovl-mnt/testdir/immutable.d/dir) did not set errno == EACCES or EPERM +utime(/fs/vdb2/ovl-mnt/testdir/immutable.d, <epoch>) did not fail +utime(/fs/vdb2/ovl-mnt/testdir/immutable.d, NULL) did not fail +chmod(/fs/vdb2/ovl-mnt/testdir/immutable.d, 7777) did not fail +chown(/fs/vdb2/ovl-mnt/testdir/immutable.d, 1, 1) did not fail +del_acl(/fs/vdb2/ovl-mnt/testdir/immutable.d) did not fail +add_acl(/fs/vdb2/ovl-mnt/testdir/immutable.d) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/immutable.d, trusted.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/immutable.d, trusted.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/vdb2/ovl-mnt/testdir/immutable.d, trusted.test) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/immutable.d, user.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/immutable.d, user.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/vdb2/ovl-mnt/testdir/immutable.d, user.test) did not fail +rmdir(/fs/vdb2/ovl-mnt/testdir/empty-immutable.d) did not set errno == EPERM +open(/fs/vdb2/ovl-mnt/testdir/append-only.f, O_RDWR) did not fail +open(/fs/vdb2/ovl-mnt/testdir/append-only.f, O_WRONLY) did not fail +open(/fs/vdb2/ovl-mnt/testdir/append-only.f, O_RDWR|O_TRUNC) did not fail +open(/fs/vdb2/ovl-mnt/testdir/append-only.f, O_WRONLY|O_TRUNC) did not fail +open(/fs/vdb2/ovl-mnt/testdir/append-only.f, O_RDWR|O_APPEND|O_TRUNC) did not fail +open(/fs/vdb2/ovl-mnt/testdir/append-only.f, O_WRONLY|O_APPEND|O_TRUNC) did not fail +ftruncate(/fs/vdb2/ovl-mnt/testdir/append-only.f, 0) did not fail +truncate(/fs/vdb2/ovl-mnt/testdir/append-only.f, 0) did not fail +utime(/fs/vdb2/ovl-mnt/testdir/append-only.f, <epoch>) did not fail +link(/fs/vdb2/ovl-mnt/testdir/append-only.f, /fs/vdb2/ovl-mnt/testdir/append-only.f.hardlink) did not fail +chmod(/fs/vdb2/ovl-mnt/testdir/append-only.f, 7777) did not fail +chown(/fs/vdb2/ovl-mnt/testdir/append-only.f, 1, 1) did not fail +del_acl(/fs/vdb2/ovl-mnt/testdir/append-only.f) did not fail +add_acl(/fs/vdb2/ovl-mnt/testdir/append-only.f) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/append-only.f, trusted.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/append-only.f, trusted.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/vdb2/ovl-mnt/testdir/append-only.f, trusted.test) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/append-only.f, user.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/append-only.f, user.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/vdb2/ovl-mnt/testdir/append-only.f, user.test) did not fail +rename(/fs/vdb2/ovl-mnt/testdir/append-only.f, /fs/vdb2/ovl-mnt/testdir/append-only.f.newname) did not fail +unlink(/fs/vdb2/ovl-mnt/testdir/append-only.f) did not fail +unlink(/fs/vdb2/ovl-mnt/testdir/append-only.d/file.link-0) did not fail +unlink(/fs/vdb2/ovl-mnt/testdir/append-only.d/file.symlink-0) did not fail +rename(/fs/vdb2/ovl-mnt/testdir/append-only.d/file, /fs/vdb2/ovl-mnt/testdir/append-only.d/file.newname) did not fail +unlink(/fs/vdb2/ovl-mnt/testdir/append-only.d/file) did not fail +unlink(/fs/vdb2/ovl-mnt/testdir/append-only.d/newfile-0) did not fail +unlink(/fs/vdb2/ovl-mnt/testdir/append-only.d/newdev-0) did not fail +rmdir(/fs/vdb2/ovl-mnt/testdir/append-only.d/newdir-0) did not fail +open(/fs/vdb2/ovl-mnt/testdir/append-only.d/newdir-0/newfile-0, O_RDWR|O_CREAT, 0666) failed: No such file or directory +chmod(/fs/vdb2/ovl-mnt/testdir/append-only.d/newdir-0/newfile-0, 0700) failed: No such file or directory +chown(/fs/vdb2/ovl-mnt/testdir/append-only.d/newdir-0/newfile-0, 1, 1) failed: No such file or directory +rmdir(/fs/vdb2/ovl-mnt/testdir/append-only.d/dir) did not set errno == EPERM +utime(/fs/vdb2/ovl-mnt/testdir/append-only.d, <epoch>) did not fail +chmod(/fs/vdb2/ovl-mnt/testdir/append-only.d, 7777) did not fail +chown(/fs/vdb2/ovl-mnt/testdir/append-only.d, 1, 1) did not fail +del_acl(/fs/vdb2/ovl-mnt/testdir/append-only.d) did not fail +add_acl(/fs/vdb2/ovl-mnt/testdir/append-only.d) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/append-only.d, trusted.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/append-only.d, trusted.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/vdb2/ovl-mnt/testdir/append-only.d, trusted.test) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/append-only.d, user.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/vdb2/ovl-mnt/testdir/append-only.d, user.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/vdb2/ovl-mnt/testdir/append-only.d, user.test) did not fail +rmdir(/fs/vdb2/ovl-mnt/testdir/empty-append-only.d) did not set errno == EPERM +testing immutable...FAILED! (21 tests failed) +testing append-only...FAILED! (45 tests failed)
anolis8 4.19 x86_64也有同样问题 # uname -r 4.19.91-739.git.f083b89c83.an8.x86_64 overlay/075 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/075.out.bad) --- tests/overlay/075.out 2023-06-01 10:09:53.062521906 +0800 +++ /tmp/tone/run/xfstests/results//overlay/075.out.bad 2023-06-01 10:22:45.110512202 +0800 @@ -4,8 +4,74 @@ testing append-only...PASS. testing immutable as non-root...PASS. testing append-only as non-root...PASS. +rm: cannot remove '/fs/nvme0n1p2/ovl-mnt/testdir.before/empty-append-only.d': Operation not permitted +rm: cannot remove '/fs/nvme0n1p2/ovl-mnt/testdir.before/empty-immutable.d': Operation not permitted After directories copy up -testing immutable...PASS. ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/075.out /tmp/tone/run/xfstests/results//overlay/075.out.bad' to see the entire diff) Ran: overlay/075 Failures: overlay/075 Failed 1 of 1 tests [tone]Error: The return code of run() in run.sh is not 0 overlay/075: Failed Test running: Done # diff -u /tmp/tone/run/xfstests/tests/overlay/075.out /tmp/tone/run/xfstests/results//overlay/075.out.bad --- /tmp/tone/run/xfstests/tests/overlay/075.out 2023-06-01 10:09:53.062521906 +0800 +++ /tmp/tone/run/xfstests/results//overlay/075.out.bad 2023-06-01 10:22:45.110512202 +0800 @@ -4,8 +4,74 @@ testing append-only...PASS. testing immutable as non-root...PASS. testing append-only as non-root...PASS. +rm: cannot remove '/fs/nvme0n1p2/ovl-mnt/testdir.before/empty-append-only.d': Operation not permitted +rm: cannot remove '/fs/nvme0n1p2/ovl-mnt/testdir.before/empty-immutable.d': Operation not permitted After directories copy up -testing immutable...PASS. -testing append-only...PASS. -testing immutable as non-root...PASS. -testing append-only as non-root...PASS. +link(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/file, /fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/file.link) did not fail +symlink(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/file, /fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/file.link) did not fail +rename(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/file, /fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/file.newname) did not fail +unlink(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/file) did not fail +open(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/newfile, O_RDWR|O_CREAT, 0666) did not fail +mknod(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/newfile, S_IFCHR|0666, 259) did not fail +mkdir(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/newdir, 0777) did not fail +rmdir(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d/dir) did not set errno == EACCES or EPERM +utime(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d, <epoch>) did not fail +utime(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d, NULL) did not fail +chmod(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d, 7777) did not fail +chown(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d, 1, 1) did not fail +del_acl(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d) did not fail +add_acl(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d, trusted.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d, trusted.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d, trusted.test) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d, user.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d, user.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/nvme0n1p2/ovl-mnt/testdir/immutable.d, user.test) did not fail +rmdir(/fs/nvme0n1p2/ovl-mnt/testdir/empty-immutable.d) did not set errno == EPERM +open(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_RDWR) did not fail +open(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_WRONLY) did not fail +open(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_RDWR|O_TRUNC) did not fail +open(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_WRONLY|O_TRUNC) did not fail +open(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_RDWR|O_APPEND|O_TRUNC) did not fail +open(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, O_WRONLY|O_APPEND|O_TRUNC) did not fail +ftruncate(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, 0) did not fail +truncate(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, 0) did not fail +utime(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, <epoch>) did not fail +link(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, /fs/nvme0n1p2/ovl-mnt/testdir/append-only.f.hardlink) did not fail +chmod(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, 7777) did not fail +chown(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, 1, 1) did not fail +del_acl(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f) did not fail +add_acl(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, trusted.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, trusted.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, trusted.test) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, user.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, user.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, user.test) did not fail +rename(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f, /fs/nvme0n1p2/ovl-mnt/testdir/append-only.f.newname) did not fail +unlink(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.f) did not fail +unlink(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/file.link-0) did not fail +unlink(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/file.symlink-0) did not fail +rename(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/file, /fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/file.newname) did not fail +unlink(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/file) did not fail +unlink(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/newfile-0) did not fail +unlink(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/newdev-0) did not fail +rmdir(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/newdir-0) did not fail +open(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/newdir-0/newfile-0, O_RDWR|O_CREAT, 0666) failed: No such file or directory +chmod(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/newdir-0/newfile-0, 0700) failed: No such file or directory +chown(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/newdir-0/newfile-0, 1, 1) failed: No such file or directory +rmdir(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d/dir) did not set errno == EPERM +utime(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d, <epoch>) did not fail +chmod(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d, 7777) did not fail +chown(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d, 1, 1) did not fail +del_acl(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d) did not fail +add_acl(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d, trusted.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d, trusted.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d, trusted.test) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d, user.test, scribble, 8, XATTR_REPLACE) did not fail +setxattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d, user.scribble, scribble, 8, XATTR_CREATE) did not fail +removexattr(/fs/nvme0n1p2/ovl-mnt/testdir/append-only.d, user.test) did not fail +rmdir(/fs/nvme0n1p2/ovl-mnt/testdir/empty-append-only.d) did not set errno == EPERM +testing immutable...FAILED! (21 tests failed) +testing append-only...FAILED! (45 tests failed)
请安排一位同学分析一下,这是新版xftests出现的问题。
https://lore.kernel.org/linux-fsdevel/20210325193755.294925-1-mszeredi@redhat.com/ VFS和各个文件系统需要backport一个series: https://lore.kernel.org/linux-fsdevel/20210325193755.294925-1-mszeredi@redhat.com/ 这个测试用来测试overlayfs在copyup时append-only等等flag是否继承了,目前认为这些flag copyup时没有继承影响较小(stable也没有backport这个系列),当然有时间也可以backport下整个系列。
暂不修复。