public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] statx07: umount before un-export
@ 2022-12-21  7:58 Murphy Zhou
  2022-12-22  9:31 ` Richard Palethorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Murphy Zhou @ 2022-12-21  7:58 UTC (permalink / raw)
  To: ltp

We need to umount first, or there will be an umounted mountpoint
left behind.

Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
---
 testcases/kernel/syscalls/statx/statx07.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/statx/statx07.c b/testcases/kernel/syscalls/statx/statx07.c
index e1ae36a35..8cb3e9b6d 100644
--- a/testcases/kernel/syscalls/statx/statx07.c
+++ b/testcases/kernel/syscalls/statx/statx07.c
@@ -149,6 +149,9 @@ static void setup(void)
 
 static void cleanup(void)
 {
+	if (mounted)
+		SAFE_UMOUNT(CLI_PATH);
+
 	if (!exported)
 		return;
 	snprintf(cmd, sizeof(cmd),
@@ -156,9 +159,6 @@ static void cleanup(void)
 
 	if (tst_system(cmd) == -1)
 		tst_res(TWARN | TST_ERR, "failed to clear exportfs");
-
-	if (mounted)
-		SAFE_UMOUNT(CLI_PATH);
 }
 
 static struct tst_test test = {
-- 
2.31.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH] statx07: umount before un-export
  2022-12-21  7:58 [LTP] [PATCH] statx07: umount before un-export Murphy Zhou
@ 2022-12-22  9:31 ` Richard Palethorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Palethorpe @ 2022-12-22  9:31 UTC (permalink / raw)
  To: Murphy Zhou; +Cc: ltp

Hello,

Murphy Zhou <jencce.kernel@gmail.com> writes:

> We need to umount first, or there will be an umounted mountpoint
> left behind.

Merged, thanks!

>
> Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> ---
>  testcases/kernel/syscalls/statx/statx07.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/statx/statx07.c b/testcases/kernel/syscalls/statx/statx07.c
> index e1ae36a35..8cb3e9b6d 100644
> --- a/testcases/kernel/syscalls/statx/statx07.c
> +++ b/testcases/kernel/syscalls/statx/statx07.c
> @@ -149,6 +149,9 @@ static void setup(void)
>  
>  static void cleanup(void)
>  {
> +	if (mounted)
> +		SAFE_UMOUNT(CLI_PATH);
> +
>  	if (!exported)
>  		return;
>  	snprintf(cmd, sizeof(cmd),
> @@ -156,9 +159,6 @@ static void cleanup(void)
>  
>  	if (tst_system(cmd) == -1)
>  		tst_res(TWARN | TST_ERR, "failed to clear exportfs");
> -
> -	if (mounted)
> -		SAFE_UMOUNT(CLI_PATH);
>  }
>  
>  static struct tst_test test = {
> -- 
> 2.31.1


-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2022-12-22  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-21  7:58 [LTP] [PATCH] statx07: umount before un-export Murphy Zhou
2022-12-22  9:31 ` Richard Palethorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox