]> git.proxmox.com Git - mirror_qemu.git/commit - block/file-posix.c
block: fix NetBSD qemu-iotests failure
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 25 Jul 2019 09:59:20 +0000 (11:59 +0200)
committerThomas Huth <thuth@redhat.com>
Sat, 17 Aug 2019 07:02:59 +0000 (09:02 +0200)
commitf6fc1e30cf5e30289c70f1b1ca7f26c56f85d32f
treee10b9d32843573267d4d45f12e6b047f1a2a1d7b
parentafd760539308a5524accf964107cdb1d54a059e3
block: fix NetBSD qemu-iotests failure

Opening a block device on NetBSD has an additional step compared to other OSes,
corresponding to raw_normalize_devicepath.  The error message in that function
is slightly different from that in raw_open_common and this was causing spurious
failures in qemu-iotests.  However, in general it is not important to know what
exact step was failing, for example in the qemu-iotests case the error message
contains the fairly unequivocal "No such file or directory" text from strerror.
We can thus fix the failures by standardizing on a single error message for
both raw_open_common and raw_normalize_devicepath; in fact, we can even
use error_setg_file_open to make sure the error message is the same as in
the rest of QEMU.

Message-Id: <20190725095920.28419-1-pbonzini@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
block/file-posix.c