Bug 5286 - [alinux3][aarch64][nightly & ANCK 5.10-014.1]xfstests:ext4-2-overlay测试用例generic/683执行失败,output mismatch:6666 -rwSrwSrw- TEST_DIR/683/a
Summary: [alinux3][aarch64][nightly & ANCK 5.10-014.1]xfstests:ext4-2-overlay测试用例gener...
Status: CLOSED FIXED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: fs (show other bugs) fs
Version: 5.10.y-14
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Ferry Meng
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-23 11:49 UTC by wangpingping
Modified: 2023-09-18 19:09 UTC (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wangpingping alibaba_cloud_group 2023-05-23 11:49:55 UTC
[缺陷描述]:
背景:xfstests测试代码同步合入gitee xfstests 5.10代码后,新增此用例失败;
仅arm失败,x86 skip:generic/683       [not run] fsgqa user not defined.

失败日志如下:
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

generic/683       - output mismatch (see /tmp/tone/run/xfstests/results//generic/683.out.bad)
    --- tests/generic/683.out   2023-05-22 10:58:03.081963771 +0800
    +++ /tmp/tone/run/xfstests/results//generic/683.out.bad     2023-05-23 11:40:42.256955341 +0800
    @@ -1,19 +1,19 @@
     QA output created by 683
     Test 1 - qa_user, non-exec file falloc
     6666 -rwSrwSrw- TEST_DIR/683/a
    -666 -rw-rw-rw- TEST_DIR/683/a
    +6666 -rwSrwSrw- TEST_DIR/683/a

     Test 2 - qa_user, group-exec file falloc
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/683.out /tmp/tone/run/xfstests/results//generic/683.out.bad'  to see the entire diff)
Ran: generic/683
Failures: generic/683
Failed 1 of 1 tests

详细日志与预期结果对比:
# diff -u /tmp/tone/run/xfstests/tests/generic/683.out /tmp/tone/run/xfstests/results//generic/683.out.bad
--- /tmp/tone/run/xfstests/tests/generic/683.out        2023-05-22 10:58:03.081963771 +0800
+++ /tmp/tone/run/xfstests/results//generic/683.out.bad 2023-05-23 11:40:42.256955341 +0800
@@ -1,19 +1,19 @@
 QA output created by 683
 Test 1 - qa_user, non-exec file falloc
 6666 -rwSrwSrw- TEST_DIR/683/a
-666 -rw-rw-rw- TEST_DIR/683/a
+6666 -rwSrwSrw- TEST_DIR/683/a

 Test 2 - qa_user, group-exec file falloc
 6676 -rwSrwsrw- TEST_DIR/683/a
-676 -rw-rwxrw- TEST_DIR/683/a
+6676 -rwSrwsrw- TEST_DIR/683/a

 Test 3 - qa_user, user-exec file falloc
 6766 -rwsrwSrw- TEST_DIR/683/a
-766 -rwxrw-rw- TEST_DIR/683/a
+6766 -rwsrwSrw- TEST_DIR/683/a

 Test 4 - qa_user, all-exec file falloc
 6777 -rwsrwsrwx TEST_DIR/683/a
-777 -rwxrwxrwx TEST_DIR/683/a
+6777 -rwsrwsrwx TEST_DIR/683/a

 Test 5 - root, non-exec file falloc
 6666 -rwSrwSrw- TEST_DIR/683/a
@@ -37,7 +37,7 @@

 Test 10 - qa_user, group-exec file falloc, only sgid
 2676 -rw-rwsrw- TEST_DIR/683/a
-676 -rw-rwxrw- TEST_DIR/683/a
+2676 -rw-rwsrw- TEST_DIR/683/a

 Test 11 - qa_user, user-exec file falloc, only sgid
 2766 -rwxrwSrw- TEST_DIR/683/a
@@ -45,5 +45,5 @@

 Test 12 - qa_user, all-exec file falloc, only sgid
 2777 -rwxrwsrwx TEST_DIR/683/a
-777 -rwxrwxrwx TEST_DIR/683/a
+2777 -rwxrwsrwx TEST_DIR/683/a


[复现概率]:
必现

[复现环境]:
内核:
# 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  generic/683


[预期结果]:
用例执行成功

[实际结果]:
用例执行失败
Comment 1 wangpingping alibaba_cloud_group 2023-05-23 11:52:08 UTC
社区有类似缺陷:https://bugzilla.openanolis.cn/show_bug.cgi?id=1446
Comment 2 wangpingping alibaba_cloud_group 2023-05-23 11:54:02 UTC
overlay文件系统:generic/684,generic/685,generic/686,generic/687有类似问题
Comment 3 wangpingping alibaba_cloud_group 2023-05-23 13:47:03 UTC
anolis7-4.19-x86 ck27.4版本,内核4.19.91-27.4.an7.x86_64有同样失败;

失败日志如下:
generic/683       - output mismatch (see /tmp/tone/run/xfstests/results//generic/683.out.bad)
    --- tests/generic/683.out	2023-05-22 16:40:54.886508354 +0800
    +++ /tmp/tone/run/xfstests/results//generic/683.out.bad	2023-05-22 17:14:09.821635687 +0800
    @@ -1,19 +1,19 @@
     QA output created by 683
     Test 1 - qa_user, non-exec file falloc
     6666 -rwSrwSrw- TEST_DIR/683/a
    -666 -rw-rw-rw- TEST_DIR/683/a
    +6666 -rwSrwSrw- TEST_DIR/683/a
     
     Test 2 - qa_user, group-exec file falloc
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/683.out /tmp/tone/run/xfstests/results//generic/683.out.bad'  to see the entire diff)
Comment 4 ZiyangZhang alibaba_cloud_group 2023-05-24 14:38:23 UTC
(In reply to wangpingping from comment #0)
> [缺陷描述]:
> 背景:xfstests测试代码同步合入gitee xfstests 5.10代码后,新增此用例失败;
> 仅arm失败,x86 skip:generic/683       [not run] fsgqa user not defined.
> 


这个现象是否由于aarch64和x86_64的测试配置不同导致,麻烦先排查一下。该测试用例不依赖体系结构,所以aarch64和x86_64的测试结果应该是一样的
Comment 5 wangpingping alibaba_cloud_group 2023-05-25 09:41:50 UTC
(In reply to ZiyangZhang from comment #4)
> (In reply to wangpingping from comment #0)
> > [缺陷描述]:
> > 背景:xfstests测试代码同步合入gitee xfstests 5.10代码后,新增此用例失败;
> > 仅arm失败,x86 skip:generic/683       [not run] fsgqa user not defined.
> > 
> 
> 
> 这个现象是否由于aarch64和x86_64的测试配置不同导致,麻烦先排查一下。
> 该测试用例不依赖体系结构,所以aarch64和x86_64的测试结果应该是一样的

---x86是因为没有fsgqa用户导致skip,手动创建此用户,执行报错和aarch64一样
Comment 7 小龙 admin 2023-05-26 14:15:59 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/1667
Comment 8 ZiyangZhang alibaba_cloud_group 2023-05-26 14:16:59 UTC
注意到5.10 stable已经修复该问题,准备回合代码
Comment 9 Ferry Meng alibaba_cloud_group 2023-06-26 20:10:18 UTC
补丁已回合
Comment 10 wangpingping alibaba_cloud_group 2023-06-27 09:49:36 UTC
最新nightly内核,用例已经pass,故closed此缺陷;
内核:5.10.134-974.git.eee40b40e.al8.aarch64
Comment 11 wangpingping alibaba_cloud_group 2023-06-27 10:09:49 UTC
(In reply to Ferry Meng from comment #9)
> 补丁已回合

---你好,麻烦问下,overlay文件系统下的此用例已经pass,但是ext4-nfsv4.2-2下nfs文件系统的还是失败,是不同问题吗?
日志如下:

FSTYP         -- nfs
PLATFORM      -- Linux/aarch64 VM20200706-16 5.10.134-974.git.eee40b40e.al8.aarch64 #1 SMP Mon Jun 26 13:58:20 UTC 2023
MKFS_OPTIONS  -- localhost:/fs/vdb2
MOUNT_OPTIONS -- -o vers=4.2 localhost:/fs/vdb2 /nfs/vdb2

generic/683 1s ... - output mismatch (see /tmp/tone/run/xfstests/results//generic/683.out.bad)
    --- tests/generic/683.out   2023-06-27 02:42:29.294430751 +0800
    +++ /tmp/tone/run/xfstests/results//generic/683.out.bad     2023-06-27 09:56:26.302170929 +0800
    @@ -1,19 +1,19 @@
     QA output created by 683
     Test 1 - qa_user, non-exec file falloc
     6666 -rwSrwSrw- TEST_DIR/683/a
    -666 -rw-rw-rw- TEST_DIR/683/a
    +6666 -rwSrwSrw- TEST_DIR/683/a

     Test 2 - qa_user, group-exec file falloc
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/683.out /tmp/tone/run/xfstests/results//generic/683.out.bad'  to see the entire diff)
Ran: generic/683
Failures: generic/683
Failed 1 of 1 tests

[tone]Error: The return code of run() in run.sh is not 0
umount -l -f /fs/vdb1
umount -l -f /fs/vdb2
generic/683: Failed