qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iotests: give tempdir an identifying name
@ 2024-02-05 15:51 Daniel P. Berrangé
  2024-02-05 16:42 ` Michael Tokarev
  2024-02-07 14:01 ` Kevin Wolf
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel P. Berrangé @ 2024-02-05 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Peter Maydell, Hanna Reitz, Kevin Wolf,
	Daniel P. Berrangé

If something goes wrong causing the iotests not to cleanup their
temporary directory, it is useful if the dir had an identifying
name to show what is to blame.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/qemu-iotests/testenv.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py
index 3ff38f2661..588f30a4f1 100644
--- a/tests/qemu-iotests/testenv.py
+++ b/tests/qemu-iotests/testenv.py
@@ -126,7 +126,7 @@ def init_directories(self) -> None:
             self.tmp_sock_dir = False
             Path(self.sock_dir).mkdir(parents=True, exist_ok=True)
         except KeyError:
-            self.sock_dir = tempfile.mkdtemp()
+            self.sock_dir = tempfile.mkdtemp(prefix="qemu-iotests-")
             self.tmp_sock_dir = True
 
         self.sample_img_dir = os.getenv('SAMPLE_IMG_DIR',
-- 
2.43.0



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

* Re: [PATCH] iotests: give tempdir an identifying name
  2024-02-05 15:51 [PATCH] iotests: give tempdir an identifying name Daniel P. Berrangé
@ 2024-02-05 16:42 ` Michael Tokarev
  2024-02-07 14:01 ` Kevin Wolf
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2024-02-05 16:42 UTC (permalink / raw)
  To: Daniel P. Berrangé, qemu-devel
  Cc: qemu-block, Peter Maydell, Hanna Reitz, Kevin Wolf

05.02.2024 18:51, Daniel P. Berrangé wrote:
> If something goes wrong causing the iotests not to cleanup their
> temporary directory, it is useful if the dir had an identifying
> name to show what is to blame.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Revieved-by: Michael Tokarev <mjt@tls.msk.ru>

Thank you again for the quick good work!

/mjt

>   tests/qemu-iotests/testenv.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py
> index 3ff38f2661..588f30a4f1 100644
> --- a/tests/qemu-iotests/testenv.py
> +++ b/tests/qemu-iotests/testenv.py
> @@ -126,7 +126,7 @@ def init_directories(self) -> None:
>               self.tmp_sock_dir = False
>               Path(self.sock_dir).mkdir(parents=True, exist_ok=True)
>           except KeyError:
> -            self.sock_dir = tempfile.mkdtemp()
> +            self.sock_dir = tempfile.mkdtemp(prefix="qemu-iotests-")
>               self.tmp_sock_dir = True
>   
>           self.sample_img_dir = os.getenv('SAMPLE_IMG_DIR',



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

* Re: [PATCH] iotests: give tempdir an identifying name
  2024-02-05 15:51 [PATCH] iotests: give tempdir an identifying name Daniel P. Berrangé
  2024-02-05 16:42 ` Michael Tokarev
@ 2024-02-07 14:01 ` Kevin Wolf
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2024-02-07 14:01 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: qemu-devel, qemu-block, Peter Maydell, Hanna Reitz

Am 05.02.2024 um 16:51 hat Daniel P. Berrangé geschrieben:
> If something goes wrong causing the iotests not to cleanup their
> temporary directory, it is useful if the dir had an identifying
> name to show what is to blame.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Thanks, applied to the block branch.

Kevin



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

end of thread, other threads:[~2024-02-07 14:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-05 15:51 [PATCH] iotests: give tempdir an identifying name Daniel P. Berrangé
2024-02-05 16:42 ` Michael Tokarev
2024-02-07 14:01 ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).