All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/ioctl: Remove requirement of loop driver
@ 2021-02-26  4:00 Zhao Gongyi
  2021-02-26  4:59 ` Xiao Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Zhao Gongyi @ 2021-02-26  4:00 UTC (permalink / raw)
  To: ltp

There is no loop driver when config CONFIG_BLK_DEV_LOOP is set to y, and
we have check the loop device in tst_find_free_loopdev. So we can remove
the requirement of loop driver.

Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
 testcases/kernel/syscalls/ioctl/ioctl_loop01.c | 4 ----
 testcases/kernel/syscalls/ioctl/ioctl_loop02.c | 4 ----
 testcases/kernel/syscalls/ioctl/ioctl_loop03.c | 4 ----
 testcases/kernel/syscalls/ioctl/ioctl_loop04.c | 4 ----
 testcases/kernel/syscalls/ioctl/ioctl_loop05.c | 4 ----
 testcases/kernel/syscalls/ioctl/ioctl_loop06.c | 4 ----
 testcases/kernel/syscalls/ioctl/ioctl_loop07.c | 4 ----
 7 files changed, 28 deletions(-)

diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop01.c b/testcases/kernel/syscalls/ioctl/ioctl_loop01.c
index cf71184b4..27713847d 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_loop01.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_loop01.c
@@ -142,10 +142,6 @@ static struct tst_test test = {
 	.cleanup = cleanup,
 	.test_all = verify_ioctl_loop,
 	.needs_root = 1,
-	.needs_drivers = (const char *const []) {
-		"loop",
-		NULL
-	},
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "10c70d95c0f2"},
 		{"linux-git", "6ac92fb5cdff"},
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop02.c b/testcases/kernel/syscalls/ioctl/ioctl_loop02.c
index ac6184216..538b64e00 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_loop02.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_loop02.c
@@ -157,8 +157,4 @@ static struct tst_test test = {
 	.test = verify_ioctl_loop,
 	.needs_root = 1,
 	.needs_tmpdir = 1,
-	.needs_drivers = (const char *const []) {
-		"loop",
-		NULL
-	}
 };
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop03.c b/testcases/kernel/syscalls/ioctl/ioctl_loop03.c
index 9cf5a41fa..ee3748178 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_loop03.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_loop03.c
@@ -68,8 +68,4 @@ static struct tst_test test = {
 	.test_all = verify_ioctl_loop,
 	.needs_root = 1,
 	.needs_tmpdir = 1,
-	.needs_drivers = (const char *const []) {
-		"loop",
-		NULL
-	}
 };
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop04.c b/testcases/kernel/syscalls/ioctl/ioctl_loop04.c
index b4ab44a74..615247aec 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_loop04.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_loop04.c
@@ -91,8 +91,4 @@ static struct tst_test test = {
 	.test_all = verify_ioctl_loop,
 	.needs_root = 1,
 	.needs_tmpdir = 1,
-	.needs_drivers = (const char *const []) {
-		"loop",
-		NULL
-	}
 };
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop05.c b/testcases/kernel/syscalls/ioctl/ioctl_loop05.c
index f8fa413a9..ec88d6039 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_loop05.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_loop05.c
@@ -151,8 +151,4 @@ static struct tst_test test = {
 	.test_all = verify_ioctl_loop,
 	.needs_root = 1,
 	.needs_tmpdir = 1,
-	.needs_drivers = (const char *const []) {
-		"loop",
-		NULL
-	}
 };
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop06.c b/testcases/kernel/syscalls/ioctl/ioctl_loop06.c
index bd0d289ca..969b98c41 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_loop06.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_loop06.c
@@ -136,8 +136,4 @@ static struct tst_test test = {
 	.tcnt = ARRAY_SIZE(tcases),
 	.needs_root = 1,
 	.needs_tmpdir = 1,
-	.needs_drivers = (const char *const []) {
-		"loop",
-		NULL
-	}
 };
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop07.c b/testcases/kernel/syscalls/ioctl/ioctl_loop07.c
index efe48962e..5e1b38866 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_loop07.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_loop07.c
@@ -158,8 +158,4 @@ static struct tst_test test = {
 		{"linux-git", "79e5dc59e297"},
 		{}
 	},
-	.needs_drivers = (const char *const []) {
-		"loop",
-		NULL
-	}
 };
--
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [LTP] [PATCH] syscalls/ioctl: Remove requirement of loop driver
  2021-02-26  4:00 [LTP] [PATCH] syscalls/ioctl: Remove requirement of loop driver Zhao Gongyi
@ 2021-02-26  4:59 ` Xiao Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Xiao Yang @ 2021-02-26  4:59 UTC (permalink / raw)
  To: ltp

