[LTP] [PATCH v4 1/1] mount03: Convert to new API

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Tue Oct 18 09:19:42 CEST 2022


Hi Petr

> Hi all,
> 
> when running in loop, I sometimes still get error:
> 
> i=0; while true; do i=$((i+1)); echo "== $i =="; ./mount03  || break; done
> ...
> === 100 ===
> ...
> tst_device.c:434: TINFO: No device is mounted at mntpoint
> tst_test.c:1599: TINFO: Testing on ext4
> tst_test.c:1065: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
> mke2fs 1.46.5 (30-Dec-2021)
> mount03.c:150: TINFO: Testing flag MS_RDONLY
> mount03.c:48: TPASS: otfd = open(file, O_CREAT | O_RDWR, 0700) : EROFS (30)
> mount03.c:150: TINFO: Testing flag MS_NODEV
> mount03.c:153: TFAIL: mount(tst_device->dev, MNTPOINT, tst_device->fs_type, tc->flag, NULL) failed: EINVAL (22)
> mount03.c:150: TINFO: Testing flag MS_NOEXEC
> mount03.c:153: TFAIL: mount(tst_device->dev, MNTPOINT, tst_device->fs_type, tc->flag, NULL) failed: EINVAL (22)
> mount03.c:150: TINFO: Testing flag MS_RDONLY
> mount03.c:153: TFAIL: mount(tst_device->dev, MNTPOINT, tst_device->fs_type, tc->flag, NULL) failed: EINVAL (22)
> mount03.c:150: TINFO: Testing flag MS_NOSUID
> mount03.c:153: TFAIL: mount(tst_device->dev, MNTPOINT, tst_device->fs_type, tc->flag, NULL) failed: EINVAL (22)
> mount03.c:150: TINFO: Testing flag MS_NOATIME
> mount03.c:111: TPASS: st.st_atime == atime (1661183501)
> ...
> Summary:
> passed   32
> failed   4
> broken   0
> skipped  0
> warnings 0
> 
> Any idea what can be wrong?

Even I test 100 times as your script on my primary machine instead of 
vm,  I still can't hit this problem.

Maybe filesystem based on loop has been corrupted?  Now, the info isn't 
enough. Does dmesg provide some useful log?

IMO, we can merge this patch firstly, then we can listen whether other 
people also meet this problem. What do you think about it?


Best Regards
Yang Xu
> 
> Kind regards,
> Petr


More information about the ltp mailing list