[Libguestfs] [libnbd PATCH 0/6] common: catch up with nbdkit

Laszlo Ersek lersek at redhat.com
Wed Mar 1 11:40:21 UTC 2023


If we compare the "common" subdirectory between nbdkit @ 6b4178d0fdfe
("ci: Temporarily disable perl in MacOS", 2023-02-27) and libnbd @
d05cd8f384a7 ("Version 1.15.11.", 2023-02-28), we find differences. We
can categorize these differences along two (orthogonal) axes:

- Intentional or unintentional.

  Intentional differences are for example when one of the libnbd and
  nbdkit projects has either a customization or a feature that the other
  project doesn't need or want. (Customizations can be small, such as a
  divergence inside a header file. Feature granularity is larger: a
  feature usually corresponds to a full header file.)

  Unintentional differences come from missing ports, or incomplete
  ports.

- Libnbd not having a change from nbdkit (whether intentionally or not),
  vs. nbdkit not having a change from libnbd (ditto).

I've analyzed each of the differences found. This patch set eliminates
those differences where libnbd unintentionally lags behind nbdkit.

Later I plan to post the counterpart series for nbdkit (eliminating the
differences where nbdkit unintentionally lags behind libnbd). Note that
the counterpart series for nbdkit will not target libnbd @ d05cd8f384a7
(that is, libnbd 1.15.11) at once. Instead, it will target libnbd
v1.15.9 at first. Then I plan to port my patches between libnbd v1.15.9
and v1.15.11 to nbdkit separately -- that's going to be more work.

So this series, and the counterpart for nbdkit, will eliminate past
debt, in order to form a common baseline for porting my recent patches
from libnbd to nbdkit.

The larger LISTEN_FDNAMES series will be resumed even later.

Laszlo

Eric Blake (1):
  tests: Avoid odd test behavior under NDEBUG [partial port]

Richard W.M. Jones (5):
  common/include: Add unit tests [byte-swapping, isaligned, iszero]
  common/include: Add further unit tests [minmax]
  common: include: Define bswap_16, bswap_32 and bswap_64 [finish port]
  vector: Add vector_duplicate function
  common/include: Fix MIN and MAX macros so they can be nested [finish
    port]

 .gitignore                          |   4 +
 common/include/Makefile.am          |  20 +++
 common/include/test-byte-swapping.c | 108 ++++++++++++
 common/include/test-isaligned.c     |  62 +++++++
 common/include/test-iszero.c        |  66 ++++++++
 common/include/test-minmax.c        | 172 ++++++++++++++++++++
 common/utils/vector.h               |  17 ++
 configure.ac                        |   3 +
 8 files changed, 452 insertions(+)
 create mode 100644 common/include/test-byte-swapping.c
 create mode 100644 common/include/test-isaligned.c
 create mode 100644 common/include/test-iszero.c
 create mode 100644 common/include/test-minmax.c


base-commit: d05cd8f384a7278187d7e87c4dc2a346e879773b


More information about the Libguestfs mailing list