On 2021/2/26 12:00, Zhao Gongyi wrote:
> There is no loop driver when config CONFIG_BLK_DEV_LOOP is set to y, and
> we have check the loop device in tst_find_free_loopdev. So we can remove
> the requirement of loop driver.
Hi Zhongyi,

1) I think .needs_driver can parse either CONFIG_BLK_DEV_LOOP=y or 
CONFIG_BLK_DEV_LOOP=m correctly.
     Do you have any issue that .needs_driver cannot parse 
CONFIG_BLK_DEV_LOOP=y correctly?
2) If CONFIG_BLK_DEV_LOOP is not set, we would like to report TCONF by 
.needs_driver rather than TBROK by tst_find_free_loopdev().

Best Regards,
Xiao Yang
> Signed-off-by: Zhao Gongyi<zhaogongyi@huawei.com>
> ---
>   testcases/kernel/syscalls/ioctl/ioctl_loop01.c | 4 ----
>   testcases/kernel/syscalls/ioctl/ioctl_loop02.c | 4 ----
>   testcases/kernel/syscalls/ioctl/ioctl_loop03.c | 4 ----
>   testcases/kernel/syscalls/ioctl/ioctl_loop04.c | 4 ----
>   testcases/kernel/syscalls/ioctl/ioctl_loop05.c | 4 ----
>   testcases/kernel/syscalls/ioctl/ioctl_loop06.c | 4 ----
>   testcases/kernel/syscalls/ioctl/ioctl_loop07.c | 4 ----
>   7 files changed, 28 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop01.c b/testcases/kernel/syscalls/ioctl/ioctl_loop01.c
> index cf71184b4..27713847d 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_loop01.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_loop01.c
> @@ -142,10 +142,6 @@ static struct tst_test test = {
>   	.cleanup = cleanup,
>   	.test_all = verify_ioctl_loop,
>   	.needs_root = 1,
> -	.needs_drivers = (const char *const []) {
> -		"loop",
> -		NULL
> -	},
>   	.tags = (const struct tst_tag[]) {
>   		{"linux-git", "10c70d95c0f2"},
>   		{"linux-git", "6ac92fb5cdff"},
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop02.c b/testcases/kernel/syscalls/ioctl/ioctl_loop02.c
> index ac6184216..538b64e00 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_loop02.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_loop02.c
> @@ -157,8 +157,4 @@ static struct tst_test test = {
>   	.test = verify_ioctl_loop,
>   	.needs_root = 1,
>   	.needs_tmpdir = 1,
> -	.needs_drivers = (const char *const []) {
> -		"loop",
> -		NULL
> -	}
>   };
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop03.c b/testcases/kernel/syscalls/ioctl/ioctl_loop03.c
> index 9cf5a41fa..ee3748178 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_loop03.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_loop03.c
> @@ -68,8 +68,4 @@ static struct tst_test test = {
>   	.test_all = verify_ioctl_loop,
>   	.needs_root = 1,
>   	.needs_tmpdir = 1,
> -	.needs_drivers = (const char *const []) {
> -		"loop",
> -		NULL
> -	}
>   };
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop04.c b/testcases/kernel/syscalls/ioctl/ioctl_loop04.c
> index b4ab44a74..615247aec 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_loop04.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_loop04.c
> @@ -91,8 +91,4 @@ static struct tst_test test = {
>   	.test_all = verify_ioctl_loop,
>   	.needs_root = 1,
>   	.needs_tmpdir = 1,
> -	.needs_drivers = (const char *const []) {
> -		"loop",
> -		NULL
> -	}
>   };
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop05.c b/testcases/kernel/syscalls/ioctl/ioctl_loop05.c
> index f8fa413a9..ec88d6039 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_loop05.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_loop05.c
> @@ -151,8 +151,4 @@ static struct tst_test test = {
>   	.test_all = verify_ioctl_loop,
>   	.needs_root = 1,
>   	.needs_tmpdir = 1,
> -	.needs_drivers = (const char *const []) {
> -		"loop",
> -		NULL
> -	}
>   };
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop06.c b/testcases/kernel/syscalls/ioctl/ioctl_loop06.c
> index bd0d289ca..969b98c41 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_loop06.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_loop06.c
> @@ -136,8 +136,4 @@ static struct tst_test test = {
>   	.tcnt = ARRAY_SIZE(tcases),
>   	.needs_root = 1,
>   	.needs_tmpdir = 1,
> -	.needs_drivers = (const char *const []) {
> -		"loop",
> -		NULL
> -	}
>   };
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop07.c b/testcases/kernel/syscalls/ioctl/ioctl_loop07.c
> index efe48962e..5e1b38866 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_loop07.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_loop07.c
> @@ -158,8 +158,4 @@ static struct tst_test test = {
>   		{"linux-git", "79e5dc59e297"},
>   		{}
>   	},
> -	.needs_drivers = (const char *const []) {
> -		"loop",
> -		NULL
> -	}
>   };
> --
> 2.17.1
>
>




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH] syscalls/ioctl: Remove requirement of loop driver
  2021-02-26  6:37 zhaogongyi
