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

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Tue Aug 23 05:58:31 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)

I also meet nosuid work not as expected.

st_test.c:1599: TINFO: Testing on ext4
tst_test.c:1064: TINFO: Formatting /dev/loop0 with ext4 opts='' extra 
opts=''
mke2fs 1.46.5 (30-Dec-2021)
mount03.c:151: TINFO: Testing flag MS_RDONLY
mount03.c:48: TPASS: otfd = open(file, O_CREAT | O_RDWR, 0700) : EROFS (30)
mount03.c:151: TINFO: Testing flag MS_NODEV
mount03.c:55: TPASS: otfd = open(file, O_RDWR, 0700) : EACCES (13)
mount03.c:151: TINFO: Testing flag MS_NOEXEC
mount03.c:63: TPASS: execlp(file, basename(file), NULL) : EACCES (13)
mount03.c:151: TINFO: Testing flag MS_RDONLY
mount03.c:70: TPASS: otfd = open(file, O_CREAT | O_RDWR, 0700) returned fd 3
mount03.c:151: TINFO: Testing flag MS_NOSUID
mount03_suid_child.c:22: TFAIL: setreuid(getuid(), 0) succeeded
mount03.c:151: TINFO: Testing flag MS_NOATIME
mount03.c:112: TPASS: st.st_atime == atime (1661280863)
tst_device.c:434: TINFO: No device is mounted at mntpoint


Best Regards
Yang Xu
> ...
> Summary:
> passed   32
> failed   4
> broken   0
> skipped  0
> warnings 0
> 
> Any idea what can be wrong?
> 
> Kind regards,
> Petr


More information about the ltp mailing list