Message ID | 20220223153243.317-3-pvorel@suse.cz |
---|---|
State | Changes Requested |
Headers | show |
Series | quotactl ESRCH fixes | expand |
Hi Petr > to change > quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3) I doubt why fs quota is not supported on this case since we have check kernel config? Best Regards Yang Xu > > to TCONF if FS quota is not supported (the same fix as 4aab31e4c7). > > Signed-off-by: Petr Vorel<pvorel@suse.cz> > --- > testcases/kernel/syscalls/quotactl/quotactl08.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/testcases/kernel/syscalls/quotactl/quotactl08.c b/testcases/kernel/syscalls/quotactl/quotactl08.c > index 3793867f23..9f54bebcc0 100644 > --- a/testcases/kernel/syscalls/quotactl/quotactl08.c > +++ b/testcases/kernel/syscalls/quotactl/quotactl08.c > @@ -157,7 +157,7 @@ static void setup(void) > quotactl_info(); > > SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL); > - SAFE_MOUNT(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); > + do_mount(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); > mount_flag = 1; > > fd = SAFE_OPEN(MNTPOINT, O_RDONLY);
> Hi Petr > > to change > > quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3) > I doubt why fs quota is not supported on this case since we have check > kernel config? I have no idea. And yes, the config contains CONFIG_QFMT_V2=m Kind regards, Petr > Best Regards > Yang Xu > > to TCONF if FS quota is not supported (the same fix as 4aab31e4c7). > > Signed-off-by: Petr Vorel<pvorel@suse.cz> > > --- > > testcases/kernel/syscalls/quotactl/quotactl08.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/testcases/kernel/syscalls/quotactl/quotactl08.c b/testcases/kernel/syscalls/quotactl/quotactl08.c > > index 3793867f23..9f54bebcc0 100644 > > --- a/testcases/kernel/syscalls/quotactl/quotactl08.c > > +++ b/testcases/kernel/syscalls/quotactl/quotactl08.c > > @@ -157,7 +157,7 @@ static void setup(void) > > quotactl_info(); > > SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL); > > - SAFE_MOUNT(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); > > + do_mount(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); > > mount_flag = 1; > > fd = SAFE_OPEN(MNTPOINT, O_RDONLY);
Hi Xu, > Hi Petr > > to change > > quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3) > I doubt why fs quota is not supported on this case since we have check > kernel config? There is probably bug on the SUT, thus it might be correct it fails. But how about martin's fix 4aab31e4c7 ("syscalls/quotactl: Skip tests if FS quota is not supported") - quotactl04.c also checks for CONFIG_QFMT_V2 and uses do_mount(). I'll check whether it was another bug on the system. Kind regards, Petr > Best Regards > Yang Xu > > to TCONF if FS quota is not supported (the same fix as 4aab31e4c7). > > Signed-off-by: Petr Vorel<pvorel@suse.cz> > > --- > > testcases/kernel/syscalls/quotactl/quotactl08.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/testcases/kernel/syscalls/quotactl/quotactl08.c b/testcases/kernel/syscalls/quotactl/quotactl08.c > > index 3793867f23..9f54bebcc0 100644 > > --- a/testcases/kernel/syscalls/quotactl/quotactl08.c > > +++ b/testcases/kernel/syscalls/quotactl/quotactl08.c > > @@ -157,7 +157,7 @@ static void setup(void) > > quotactl_info(); > > SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL); > > - SAFE_MOUNT(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); > > + do_mount(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); > > mount_flag = 1; > > fd = SAFE_OPEN(MNTPOINT, O_RDONLY);
Hi Petr > Hi Xu, > >> Hi Petr >>> to change >>> quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3) >> I doubt why fs quota is not supported on this case since we have check >> kernel config? > > There is probably bug on the SUT, thus it might be correct it fails. > > But how about martin's fix 4aab31e4c7 ("syscalls/quotactl: Skip tests if FS > quota is not supported") - quotactl04.c also checks for CONFIG_QFMT_V2 and uses > do_mount(). I'll check whether it was another bug on the system. Maybe we miss check the following kernel config? CONFIG_QUOTA=y CONFIG_QUOTA_TREE=y CONFIG_QUOTACTL=y Best Regards Yang Xu > > Kind regards, > Petr > >> Best Regards >> Yang Xu > >>> to TCONF if FS quota is not supported (the same fix as 4aab31e4c7). > >>> Signed-off-by: Petr Vorel<pvorel@suse.cz> >>> --- >>> testcases/kernel/syscalls/quotactl/quotactl08.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> diff --git a/testcases/kernel/syscalls/quotactl/quotactl08.c b/testcases/kernel/syscalls/quotactl/quotactl08.c >>> index 3793867f23..9f54bebcc0 100644 >>> --- a/testcases/kernel/syscalls/quotactl/quotactl08.c >>> +++ b/testcases/kernel/syscalls/quotactl/quotactl08.c >>> @@ -157,7 +157,7 @@ static void setup(void) >>> quotactl_info(); > >>> SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL); >>> - SAFE_MOUNT(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); >>> + do_mount(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); >>> mount_flag = 1; > >>> fd = SAFE_OPEN(MNTPOINT, O_RDONLY);
> Hi Petr > > Hi Xu, > >> Hi Petr > >>> to change > >>> quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3) > >> I doubt why fs quota is not supported on this case since we have check > >> kernel config? > > There is probably bug on the SUT, thus it might be correct it fails. > > But how about martin's fix 4aab31e4c7 ("syscalls/quotactl: Skip tests if FS > > quota is not supported") - quotactl04.c also checks for CONFIG_QFMT_V2 and uses > > do_mount(). I'll check whether it was another bug on the system. > Maybe we miss check the following kernel config? In my case it's probably a problem with mkfs. > CONFIG_QUOTA=y Selected by [m]: - OCFS2_FS [=m] && BLOCK [=y] && INET [=y] && SYSFS [=y] && CONFIGFS_FS [=m] => very unlikely not to be selected (but we might want to check also corner case configurations; but I guess also CONFIG_QUOTA=m would be ok) > CONFIG_QUOTA_TREE=y Selected by [m]: - OCFS2_FS [=m] && BLOCK [=y] && INET [=y] && SYSFS [=y] && CONFIGFS_FS [=m] Selected by [n]: - QFMT_V2 [=n] && QUOTA [=y] ditto > CONFIG_QUOTACTL=y Selected by [y]: - QUOTA [=y] Selected by [m]: - XFS_QUOTA [=y] && BLOCK [=y] && XFS_FS [=m] - GFS2_FS [=m] && BLOCK [=y] even more likely to be selected. Kind regards, Petr > Best Regards > Yang Xu > > Kind regards, > > Petr > >> Best Regards > >> Yang Xu > >>> to TCONF if FS quota is not supported (the same fix as 4aab31e4c7). > >>> Signed-off-by: Petr Vorel<pvorel@suse.cz> > >>> --- > >>> testcases/kernel/syscalls/quotactl/quotactl08.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> diff --git a/testcases/kernel/syscalls/quotactl/quotactl08.c b/testcases/kernel/syscalls/quotactl/quotactl08.c > >>> index 3793867f23..9f54bebcc0 100644 > >>> --- a/testcases/kernel/syscalls/quotactl/quotactl08.c > >>> +++ b/testcases/kernel/syscalls/quotactl/quotactl08.c > >>> @@ -157,7 +157,7 @@ static void setup(void) > >>> quotactl_info(); > >>> SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL); > >>> - SAFE_MOUNT(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); > >>> + do_mount(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); > >>> mount_flag = 1; > >>> fd = SAFE_OPEN(MNTPOINT, O_RDONLY);
Hi Petr >> Hi Petr >>> Hi Xu, > >>>> Hi Petr >>>>> to change >>>>> quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3) >>>> I doubt why fs quota is not supported on this case since we have check >>>> kernel config? > >>> There is probably bug on the SUT, thus it might be correct it fails. > >>> But how about martin's fix 4aab31e4c7 ("syscalls/quotactl: Skip tests if FS >>> quota is not supported") - quotactl04.c also checks for CONFIG_QFMT_V2 and uses >>> do_mount(). I'll check whether it was another bug on the system. >> Maybe we miss check the following kernel config? > In my case it's probably a problem with mkfs. Another possible way about loop driver. So do you use default loop image to create ext4 filesystem or export LTP_DEV? Best Regards Yang Xu > >> CONFIG_QUOTA=y > Selected by [m]: > - OCFS2_FS [=m]&& BLOCK [=y]&& INET [=y]&& SYSFS [=y]&& CONFIGFS_FS [=m] > => very unlikely not to be selected (but we might want to check also corner case > configurations; but I guess also CONFIG_QUOTA=m would be ok) > >> CONFIG_QUOTA_TREE=y > Selected by [m]: > - OCFS2_FS [=m]&& BLOCK [=y]&& INET [=y]&& SYSFS [=y]&& CONFIGFS_FS [=m] > Selected by [n]: > - QFMT_V2 [=n]&& QUOTA [=y] > ditto > >> CONFIG_QUOTACTL=y > Selected by [y]: > - QUOTA [=y] > Selected by [m]: > - XFS_QUOTA [=y]&& BLOCK [=y]&& XFS_FS [=m] > - GFS2_FS [=m]&& BLOCK [=y] > even more likely to be selected. > > Kind regards, > Petr > >> Best Regards >> Yang Xu > >>> Kind regards, >>> Petr > >>>> Best Regards >>>> Yang Xu > >>>>> to TCONF if FS quota is not supported (the same fix as 4aab31e4c7). > >>>>> Signed-off-by: Petr Vorel<pvorel@suse.cz> >>>>> --- >>>>> testcases/kernel/syscalls/quotactl/quotactl08.c | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>>>> diff --git a/testcases/kernel/syscalls/quotactl/quotactl08.c b/testcases/kernel/syscalls/quotactl/quotactl08.c >>>>> index 3793867f23..9f54bebcc0 100644 >>>>> --- a/testcases/kernel/syscalls/quotactl/quotactl08.c >>>>> +++ b/testcases/kernel/syscalls/quotactl/quotactl08.c >>>>> @@ -157,7 +157,7 @@ static void setup(void) >>>>> quotactl_info(); > >>>>> SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL); >>>>> - SAFE_MOUNT(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); >>>>> + do_mount(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); >>>>> mount_flag = 1; > >>>>> fd = SAFE_OPEN(MNTPOINT, O_RDONLY);
Hi Xu, ... > >>>>> to change > >>>>> quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3) > >>>> I doubt why fs quota is not supported on this case since we have check > >>>> kernel config? > >>> There is probably bug on the SUT, thus it might be correct it fails. > >>> But how about martin's fix 4aab31e4c7 ("syscalls/quotactl: Skip tests if FS > >>> quota is not supported") - quotactl04.c also checks for CONFIG_QFMT_V2 and uses > >>> do_mount(). I'll check whether it was another bug on the system. > >> Maybe we miss check the following kernel config? > > In my case it's probably a problem with mkfs. > Another possible way about loop driver. So do you use default loop image > to create ext4 filesystem or export LTP_DEV? FYI: in our case it was JeOS broken due missing quota_v2 kernel driver (JeOS tries to be minimal, so it's always a fiddling between space and functionality). I'm still not sure if we want to add check for .needs_drivers quota_v2. Kind regards, Petr
On 24. 02. 22 2:47, xuyang2018.jy@fujitsu.com wrote: > Hi Petr >> to change >> quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3) > I doubt why fs quota is not supported on this case since we have check > kernel config? In this case, kernel config says that quota is enabled as a module (=M). But the module is packaged in a separate RPM and the test is running on a minimalistic system where that RPM is not available. Therefore just checking the kernel config is not sufficient. We need to query actual module presence. (Sorry for duplicate mail, I forgot to CC the mailing list.)
On 01. 03. 22 11:17, Petr Vorel wrote: > FYI: in our case it was JeOS broken due missing quota_v2 kernel driver > (JeOS tries to be minimal, so it's always a fiddling between space and > functionality). I'm still not sure if we want to add check for .needs_drivers > quota_v2. .needs_drivers would probably be the cleaner solution.
Hi Martin, > On 01. 03. 22 11:17, Petr Vorel wrote: > > FYI: in our case it was JeOS broken due missing quota_v2 kernel driver > > (JeOS tries to be minimal, so it's always a fiddling between space and > > functionality). I'm still not sure if we want to add check for .needs_drivers > > quota_v2. > .needs_drivers would probably be the cleaner solution. Sure - I'm closing this as wrong approach. I just wasn't sure if we want to check for .needs_drivers. Because there could be numerous of other tests which require test for missing driver. And it's relevant just fo JeOS like installations, which strive for minimal size. BTW in our case it endup with module added to kernel-default-base package (thus to be always installed). Kind regards, Petr
Hi Martin > On 24. 02. 22 2:47, xuyang2018.jy@fujitsu.com wrote: >> Hi Petr >>> to change >>> quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3) >> I doubt why fs quota is not supported on this case since we have check >> kernel config? > > In this case, kernel config says that quota is enabled as a module (=M). > But the module is packaged in a separate RPM and the test is running on > a minimalistic system where that RPM is not available. Therefore just > checking the kernel config is not sufficient. We need to query actual > module presence. > > (Sorry for duplicate mail, I forgot to CC the mailing list.) Oh, I replied the personal mail. Thanks for your explaination. I don't know this complex situation before. I think the quota module is belong to kernel-default package but not belong to kernel-default-base package. So jeos use kernel-default-base will pass kernel config check but indeed it miss this module. This problem also occurs on centos if we use module from kernel-module-extra. So a better solution is that if the module is belong to kernel-default-base ,then we can use kconfig check, but if the module is not belong to kernel-default-base, then use need_driver maybe more correct. Best Regards Yang Xu >
diff --git a/testcases/kernel/syscalls/quotactl/quotactl08.c b/testcases/kernel/syscalls/quotactl/quotactl08.c index 3793867f23..9f54bebcc0 100644 --- a/testcases/kernel/syscalls/quotactl/quotactl08.c +++ b/testcases/kernel/syscalls/quotactl/quotactl08.c @@ -157,7 +157,7 @@ static void setup(void) quotactl_info(); SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL); - SAFE_MOUNT(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); + do_mount(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL); mount_flag = 1; fd = SAFE_OPEN(MNTPOINT, O_RDONLY);
to change quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3) to TCONF if FS quota is not supported (the same fix as 4aab31e4c7). Signed-off-by: Petr Vorel <pvorel@suse.cz> --- testcases/kernel/syscalls/quotactl/quotactl08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)