qemu-io: Exit code is always zero

Bug #1349722 reported by Maria Kustova on 2014-07-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Undecided
Unassigned

Bug Description

The qemu-io always returns zero on exit independently on errors occurred during the command execution.

Example,

$ qemu-io -c 'write 128 234' /tmp/run1/test-1/test.img

offset 128 is not sector aligned

$ echo $?
0

qemu.git HEAD: 41a1a9c42c4e

On Tue, Jul 29, 2014 at 08:07:44AM -0000, Maria Kustova wrote:
> The qemu-io always returns zero on exit independently on errors occurred
> during the command execution.
>
> Example,
>
> $ qemu-io -c 'write 128 234' /tmp/run1/test-1/test.img
>
> offset 128 is not sector aligned
>
> $ echo $?
> 0
>
>
> qemu.git HEAD: 41a1a9c42c4e

For single commands it makes sense to return the command success as the
exit code.

When qemu-io is used interactively or with multiple -c options we need a
error handling policy.

For this reason it is not totally trivial to implement.

Stefan

Thomas Huth (th-huth) wrote :

Looking through old bug tickets... is this still an issue with the latest version of QEMU? Or could we close this ticket nowadays?

Changed in qemu:
status: New → Incomplete
Max Reitz (xanclic) wrote :

Should be fixed as of 6b3aa8485ca8e.

Changed in qemu:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers