[LTP] [PATCH 1/1] quotactl: Check for missing quota_v2 module

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Tue Mar 15 02:31:06 CET 2022


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},


More information about the ltp mailing list