diff mbox series

[RFC] tests/functional: skip vulkan test if mssing vulkaninfo

Message ID 20250312190314.1632357-1-alex.bennee@linaro.org
State New
Headers show
Series [RFC] tests/functional: skip vulkan test if mssing vulkaninfo | expand

Commit Message

Alex Bennée March 12, 2025, 7:03 p.m. UTC
I could have sworn I had this is a previous iteration of the patches
but I guess it got lost in a re-base. As we are going to call
vulkaninfo to probe for "bad" drivers we need to skip if the binary
isn't available.

Fixes: 9f7e493d11 (tests/functional: skip vulkan tests with nVidia)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/functional/test_aarch64_virt_gpu.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Huth March 13, 2025, 7:13 a.m. UTC | #1
Missing "i" in "mssing" in the subject.

On 12/03/2025 20.03, Alex Bennée wrote:
> I could have sworn I had this is a previous iteration of the patches
> but I guess it got lost in a re-base. As we are going to call
> vulkaninfo to probe for "bad" drivers we need to skip if the binary
> isn't available.
> 
> Fixes: 9f7e493d11 (tests/functional: skip vulkan tests with nVidia)
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/functional/test_aarch64_virt_gpu.py | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tests/functional/test_aarch64_virt_gpu.py b/tests/functional/test_aarch64_virt_gpu.py
> index f19a47f8b6..314d994a7a 100755
> --- a/tests/functional/test_aarch64_virt_gpu.py
> +++ b/tests/functional/test_aarch64_virt_gpu.py
> @@ -115,6 +115,7 @@ def test_aarch64_virt_with_virgl_blobs_gpu(self):
>           self._run_virt_weston_test("glmark2-wayland -b:duration=1.0")
>   
>       @skipIfMissingCommands('zstd')
> +    @skipIfMissingCommands('vulkaninfo')
>       def test_aarch64_virt_with_vulkan_gpu(self):

The check_output call in this function is already wrapped with a try-except 
statement, isn't that enough already?

  Thomas
Thomas Huth March 13, 2025, 7:17 a.m. UTC | #2
On 13/03/2025 08.13, Thomas Huth wrote:
> 
> Missing "i" in "mssing" in the subject.
> 
> On 12/03/2025 20.03, Alex Bennée wrote:
>> I could have sworn I had this is a previous iteration of the patches
>> but I guess it got lost in a re-base. As we are going to call
>> vulkaninfo to probe for "bad" drivers we need to skip if the binary
>> isn't available.
>>
>> Fixes: 9f7e493d11 (tests/functional: skip vulkan tests with nVidia)
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>   tests/functional/test_aarch64_virt_gpu.py | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/tests/functional/test_aarch64_virt_gpu.py b/tests/functional/ 
>> test_aarch64_virt_gpu.py
>> index f19a47f8b6..314d994a7a 100755
>> --- a/tests/functional/test_aarch64_virt_gpu.py
>> +++ b/tests/functional/test_aarch64_virt_gpu.py
>> @@ -115,6 +115,7 @@ def test_aarch64_virt_with_virgl_blobs_gpu(self):
>>           self._run_virt_weston_test("glmark2-wayland -b:duration=1.0")
>>       @skipIfMissingCommands('zstd')
>> +    @skipIfMissingCommands('vulkaninfo')
>>       def test_aarch64_virt_with_vulkan_gpu(self):
> 
> The check_output call in this function is already wrapped with a try-except 
> statement, isn't that enough already?

Hmm, looks like a missing vulkaninfo is giving some other kind of exception, 
so we need this patch indeed. I'll queue it for my pull request today.

  Thomas
diff mbox series

Patch

diff --git a/tests/functional/test_aarch64_virt_gpu.py b/tests/functional/test_aarch64_virt_gpu.py
index f19a47f8b6..314d994a7a 100755
--- a/tests/functional/test_aarch64_virt_gpu.py
+++ b/tests/functional/test_aarch64_virt_gpu.py
@@ -115,6 +115,7 @@  def test_aarch64_virt_with_virgl_blobs_gpu(self):
         self._run_virt_weston_test("glmark2-wayland -b:duration=1.0")
 
     @skipIfMissingCommands('zstd')
+    @skipIfMissingCommands('vulkaninfo')
     def test_aarch64_virt_with_vulkan_gpu(self):
 
         self.require_device('virtio-gpu-gl-pci')