qemu-io: Exit code is always zero
Public bug reported:
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
** Affects: qemu
Importance: Undecided
Status: New
Signature · 28 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1349722 Title: qemu-io: Exit code is always zero Status in QEMU: New 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 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1349722/+subscriptions
Quoted 7 lines · Maria Kustova
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
Quoted 7 lines
offset 128 is not sector aligned
$ echo $? 0qemu.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
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
Signature · 28 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1349722 Title: qemu-io: Exit code is always zero Status in QEMU: Incomplete 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 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1349722/+subscriptions
Should be fixed as of 6b3aa8485ca8e.
** Changed in: qemu
Status: Incomplete => Fix Released
Signature · 28 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1349722 Title: qemu-io: Exit code is always zero Status in QEMU: Fix Released 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 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1349722/+subscriptions