[libvirt] [PATCH 00/10] error: Refactor error message string convertor and add tests

Peter Krempa pkrempa at redhat.com
Wed Dec 5 16:47:41 UTC 2018


Make sure that all the error messages have both versions (info and
non-info) and store them in a sorted array rather than a giant switch.

Patch 7/10 adds a test that ensures that no messages were harmed during
the refactor. That commit will not be pushed (along with the
corresponding revert) to avoid polluting git history.

Peter Krempa (10):
  include: error: Add enum sentinel for virErrorNumber enum
  util: error: Fix error message strings to play well with additional
    info
  util: error: Add error message versions with info for some error codes
  util: error: Export virErrorMsg for use in testsuite
  tests: Add test for virErrorMsg message constraints
  util: error: Improve docs for virErrorMsg
  DO NOT PUSH: Make sure that error messages are not moved around
  util: error: Use a more declarative approach in virErrorMsg
  Revert "DO NOT PUSH: Make sure that error messages are not moved
    around"
  tests: virerror: Make sure that error messages stay in correct order

 include/libvirt/virterror.h |   5 +
 src/Makefile.am             |   1 +
 src/libvirt_private.syms    |   2 +
 src/util/Makefile.inc.am    |   1 +
 src/util/virerror.c         | 791 +++++++++---------------------------
 src/util/virerrorpriv.h     |  36 ++
 tests/Makefile.am           |   6 +
 tests/virerrortest.c        | 121 ++++++
 8 files changed, 361 insertions(+), 602 deletions(-)
 create mode 100644 src/util/virerrorpriv.h
 create mode 100644 tests/virerrortest.c

-- 
2.19.2




More information about the libvir-list mailing list