[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/2] xen/rangeset: one bugfix and unit testing



Hello,

Rangesets are extensively used inside of Xen, yet we had no
unit tests to ensure it's correctness.  rangeset_remove_range() is in
fact bogus and will generate an incorrect output rangeset depending on
the inputs.

Patch 1 fixes the bug, patch 2 adds some basic unit testing to ensure
the fix done by patch 1 is correct.  The unit testing should likely be
expanded (in a different series) to further assert the correctness of
other rangeset operations.

Thanks, Roger.

Roger Pau Monne (2):
  xen/rangeset: fix incorrect subtraction
  tootls/tests: introduce unit tests for rangesets

 tools/tests/Makefile                 |   1 +
 tools/tests/rangeset/Makefile        |  45 ++++++
 tools/tests/rangeset/harness.h       |  71 +++++++++
 tools/tests/rangeset/test-rangeset.c | 228 +++++++++++++++++++++++++++
 xen/common/rangeset.c                |   3 +-
 5 files changed, 347 insertions(+), 1 deletion(-)
 create mode 100644 tools/tests/rangeset/Makefile
 create mode 100644 tools/tests/rangeset/harness.h
 create mode 100644 tools/tests/rangeset/test-rangeset.c

-- 
2.48.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.