[PATCH 4/4] qemu-iotests: fix case of SOCK_DIR already in the environment

Paolo Bonzini posted 4 patches 4 years, 10 months ago
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
There is a newer version of this series
[PATCH 4/4] qemu-iotests: fix case of SOCK_DIR already in the environment
Posted by Paolo Bonzini 4 years, 10 months ago
Due to a typo, in this case the SOCK_DIR was not being created.

Signed-off-by: Paolo Bonzini <pbonzini@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 6767eeeb25..169268f61a 100644
--- a/tests/qemu-iotests/testenv.py
+++ b/tests/qemu-iotests/testenv.py
@@ -120,7 +120,7 @@ def init_directories(self) -> None:
         try:
             self.sock_dir = os.environ['SOCK_DIR']
             self.tmp_sock_dir = False
-            Path(self.test_dir).mkdir(parents=True, exist_ok=True)
+            Path(self.sock_dir).mkdir(parents=True, exist_ok=True)
         except KeyError:
             self.sock_dir = tempfile.mkdtemp()
             self.tmp_sock_dir = True
-- 
2.30.1


Re: [PATCH 4/4] qemu-iotests: fix case of SOCK_DIR already in the environment
Posted by Vladimir Sementsov-Ogievskiy 4 years, 10 months ago
23.03.2021 16:06, Paolo Bonzini wrote:
> Due to a typo, in this case the SOCK_DIR was not being created.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@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 6767eeeb25..169268f61a 100644
> --- a/tests/qemu-iotests/testenv.py
> +++ b/tests/qemu-iotests/testenv.py
> @@ -120,7 +120,7 @@ def init_directories(self) -> None:
>           try:
>               self.sock_dir = os.environ['SOCK_DIR']
>               self.tmp_sock_dir = False
> -            Path(self.test_dir).mkdir(parents=True, exist_ok=True)
> +            Path(self.sock_dir).mkdir(parents=True, exist_ok=True)
>           except KeyError:
>               self.sock_dir = tempfile.mkdtemp()
>               self.tmp_sock_dir = True
> 

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

-- 
Best regards,
Vladimir