Skip to contentSkip to conversation

qemu-iotests: One more fuse fix

PATCH In review Eric Farman 2 participants 4 messages Jul 28 – Aug 10

lore
Share & tools
lore
#0 lore raw

v2 cover qemu-iotests: One more fuse fix

Hi,

After learning about Denis' series of fuse fixes, there's still one test that doesn't run on my system. The attached is a fix that builds upon their changes to fix test 108 as well.

v1: https://lore.kernel.org/r/[email protected]/
v1->v2:
- [KW] Rebase on https://lore.kernel.org/r/[email protected]/
and drop two of the (now superfluous) patches

Eric Farman (1):
iotests/108: skip test if cannot access /dev/fuse

 tests/qemu-iotests/108       | 5 +----
 tests/qemu-iotests/common.rc | 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)
Signature · 1 line
2.53.0
#1 lore raw

PATCH v2 1/1 iotests/108: skip test if cannot access /dev/fuse

This test might fail if the user is not root (or sudo'd):

fusermount3: failed to open .../scratch/qcow2-file-108/fuse-export: Permission denied

A check exists to try to cover for this, but there are two potential error messages that signal this case (per the comment block associated with the check) and only a skip for one of them.

Update the common fuse check to include this message, and update test 108 to utilize it.

Fixes 9ffd6d646d ("iotests/108: Test new refcount rebuild algorithm")

Based-on: <[email protected]>

---
 tests/qemu-iotests/108       | 5 +----
 tests/qemu-iotests/common.rc | 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)
tests/qemu-iotests/108 +1 -4
index bf808b3512..5d91e58943 100755
@@ -69,10 +69,7 @@ else
     # or "Invalid parameter 'fuse'", depending on whether there is
     # FUSE support or not.
     error=$($QSD --export fuse 2>&1)
-    if [[ $error = *"'fuse'"* ]]; then
-        _notrun 'Passwordless sudo for losetup or FUSE support required, but' \
-                'neither is available'
-    fi
+    _notrun_on_fuse_error "$error"
 fi
 
 echo
tests/qemu-iotests/common.rc +1 -0
index bcb1ec50a9..844c19d15a 100644
@@ -986,6 +986,7 @@ _require_drivers()
 _notrun_on_fuse_error()
 {
     case "$1" in
+        *"Parameter 'id' is missing"* | \
         *"Parameter 'type' does not accept value 'fuse'"*)
             _notrun "No FUSE support"
             ;;
Signature · 1 line
2.53.0
#2 lore raw

Re: [PATCH v2 1/1] iotests/108: skip test if cannot access /dev/fuse

Quoted 41 lines · Eric Farman

This test might fail if the user is not root (or sudo'd):

fusermount3: failed to open .../scratch/qcow2-file-108/fuse-export: Permission denied

A check exists to try to cover for this, but there are two potential error messages that signal this case (per the comment block associated with the check) and only a skip for one of them.

Update the common fuse check to include this message, and update test 108 to utilize it.

Fixes 9ffd6d646d ("iotests/108: Test new refcount rebuild algorithm")

Based-on: <[email protected]>

---
  tests/qemu-iotests/108       | 5 +----
  tests/qemu-iotests/common.rc | 1 +
  2 files changed, 2 insertions(+), 4 deletions(-)
tests/qemu-iotests/108 +1 -4
index bf808b3512..5d91e58943 100755
@@ -69,10 +69,7 @@ else
      # or "Invalid parameter 'fuse'", depending on whether there is
      # FUSE support or not.
      error=$($QSD --export fuse 2>&1)
-    if [[ $error = *"'fuse'"* ]]; then
-        _notrun 'Passwordless sudo for losetup or FUSE support required, but' \
-                'neither is available'
-    fi
+    _notrun_on_fuse_error "$error"
  fi
 
  echo
tests/qemu-iotests/common.rc +0 -0
index bcb1ec50a9..844c19d15a 100644

tests/qemu-iotests/common.rc _require_drivers() · line 992

Quoted 7 lines
tests/qemu-iotests/common.rc +1 -0
@@ -986,6 +986,7 @@ _require_drivers()
  _notrun_on_fuse_error()
  {
      case "$1" in
+        *"Parameter 'id' is missing"* | \
          *"Parameter 'type' does not accept value 'fuse'"*)
              _notrun "No FUSE support"
              ;;

Is “Parameter 'id' is missing” not the expected error message when there *is* FUSE support? At least for the case above in test 108.

Hanna

#3 lore raw

Re: [PATCH v2 1/1] iotests/108: skip test if cannot access /dev/fuse

Quoted 43 lines · Hanna Czenczek
Quoted 42 lines · Eric Farman

This test might fail if the user is not root (or sudo'd):

   fusermount3: failed to open .../scratch/qcow2-file-108/fuse-export: Permission denied

A check exists to try to cover for this, but there are two potential error messages that signal this case (per the comment block associated with the check) and only a skip for one of them.

Update the common fuse check to include this message, and update test 108 to utilize it.

Fixes 9ffd6d646d ("iotests/108: Test new refcount rebuild algorithm")

Based-on: <[email protected]>

---
  tests/qemu-iotests/108       | 5 +----
  tests/qemu-iotests/common.rc | 1 +

  2 files changed, 2 insertions(+), 4 deletions(-)
tests/qemu-iotests/108 +1 -4
index bf808b3512..5d91e58943 100755
@@ -69,10 +69,7 @@ else
       # or "Invalid parameter 'fuse'", depending on whether there is
       # FUSE support or not.
       error=$($QSD --export fuse 2>&1)
-    if [[ $error = *"'fuse'"* ]]; then
-        _notrun 'Passwordless sudo for losetup or FUSE support 
 required, but' \
-                'neither is available'
-    fi
+    _notrun_on_fuse_error "$error"

  fi
  echo

tests/qemu-iotests/common.rc +0 -0
index bcb1ec50a9..844c19d15a 100644
@@ -986,6 +986,7 @@ _require_drivers()
   _notrun_on_fuse_error()
Quoted 9 lines
Quoted 6 lines
tests/qemu-iotests/common.rc +0 -0
   {

      case "$1" in
+        *"Parameter 'id' is missing"* | \
          *"Parameter 'type' does not accept value 'fuse'"*) _notrun "No FUSE support"
              ;;

Is “Parameter 'id' is missing” not the expected error message when there *is* FUSE support? At least for the case above in test 108.

Hrm, guess I got my wires crossed between a sudo-able guest and one that isn't. You're right that the same response is given regardless of whether. Let me revisit this and see if I can get this to skip properly.

Thanks,
Eric