Skip to content

RFC utils: Improve and document error reporting

Lluís Vilanova kvm qemu-devel 5 versions – In review

Get series with b4
b4 am 145442963048.1539.13602468921796488810.stgit@localhost

Versions newest first · linked by author and title

  1. v6 RFC Latest5 patches 22 repliesIn review
  2. v5 RFC5 patches 5 repliesSuperseded
  3. v4 RFC5 patches 5 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v3 RFC1 patch0 repliesSuperseded
v2 RFC2 patches9 repliesSuperseded

Changes in v6 from the cover letter

=============

* Rebase on 074d1cc [David Gibson].
* Fix typo in documentation [Eric Blake].
* Clarify when to use fatal/abort [Eric Blake].

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5util: Introduce error reporting functions with fatal/abortinclude/qemu/error-report.h util/qemu-error.c+52 -013 replies
2/5util: Use new error_report_fatal/abort instead of error_setg(&error_fatal/abort)hw/block/fdc.c hw/ppc/spapr.c hw/ppc/spapr_drc.c +1 more+11 -141 reply
3/5util: [ppc] Use new error_report_fatal() instead of exit()target-ppc/kvm.c target-ppc/translate.c target-ppc/translate_init.c+44 -480 replies
4/5util: [ppc] Use new error_report_abort() instead of abort()target-ppc/kvm.c target-ppc/kvm_ppc.h target-ppc/mmu-hash32.c +1 more+15 -122 replies
5/5doc: Introduce coding style for errorsHACKING+37 -06 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchJohn Snow
1/5
2/5A-b
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [Qemu-devel] [RFC][PATCH v6 0/5] utils: Improve and document error reporting

Adds leaner error-reporting functions for simple cases, and documents the purpose of the different facilities available in QEMU.

Although not all printf+exit/abort are replaced with the proper functions, a few are ported as an example.

Changes in v6
=============

* Rebase on 074d1cc [David Gibson].
* Fix typo in documentation [Eric Blake].
* Clarify when to use fatal/abort [Eric Blake].

Changes in v5
=============

* Fix typo in documentation [Eric Blake].

Changes in v4
=============

* Introduce 'error_report_fatal()' and 'error_report_abort()' functions [suggested by Thomas Huth].
* Repalce all existing uses of 'error_setg(error_fatal)' and 'error_setg(error_abort)' with 'error_report_fatal()' and 'error_report_abort()'.
* Replace all uses of 'exit()' with 'error_report_fatal()' in 'target-ppc'.
* Replace all uses of 'abort()' with 'error_report_abort()' in 'target-ppc'.

Changes in v3
=============

* Drop special object 'error_warn' in favour of raw 'error_report()' [suggested by Markus Armbruster].

Changes in v2
=============

* Split in two patches.
* Explicitly add a warning error object.

---

Lluís Vilanova (5):
util: Introduce error reporting functions with fatal/abort
util: Use new error_report_fatal/abort instead of error_setg(&error_fatal/abort)
util: [ppc] Use new error_report_fatal() instead of exit()
util: [ppc] Use new error_report_abort() instead of abort()
doc: Introduce coding style for errors

 HACKING                     |   37 ++++++++++++++++++++
 hw/block/fdc.c              |    6 ++-
 hw/ppc/spapr.c              |    8 ++--
 hw/ppc/spapr_drc.c          |    2 +
 include/qemu/error-report.h |   19 ++++++++++
 target-ppc/kvm.c            |    9 ++---
 target-ppc/kvm_ppc.h        |   15 +++++---
 target-ppc/mmu-hash32.c     |    5 ++-
 target-ppc/mmu_helper.c     |    3 +-
 target-ppc/translate.c      |    7 ++--
 target-ppc/translate_init.c |   80 +++++++++++++++++++++----------------------
 util/error.c                |    9 ++---
 util/qemu-error.c           |   33 ++++++++++++++++++
 13 files changed, 159 insertions(+), 74 deletions(-)

To: [email protected]
Cc: David Gibson <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Cc: Dr. David Alan Gilbert <[email protected]>
Cc: Thomas Huth <[email protected]>
Cc: Markus Armbruster <[email protected]>
Cc: Eric Blake <[email protected]>