io_tests fuse fixes
cover io_tests fuse fixes
Hi,
The following are three small fixes against some of the qemu iotests to avoid some errors that should prevent the tests from running in the first place. We noticed these on an s390 host, but I don't believe that to be relevant. My hunch is the messages are slightly different based on distro, because the tests (correctly) skip for me running Fedora on s390 or x86_64 while they fail under Ubuntu 26.04.
Eric Farman (3):
iotests/108: skip test if cannot access /dev/fuse iotests/file-io-error: complete permission denied check iotests/fuse-mmap-shared: complete permission denied check
tests/qemu-iotests/108 | 2 +- tests/qemu-iotests/tests/file-io-error | 3 +++ tests/qemu-iotests/tests/fuse-mmap-shared | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-)
Signature · 1 line
2.53.0
PATCH 1/3 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.
Add a check for the other potential error message.
--- tests/qemu-iotests/108 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/108 +1 -1
@@ -69,7 +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 + if [[ $error = *"'fuse'"* || $error = *"'id'"* ]]; then _notrun 'Passwordless sudo for losetup or FUSE support required, but' \ 'neither is available' fi
Signature · 1 line
2.53.0
PATCH 2/3 iotests/file-io-error: complete permission denied check
In reply to Eric FarmanAs with iotests/108, there are multiple potential error messages returned to the user. Add a 'notrun' exit for another possible error that would otherwise cause this test to fail:
fusermount3: failed to open TEST_DIR/fuse-export: Permission denied
--- tests/qemu-iotests/tests/file-io-error | 3 +++ 1 file changed, 3 insertions(+)
tests/qemu-iotests/tests/file-io-error +3 -0
@@ -92,6 +92,9 @@ output=$(_send_qemu_cmd $QEMU_HANDLE \ if echo "$output" | grep -q "Parameter 'type' does not accept value 'fuse'"; then _notrun 'No FUSE support' fi +if echo "$output" | grep -q "failed to open TEST_DIR/fuse-export: Permission denied"; then + _notrun 'No FUSE support' +fi echo "$output" echo
Signature · 1 line
2.53.0
PATCH 3/3 iotests/fuse-mmap-shared: complete permission denied check
In reply to Eric FarmanAs with iotests/108, there exists multiple messages that would signal a permission error when accessing the fuse tests:
fusermount3: failed to open .../scratch/qcow2-file-fuse-mmap-shared/export.fuse: Permission denied
Incorporate an additional potential error message to cause the test to be skipped rather than failed.
--- tests/qemu-iotests/tests/fuse-mmap-shared | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
tests/qemu-iotests/tests/fuse-mmap-shared +5 -2
@@ -28,8 +28,11 @@ def test_fuse_support(mount_point): }) test_qsd.stop() if 'error' in res: - assert (res['error']['desc'] == - "Parameter 'type' does not accept value 'fuse'") + print(res) + assert ((res['error']['desc'] == + "Parameter 'type' does not accept value 'fuse'") or + (res['error']['desc'] == + "Failed to mount FUSE session to export")) iotests.notrun('No FUSE support') # Shared mmap when using direct IO is only supported for Linux kernels >= 6.6
Signature · 1 line
2.53.0
Am 25.07.2026 um 14:56 hat Eric Farman geschrieben:
Quoted 8 lines
Hi,
The following are three small fixes against some of the qemu iotests to avoid some errors that should prevent the tests from running in the first place. We noticed these on an s390 host, but I don't believe that to be relevant. My hunch is the messages are slightly different based on distro, because the tests (correctly) skip for me running Fedora on s390 or
x86_64while they fail under Ubuntu 26.04.
This series conflicts with a patch from Denis Lunev I already queued:
[PATCH v2 2/3] iotests: skip FUSE tests when FUSE is not usable
https://patchew.org/QEMU/[email protected]/[email protected]/
Can you please check if this already solves some of your problems and rebase the rest of your series on top of it?
Kevin
Quoted 10 lines · Kevin Wolf
Am 25.07.2026 um 14:56 hat Eric Farman geschrieben:
Quoted 8 lines
Hi,
The following are three small fixes against some of the qemu iotests to avoid some errors that should prevent the tests from running in the first place. We noticed these on an s390 host, but I don't believe that to be relevant. My hunch is the messages are slightly different based on distro, because the tests (correctly) skip for me running Fedora on s390 or
x86_64while they fail under Ubuntu 26.04.
Quoted 7 lines
This series conflicts with a patch from Denis Lunev I already queued:
[PATCH v2 2/3] iotests: skip FUSE tests when FUSE is not usable
https://patchew.org/QEMU/[email protected]/[email protected]/Can you please check if this already solves some of your problems and rebase the rest of your series on top of it?
Ah, thanks for the pointer. That does indeed cover some of them, but not 108. I'll send that by itself as a v2 shortly.
Quoted 3 lines
Kevin