All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: "John Snow" <jsnow@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	"Beraldo Leal" <bleal@redhat.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Kevin Wolf" <kwolf@redhat.com>
Subject: Re: [PATCH 2/5] tests/qemu-iotests: skip 108 when FUSE is not loaded
Date: Tue, 14 Jun 2022 09:59:19 +0100	[thread overview]
Message-ID: <YqhN50NeY3RIfvmy@redhat.com> (raw)
In-Reply-To: <fa6e9152-73a1-d6ca-269a-1b1513472aa8@redhat.com>

On Tue, Jun 14, 2022 at 06:46:35AM +0200, Thomas Huth wrote:
> On 14/06/2022 03.50, 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 | 6 ++++++
> >   1 file changed, 6 insertions(+)
> > 
> > diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108
> > index 9e923d6a59f..e401c5e9933 100755
> > --- a/tests/qemu-iotests/108
> > +++ b/tests/qemu-iotests/108
> > @@ -60,6 +60,12 @@ if sudo -n losetup &>/dev/null; then
> >   else
> >       loopdev=false
> > +    # Check for fuse support in the host environment:
> > +    lsmod | grep fuse &>/dev/null;
> 
> That doesn't work if fuse has been linked statically into the kernel. Would
> it make sense to test for /sys/fs/fuse instead?
> 
> (OTOH, we likely hardly won't run this on statically linked kernels anyway,
> so it might not matter too much)

But more importantly 'lsmod' may not be installed in our container
images. So checking /sys/fs/fuse avoids introducing a dep on the
'kmod' package.

> 
> > +    if [[ $? -ne 0 ]]; then
> 
> I'd prefer single "[" instead of "[[" ... but since we're requiring bash
> anyway, it likely doesn't matter.

Or

    if  test $? != 0 ; then

> 
> > +        _notrun 'No Passwordless sudo nor FUSE kernel module'
> > +    fi
> > +
> >       # QSD --export fuse will either yield "Parameter 'id' is missing"
> >       # or "Invalid parameter 'fuse'", depending on whether there is
> >       # FUSE support or not.
> 
>  Thomas
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2022-06-14  9:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14  1:50 [PATCH 0/5] Update CentOS VM tests John Snow
2022-06-14  1:50 ` [PATCH 1/5] tests/qemu-iotests: hotfix for 307, 223 output John Snow
2022-06-14  8:54   ` Daniel P. Berrangé
2022-06-14  1:50 ` [PATCH 2/5] tests/qemu-iotests: skip 108 when FUSE is not loaded John Snow
2022-06-14  4:46   ` Thomas Huth
2022-06-14  8:59     ` Daniel P. Berrangé [this message]
2022-06-14 14:30       ` John Snow
2022-06-15 13:41         ` John Snow
2022-06-15 15:33           ` Daniel P. Berrangé
2022-06-15 15:48             ` John Snow
2022-06-15 16:22               ` Daniel P. Berrangé
2022-06-14  1:50 ` [PATCH 3/5] tests/vm: use 'cp' instead of 'ln' for temporary vm images John Snow
2022-06-14  4:39   ` Thomas Huth
2022-06-14 14:51     ` John Snow
2022-06-14  1:50 ` [PATCH 4/5] tests/vm: switch CentOS 8 to CentOS 8 Stream John Snow
2022-06-14  4:40   ` Thomas Huth
2022-06-14  9:09   ` Daniel P. Berrangé
2022-06-14 14:56     ` John Snow
2022-06-14  1:50 ` [PATCH 5/5] tests/vm: switch centos.aarch64 " John Snow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YqhN50NeY3RIfvmy@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=bleal@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=hreitz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.