On 3/1/23 12:40, Laszlo Ersek wrote: > From: Eric Blake <ebl...@redhat.com> > > Original (nbdkit) commit message: > > While we support compilation with CFLAGS=-DNDEBUG for the brave user > desiring to avoid assertion overhead, this causes the tests to be less > powerful (the tests "fail open" for anything where we relied on an > assert to validate nbdkit was behaving correctly; and this would be > even worse if we had side effects in a test assert, such as we just > fixed in d5cedf20). Fortunately, a quick test of './configure > CFLAGS=-DNDEBUG' didn't hit any test failures, but it seems better to > just ensure that assertions always work in our tests, even when they > are turned off for the main binary. > > Porting notes: > > This is a partial port. At this point, the test cases we have under > common/ actually reflect our common/ header file usage (meaning that, if > nbdkit has a test case for a header file we use, then we also have that > test case). However, test case *content* remains different at this point; > one piece is nbdkit commit 0b6d62668584 ("tests: Avoid odd test behavior > under NDEBUG", 2020-07-07). Port those parts of it that modify such test > cases that libnbd does have, at this point. Note that the nbdkit commit > modifies "test-ispowerof2.c" as well, be we have ported that particular
s/be/but/ > NDEBUG addition earlier (in libnbd commit 6cc512341281, "common/include: > Copy test-ispowerof2.c from nbdkit", 2022-08-25). > > Signed-off-by: Eric Blake <ebl...@redhat.com> > Signed-off-by: Laszlo Ersek <ler...@redhat.com> > (cherry picked from nbdkit commit 0b6d626685846d41ea113a394cb37e321c63e8bf) > --- > common/include/test-byte-swapping.c | 1 + > common/include/test-isaligned.c | 1 + > common/include/test-iszero.c | 1 + > common/include/test-minmax.c | 1 + > 4 files changed, 4 insertions(+) _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs