[PATCH] tests/qtest/cxl-test: Clean up temporary directories after testing

Thomas Huth posted 1 patch 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230622114132.372898-1-thuth@redhat.com
Maintainers: Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/cxl-test.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] tests/qtest/cxl-test: Clean up temporary directories after testing
Posted by Thomas Huth 11 months ago
It's good style to clean up temporary directories when they
are not needed anymore.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qtest/cxl-test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cxl-test.c
index edcad4a0ce..a600331843 100644
--- a/tests/qtest/cxl-test.c
+++ b/tests/qtest/cxl-test.c
@@ -124,6 +124,7 @@ static void cxl_t3d_deprecated(void)
 
     qtest_start(cmdline->str);
     qtest_end();
+    rmdir(tmpfs);
 }
 
 static void cxl_t3d_persistent(void)
@@ -138,6 +139,7 @@ static void cxl_t3d_persistent(void)
 
     qtest_start(cmdline->str);
     qtest_end();
+    rmdir(tmpfs);
 }
 
 static void cxl_t3d_volatile(void)
-- 
2.39.3
Re: [PATCH] tests/qtest/cxl-test: Clean up temporary directories after testing
Posted by Jonathan Cameron via 10 months, 4 weeks ago
On Thu, 22 Jun 2023 13:41:32 +0200
Thomas Huth <thuth@redhat.com> wrote:

> It's good style to clean up temporary directories when they
> are not needed anymore.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  tests/qtest/cxl-test.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cxl-test.c
> index edcad4a0ce..a600331843 100644
> --- a/tests/qtest/cxl-test.c
> +++ b/tests/qtest/cxl-test.c
> @@ -124,6 +124,7 @@ static void cxl_t3d_deprecated(void)
>  
>      qtest_start(cmdline->str);
>      qtest_end();
> +    rmdir(tmpfs);
>  }
>  
>  static void cxl_t3d_persistent(void)
> @@ -138,6 +139,7 @@ static void cxl_t3d_persistent(void)
>  
>      qtest_start(cmdline->str);
>      qtest_end();
> +    rmdir(tmpfs);
>  }
>  
>  static void cxl_t3d_volatile(void)