@ 2021-02-26  8:30 ` Cyril Hrubis
  0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2021-02-26  8:30 UTC (permalink / raw)
  To: ltp

Hi!
> > 1) I think .needs_driver can parse either CONFIG_BLK_DEV_LOOP=y or
> > CONFIG_BLK_DEV_LOOP=m correctly.
> >      Do you have any issue that .needs_driver cannot parse
> 
> I known the reason why test fail and report TCONF, there is no file modules.builtin on my system.

Then I would say that your system is broken.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH] syscalls/ioctl: Remove requirement of loop driver
@ 2021-02-26  6:37 zhaogongyi
  2021-02-26  8:30 ` Cyril Hrubis
  0 siblings, 1 reply; 4+ messages in thread
From: zhaogongyi @ 2021-02-26  6:37 UTC (permalink / raw)
  To: ltp

Hi Yang,

> 1) I think .needs_driver can parse either CONFIG_BLK_DEV_LOOP=y or
> CONFIG_BLK_DEV_LOOP=m correctly.
>      Do you have any issue that .needs_driver cannot parse

I known the reason why test fail and report TCONF, there is no file modules.builtin on my system.

> CONFIG_BLK_DEV_LOOP=y correctly?
> 2) If CONFIG_BLK_DEV_LOOP is not set, we would like to report TCONF
> by .needs_driver rather than TBROK by tst_find_free_loopdev().
>

It looks like good.


Thanks!

----------------------------------------------------------------------------------------------------

> 
> On 2021/2/26 12:00, Zhao Gongyi wrote:
> > There is no loop driver when config CONFIG_BLK_DEV_LOOP is set to y,
> > and we have check the loop device in tst_find_free_loopdev. So we can
> > remove the requirement of loop driver.
> Hi Zhongyi,
> 
> 1) I think .needs_driver can parse either CONFIG_BLK_DEV_LOOP=y or
> CONFIG_BLK_DEV_LOOP=m correctly.
>      Do you have any issue that .needs_driver cannot parse
> CONFIG_BLK_DEV_LOOP=y correctly?
> 2) If CONFIG_BLK_DEV_LOOP is not set, we would like to report TCONF
> by .needs_driver rather than TBROK by tst_find_free_loopdev().
> 
> Best Regards,
> Xiao Yang

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-26  8:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26  4:00 [LTP] [PATCH] syscalls/ioctl: Remove requirement of loop driver Zhao Gongyi
2021-02-26  4:59 ` Xiao Yang
2021-02-26  6:37 zhaogongyi
2021-02-26  8:30 ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.