[PATCH v2 02/10] tests/qemu-iotests: skip 108 when FUSE is not loaded

John Snow posted 10 patches 3 years, 7 months ago
Maintainers: Michael Roth <michael.roth@amd.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>
There is a newer version of this series
[PATCH v2 02/10] tests/qemu-iotests: skip 108 when FUSE is not loaded
Posted by John Snow 3 years, 7 months ago
In certain container environments we may not have FUSE at all, so skip
the test in this circumstance too.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/qemu-iotests/108 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108
index 9e923d6a59f..54e935acf28 100755
--- a/tests/qemu-iotests/108
+++ b/tests/qemu-iotests/108
@@ -60,6 +60,11 @@ if sudo -n losetup &>/dev/null; then
 else
     loopdev=false
 
+    # Check for usable FUSE in the host environment:
+    if test ! -c "/dev/fuse"; then
+        _notrun 'No passwordless sudo nor usable /dev/fuse'
+    fi
+
     # QSD --export fuse will either yield "Parameter 'id' is missing"
     # or "Invalid parameter 'fuse'", depending on whether there is
     # FUSE support or not.
-- 
2.34.3
Re: [PATCH v2 02/10] tests/qemu-iotests: skip 108 when FUSE is not loaded
Posted by Hanna Reitz 3 years, 7 months ago
On 16.06.22 16:26, John Snow wrote:
> In certain container environments we may not have FUSE at all, so skip
> the test in this circumstance too.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   tests/qemu-iotests/108 | 5 +++++
>   1 file changed, 5 insertions(+)

Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Re: [PATCH v2 02/10] tests/qemu-iotests: skip 108 when FUSE is not loaded
Posted by John Snow 3 years, 7 months ago
On Fri, Jul 1, 2022 at 4:05 AM Hanna Reitz <hreitz@redhat.com> wrote:
>
> On 16.06.22 16:26, John Snow wrote:
> > In certain container environments we may not have FUSE at all, so skip
> > the test in this circumstance too.
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
> >   tests/qemu-iotests/108 | 5 +++++
> >   1 file changed, 5 insertions(+)
>
> Reviewed-by: Hanna Reitz <hreitz@redhat.com>
>

Hanna, if you want to take just the first two, be my guest. The rest
of this series needs more work still.

--js
Re: [PATCH v2 02/10] tests/qemu-iotests: skip 108 when FUSE is not loaded
Posted by Hanna Reitz 3 years, 7 months ago
On 01.07.22 18:15, John Snow wrote:
> On Fri, Jul 1, 2022 at 4:05 AM Hanna Reitz <hreitz@redhat.com> wrote:
>> On 16.06.22 16:26, John Snow wrote:
>>> In certain container environments we may not have FUSE at all, so skip
>>> the test in this circumstance too.
>>>
>>> Signed-off-by: John Snow <jsnow@redhat.com>
>>> ---
>>>    tests/qemu-iotests/108 | 5 +++++
>>>    1 file changed, 5 insertions(+)
>> Reviewed-by: Hanna Reitz <hreitz@redhat.com>
>>
> Hanna, if you want to take just the first two, be my guest.

Thanks for the invite, always happy to be your guest!

(Applied to my block branch:)

https://gitlab.com/hreitz/qemu/-/commits/block

Hanna
Re: [PATCH v2 02/10] tests/qemu-iotests: skip 108 when FUSE is not loaded
Posted by Thomas Huth 3 years, 7 months ago
On 16/06/2022 16.26, John Snow wrote:
> In certain container environments we may not have FUSE at all, so skip
> the test in this circumstance too.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   tests/qemu-iotests/108 | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108
> index 9e923d6a59f..54e935acf28 100755
> --- a/tests/qemu-iotests/108
> +++ b/tests/qemu-iotests/108
> @@ -60,6 +60,11 @@ if sudo -n losetup &>/dev/null; then
>   else
>       loopdev=false
>   
> +    # Check for usable FUSE in the host environment:
> +    if test ! -c "/dev/fuse"; then
> +        _notrun 'No passwordless sudo nor usable /dev/fuse'
> +    fi
> +
>       # QSD --export fuse will either yield "Parameter 'id' is missing"
>       # or "Invalid parameter 'fuse'", depending on whether there is
>       # FUSE support or not.

Reviewed-by: Thomas Huth <thuth@redhat.com>