[LTP] [PATCH] statx07: umount before un-export

Richard Palethorpe rpalethorpe@suse.de
Thu Dec 22 10:31:13 CET 2022


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.


More information about the ltp mailing list