[PATCH 01/15] tests/functional: fix mips64el test to honour workdir

Daniel P. Berrangé posted 15 patches 4 days, 2 hours ago
There is a newer version of this series
[PATCH 01/15] tests/functional: fix mips64el test to honour workdir
Posted by Daniel P. Berrangé 4 days, 2 hours ago
The missing directory separator resulted in the kernel file being
created 1 level higher than expected.

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

diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/test_mips64el_malta.py
index 6c6355b131..24ebcdb9c1 100755
--- a/tests/functional/test_mips64el_malta.py
+++ b/tests/functional/test_mips64el_malta.py
@@ -129,7 +129,7 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count):
         screendump_path = os.path.join(self.workdir, 'screendump.pbm')
 
         kernel_path_gz = self.ASSET_KERNEL_4_7_0.fetch()
-        kernel_path = self.workdir + "vmlinux"
+        kernel_path = self.workdir + "/vmlinux"
         gzip_uncompress(kernel_path_gz, kernel_path)
 
         tuxlogo_path = self.ASSET_TUXLOGO.fetch()
-- 
2.46.0


Re: [PATCH 01/15] tests/functional: fix mips64el test to honour workdir
Posted by Philippe Mathieu-Daudé 4 days ago
On 19/11/24 16:05, Daniel P. Berrangé wrote:
> The missing directory separator resulted in the kernel file being
> created 1 level higher than expected.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   tests/functional/test_mips64el_malta.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/test_mips64el_malta.py
> index 6c6355b131..24ebcdb9c1 100755
> --- a/tests/functional/test_mips64el_malta.py
> +++ b/tests/functional/test_mips64el_malta.py
> @@ -129,7 +129,7 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count):
>           screendump_path = os.path.join(self.workdir, 'screendump.pbm')
>   
>           kernel_path_gz = self.ASSET_KERNEL_4_7_0.fetch()
> -        kernel_path = self.workdir + "vmlinux"
> +        kernel_path = self.workdir + "/vmlinux"

Safer is to use os.path.join(), anyway:

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>           gzip_uncompress(kernel_path_gz, kernel_path)
>   
>           tuxlogo_path = self.ASSET_TUXLOGO.fetch()


Re: [PATCH 01/15] tests/functional: fix mips64el test to honour workdir
Posted by Alex Bennée 4 days, 2 hours ago
Daniel P. Berrangé <berrange@redhat.com> writes:

> The missing directory separator resulted in the kernel file being
> created 1 level higher than expected.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro