* [LTP] [PATCH 1/1] quotactl: Check for missing quota_v2 module
@ 2022-03-14 13:02 Petr Vorel
2022-03-14 13:27 ` Petr Vorel
2022-03-15 1:31 ` xuyang2018.jy
0 siblings, 2 replies; 5+ messages in thread
From: Petr Vorel @ 2022-03-14 13:02 UTC (permalink / raw)
To: ltp; +Cc: Martin Doucha
openSUSE JeOS allowed installation without quota_v2 (they were in
kernel-default, but by default kernel-default-base with smaller subset
of kernel modules is installed).
Therefore check for the module for all tests which require CONFIG_QFMT_V2
config.
Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1196585
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/syscalls/quotactl/quotactl01.c | 4 ++++
testcases/kernel/syscalls/quotactl/quotactl04.c | 4 ++++
testcases/kernel/syscalls/quotactl/quotactl06.c | 4 ++++
testcases/kernel/syscalls/quotactl/quotactl08.c | 4 ++++
testcases/kernel/syscalls/quotactl/quotactl09.c | 4 ++++
5 files changed, 20 insertions(+)
diff --git a/testcases/kernel/syscalls/quotactl/quotactl01.c b/testcases/kernel/syscalls/quotactl/quotactl01.c
index 561e5030fe..f06e18edca 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl01.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl01.c
@@ -217,6 +217,10 @@ static struct tst_test test = {
"CONFIG_QFMT_V2",
NULL
},
+ .needs_drivers = (const char *const []) {
+ "quota_v2",
+ NULL
+ },
.test = verify_quota,
.tcnt = ARRAY_SIZE(tcases),
.mount_device = 1,
diff --git a/testcases/kernel/syscalls/quotactl/quotactl04.c b/testcases/kernel/syscalls/quotactl/quotactl04.c
index 55da282705..bb2d899f0e 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl04.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl04.c
@@ -166,6 +166,10 @@ static struct tst_test test = {
"CONFIG_QFMT_V2",
NULL
},
+ .needs_drivers = (const char *const []) {
+ "quota_v2",
+ NULL
+ },
.min_kver = "4.10", /* commit 689c958cbe6b (ext4: add project quota support) */
.test = verify_quota,
.tcnt = ARRAY_SIZE(tcases),
diff --git a/testcases/kernel/syscalls/quotactl/quotactl06.c b/testcases/kernel/syscalls/quotactl/quotactl06.c
index 87715237f5..8c75c87b06 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl06.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl06.c
@@ -220,6 +220,10 @@ static struct tst_test test = {
"CONFIG_QFMT_V2",
NULL
},
+ .needs_drivers = (const char *const []) {
+ "quota_v2",
+ NULL
+ },
.tcnt = ARRAY_SIZE(tcases),
.test = verify_quotactl,
.dev_fs_type = "ext4",
diff --git a/testcases/kernel/syscalls/quotactl/quotactl08.c b/testcases/kernel/syscalls/quotactl/quotactl08.c
index 3793867f23..ae6e582be0 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl08.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl08.c
@@ -212,6 +212,10 @@ static struct tst_test test = {
"CONFIG_QFMT_V2",
NULL
},
+ .needs_drivers = (const char *const []) {
+ "quota_v2",
+ NULL
+ },
.test = verify_quota,
.tcnt = ARRAY_SIZE(tcases),
.mntpoint = MNTPOINT,
diff --git a/testcases/kernel/syscalls/quotactl/quotactl09.c b/testcases/kernel/syscalls/quotactl/quotactl09.c
index 8b959909ca..12d331b1a0 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl09.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl09.c
@@ -174,6 +174,10 @@ static struct tst_test test = {
"CONFIG_QFMT_V2",
NULL
},
+ .needs_drivers = (const char *const []) {
+ "quota_v2",
+ NULL
+ },
.tcnt = ARRAY_SIZE(tcases),
.test = verify_quotactl,
.dev_fs_opts = (const char *const[]){"-O quota", NULL},
--
2.35.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 1/1] quotactl: Check for missing quota_v2 module
2022-03-14 13:02 [LTP] [PATCH 1/1] quotactl: Check for missing quota_v2 module Petr Vorel
@ 2022-03-14 13:27 ` Petr Vorel
2022-03-15 1:27 ` xuyang2018.jy
2022-03-15 1:31 ` xuyang2018.jy
1 sibling, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2022-03-14 13:27 UTC (permalink / raw)
To: ltp; +Cc: Martin Doucha
Hi Martin, Xu,
I wonder whether quotactl04 still needs check for ESRCH search in do_mount()
implemented by Martin in 4aab31e4c7 ("syscalls/quotactl: Skip tests if FS quota
is not supported"), because that could be caught by CONFIG_QFMT_V2 and now
quota_v2, right?
It uses fs_opts[] = {"-I 256", "-O quota,project", NULL} parameters for mkfs,
thus it is probably needed. But shouldn't it be used also in quotactl08, which
also uses fs_opts[] = { "-O quota", NULL} ?
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 1/1] quotactl: Check for missing quota_v2 module
2022-03-14 13:27 ` Petr Vorel
@ 2022-03-15 1:27 ` xuyang2018.jy
0 siblings, 0 replies; 5+ messages in thread
From: xuyang2018.jy @ 2022-03-15 1:27 UTC (permalink / raw)
To: Petr Vorel; +Cc: Martin Doucha, ltp@lists.linux.it
Hi Petr
> Hi Martin, Xu,
>
> I wonder whether quotactl04 still needs check for ESRCH search in do_mount()
> implemented by Martin in 4aab31e4c7 ("syscalls/quotactl: Skip tests if FS quota
> is not supported"), because that could be caught by CONFIG_QFMT_V2 and now
> quota_v2, right?
I think it is right.
>
> It uses fs_opts[] = {"-I 256", "-O quota,project", NULL} parameters for mkfs,
> thus it is probably needed.
If we format ext4 filesystem with quota feature, then the quota
information will hidden in filesystem instead of visible file by using
quotacheck.
But this feature needs mkfs > 1.43.0.
I guess we can remove do_mount by using SAFE_MOUNT like quotactl08 did.
Best Regards
Yang Xu
But shouldn't it be used also in quotactl08, which
> also uses fs_opts[] = { "-O quota", NULL} ?
>
> Kind regards,
> Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 1/1] quotactl: Check for missing quota_v2 module
2022-03-14 13:02 [LTP] [PATCH 1/1] quotactl: Check for missing quota_v2 module Petr Vorel
2022-03-14 13:27 ` Petr Vorel
@ 2022-03-15 1:31 ` xuyang2018.jy
2022-03-15 9:16 ` Petr Vorel
1 sibling, 1 reply; 5+ messages in thread
From: xuyang2018.jy @ 2022-03-15 1:31 UTC (permalink / raw)
To: Petr Vorel; +Cc: Martin Doucha, ltp@lists.linux.it
Hi Petr
If so, why not remove kconfig check for these cases?
Best Regards
Yang Xu
> openSUSE JeOS allowed installation without quota_v2 (they were in
> kernel-default, but by default kernel-default-base with smaller subset
> of kernel modules is installed).
>
> Therefore check for the module for all tests which require CONFIG_QFMT_V2
> config.
>
> Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1196585
>
> Signed-off-by: Petr Vorel<pvorel@suse.cz>
> ---
> testcases/kernel/syscalls/quotactl/quotactl01.c | 4 ++++
> testcases/kernel/syscalls/quotactl/quotactl04.c | 4 ++++
> testcases/kernel/syscalls/quotactl/quotactl06.c | 4 ++++
> testcases/kernel/syscalls/quotactl/quotactl08.c | 4 ++++
> testcases/kernel/syscalls/quotactl/quotactl09.c | 4 ++++
> 5 files changed, 20 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/quotactl/quotactl01.c b/testcases/kernel/syscalls/quotactl/quotactl01.c
> index 561e5030fe..f06e18edca 100644
> --- a/testcases/kernel/syscalls/quotactl/quotactl01.c
> +++ b/testcases/kernel/syscalls/quotactl/quotactl01.c
> @@ -217,6 +217,10 @@ static struct tst_test test = {
> "CONFIG_QFMT_V2",
> NULL
> },
> + .needs_drivers = (const char *const []) {
> + "quota_v2",
> + NULL
> + },
> .test = verify_quota,
> .tcnt = ARRAY_SIZE(tcases),
> .mount_device = 1,
> diff --git a/testcases/kernel/syscalls/quotactl/quotactl04.c b/testcases/kernel/syscalls/quotactl/quotactl04.c
> index 55da282705..bb2d899f0e 100644
> --- a/testcases/kernel/syscalls/quotactl/quotactl04.c
> +++ b/testcases/kernel/syscalls/quotactl/quotactl04.c
> @@ -166,6 +166,10 @@ static struct tst_test test = {
> "CONFIG_QFMT_V2",
> NULL
> },
> + .needs_drivers = (const char *const []) {
> + "quota_v2",
> + NULL
> + },
> .min_kver = "4.10", /* commit 689c958cbe6b (ext4: add project quota support) */
> .test = verify_quota,
> .tcnt = ARRAY_SIZE(tcases),
> diff --git a/testcases/kernel/syscalls/quotactl/quotactl06.c b/testcases/kernel/syscalls/quotactl/quotactl06.c
> index 87715237f5..8c75c87b06 100644
> --- a/testcases/kernel/syscalls/quotactl/quotactl06.c
> +++ b/testcases/kernel/syscalls/quotactl/quotactl06.c
> @@ -220,6 +220,10 @@ static struct tst_test test = {
> "CONFIG_QFMT_V2",
> NULL
> },
> + .needs_drivers = (const char *const []) {
> + "quota_v2",
> + NULL
> + },
> .tcnt = ARRAY_SIZE(tcases),
> .test = verify_quotactl,
> .dev_fs_type = "ext4",
> diff --git a/testcases/kernel/syscalls/quotactl/quotactl08.c b/testcases/kernel/syscalls/quotactl/quotactl08.c
> index 3793867f23..ae6e582be0 100644
> --- a/testcases/kernel/syscalls/quotactl/quotactl08.c
> +++ b/testcases/kernel/syscalls/quotactl/quotactl08.c
> @@ -212,6 +212,10 @@ static struct tst_test test = {
> "CONFIG_QFMT_V2",
> NULL
> },
> + .needs_drivers = (const char *const []) {
> + "quota_v2",
> + NULL
> + },
> .test = verify_quota,
> .tcnt = ARRAY_SIZE(tcases),
> .mntpoint = MNTPOINT,
> diff --git a/testcases/kernel/syscalls/quotactl/quotactl09.c b/testcases/kernel/syscalls/quotactl/quotactl09.c
> index 8b959909ca..12d331b1a0 100644
> --- a/testcases/kernel/syscalls/quotactl/quotactl09.c
> +++ b/testcases/kernel/syscalls/quotactl/quotactl09.c
> @@ -174,6 +174,10 @@ static struct tst_test test = {
> "CONFIG_QFMT_V2",
> NULL
> },
> + .needs_drivers = (const char *const []) {
> + "quota_v2",
> + NULL
> + },
> .tcnt = ARRAY_SIZE(tcases),
> .test = verify_quotactl,
> .dev_fs_opts = (const char *const[]){"-O quota", NULL},
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 1/1] quotactl: Check for missing quota_v2 module
2022-03-15 1:31 ` xuyang2018.jy
@ 2022-03-15 9:16 ` Petr Vorel
0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2022-03-15 9:16 UTC (permalink / raw)
To: xuyang2018.jy@fujitsu.com; +Cc: Martin Doucha, ltp@lists.linux.it
Hi Xu,
> Hi Petr
> If so, why not remove kconfig check for these cases?
Good point, check for quota_v2 is enough, I'll remove CONFIG_QFMT_V2 in v2.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-15 9:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-14 13:02 [LTP] [PATCH 1/1] quotactl: Check for missing quota_v2 module Petr Vorel
2022-03-14 13:27 ` Petr Vorel
2022-03-15 1:27 ` xuyang2018.jy
2022-03-15 1:31 ` xuyang2018.jy
2022-03-15 9:16 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox