[Libguestfs] [PATCH nbdkit v2 0/6] New ones plugin and evil filter

Richard W.M. Jones rjones at redhat.com
Wed May 17 10:06:53 UTC 2023

This addresses most of the issues from the review of v1 here:


* The filter now only handles 1e-12 <= P <= 1/8.  Probabilities
  outside this range are treated as 0% or 100% respectively.  The
  reasons are given in the code and man page, but basically are to do
  with stopping things from blowing up.  The restriction is not
  essential - it might be fixed in future.  I also added tests for
  small and large probabilities.

* I did *not* change probability parsing or the "inf/nan" etc case or
  return the numerator and denominator separately.  The parsing could
  be changed/fixed later.  The API/ABI could not be changed, but I'm
  unconvinced that returning two numbers instead of one does anything
  except push the problem elsewhere.

* A new commit is added to make <ispowerof2.h> log_2_bits work on 64
  bit ints on all platforms.  I tested this inside a 32 bit mock.

* Add more debugging, and in particular print the seed.

* Use Python to count bits instead of scary shell script.

* When comparing subsets in the tests, make sure they contain a stuck

* Use '**' for exponentiation consistently.

* Various other comments / typos / etc fixed and some improvements to
  the man page.

* Retest.

Now I must get back to doing real work!


More information about the Libguestfs mailing list