similar to: [nbdkit PATCH] RFC tests: Avoid odd test behavior under NDEBUG

Displaying 20 results from an estimated 8000 matches similar to: "[nbdkit PATCH] RFC tests: Avoid odd test behavior under NDEBUG"

2020 Jul 07
0
Re: [nbdkit PATCH] RFC tests: Avoid odd test behavior under NDEBUG
On Tue, Jul 07, 2020 at 09:51:53AM -0500, Eric Blake wrote: > While we support compilation with CFLAGS=-DNDEBUG for the brave user > desiring to avoid assertion overhead, this causes the tests to be less > powerful. 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
2023 Mar 01
6
[libnbd PATCH 0/6] common: catch up with nbdkit
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
2020 Aug 18
0
[PATCH nbdkit 6/9] lib: Use replacement strategy for get_current_dir_name.
This is really a replacement for a missing platform function, so use the same LIBOBJS mechanism to replace it. --- configure.ac | 2 +- common/include/Makefile.am | 6 --- common/replacements/Makefile.am | 10 ++++ plugins/floppy/Makefile.am | 1 + common/replacements/get_current_dir_name.h | 49
2019 Jan 01
0
[PATCH nbdkit v2 1/4] common/bitmap: Add bitmap_next function and tests.
It's useful to be able to search for the next non-zero entry in a bitmap. This commit adds a ?bitmap_next? function to do that. Because the bitmap is just a uint8_t buffer, using fast string functions we should be able to do this quickly even if the bitmap is sparse. (However the actual implementation is not optimized since that is quite complicated - see to-do comments in
2018 Aug 01
2
Re: [PATCH v2 nbdkit 4/6] common: Add a directory for common code shared by plugins and filters.
On Wed, Aug 1, 2018 at 2:14 PM Richard W.M. Jones <rjones@redhat.com> wrote: > Currently this adds two useful header files containing functions which > will be consumed by filters in later commits. > --- > Makefile.am | 5 +++- > common/include/Makefile.am | 39 ++++++++++++++++++++++++ > common/include/ispowerof2.h | 50 +++++++++++++++++++++++++++++++
2019 Jan 04
0
[PATCH nbdkit] common/include: Add generic MIN and MAX macros.
The preferred implementation uses __auto_type, a GCC extension also now supported by Clang. Unfortunately OpenBSD ships with GCC 4.2.1 (from 2007!) which predates this extension by quite a few years, so we have to be able to fall back to a plain macro. --- configure.ac | 20 ++++++++++- common/include/minmax.h | 63 +++++++++++++++++++++++++++++++++++
2019 Jan 04
0
[PATCH nbdkit v5 2/3] common/include: Add generic MIN and MAX macros.
The preferred implementation uses __auto_type, a GCC extension also now supported by Clang. Unfortunately OpenBSD ships with GCC 4.2.1 (from 2007!) which predates this extension by quite a few years, so we have to be able to fall back to a plain macro. --- configure.ac | 20 ++++++++++- common/include/minmax.h | 63 +++++++++++++++++++++++++++++++++++
2018 Sep 17
4
[PATCH nbdkit v2] common: isaligned: Use a macro instead of relying on implicit truncation.
--- common/include/isaligned.h | 11 +++++------ plugins/file/file.c | 4 ++-- plugins/vddk/vddk.c | 8 ++++---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/common/include/isaligned.h b/common/include/isaligned.h index e693820..81ce8a7 100644 --- a/common/include/isaligned.h +++ b/common/include/isaligned.h @@ -36,16 +36,15 @@ #include <assert.h>
2018 Aug 19
1
Re: [PATCH v3 3/4] common: Add isaligned helper module
On Sun, Aug 19, 2018 at 01:13:07AM +0300, Nir Soffer wrote: > is_aligned (size, align) returns true if size is aligned to align, > assuming that align is power of 2. > > Suggested by Eric Blake in > https://www.redhat.com/archives/libguestfs/2018-August/msg00036.html > --- > common/include/isaligned.h | 51 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 51
2023 Sep 03
1
[PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include
This is the first part of a pair of patch series which aim to let us use nbdkit_parse_size (or rather, an equivalent common function) in nbdcopy, so we can write: nbdcopy --request-size=32M ... We can't do that now which was annoying me earlier in the week. This commit creates a new function called human_size_parse which is basically nbdkit_parse_size, and turns nbdkit_parse_size into a
2018 Aug 19
9
[PATCH v3 0/4] file: Zero for block devices and older file systems
This version addresses comments on v3. Changes since v3: - Finally got spacing right (Eric) - Reorder includes (Richard) - Return 0 or -1 instead of r (Richard) - Add common/include/isaligned.h to Makefile.am (Richard) v3 was here: https://www.redhat.com/archives/libguestfs/2018-August/msg00177.html Nir Soffer (4): file: Avoid unsupported fallocate() calls file: Support zero without
2023 Sep 03
5
[PATCH libnbd 0/5] copy: Allow human sizes for --queue-size, etc
See companion patch: Subject: [PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include This is the second part of the patch. It adds the new human_size_parse function to libnbd and then uses it for parsing --queue-size, --request-size and --sparse. The main complication here is that there was already a common/utils/human-size.h header which ends up (eventually)
2019 Jan 01
7
[PATCH nbdkit v2 0/4] cache: Implement cache-max-size etc.
These are essentially identical to what was previously posted as patches 6/9 through 9/9 here: https://www.redhat.com/archives/libguestfs/2018-December/msg00145.html except that it has been rebased onto the current git master and retested thoroughly. Rich.
2020 Apr 10
2
[RFC] Usage of NDEBUG as a guard for non-assert debug code
On 2020-04-10, Michael Kruse via llvm-dev wrote: >#ifndef NDEBUG in the LLVM source and assert() are at least somewhat >linked. For instance, consider >https://github.com/llvm/llvm-project/blob/8423a6f36386aabced2a367c0ea53487901d31ca/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp#L2668 > >The #ifndef NDEBUG is used to guard the value that checked in an >assert() later. Only
2011 Jan 10
1
[LLVMdev] About NDEBUG (Cont)
Hi Li Qingan, > Thanks for your last reply. > I have made a critical mistake when I stated my question in last email. > I built llvm in debug mode, but the NDEBUG seemed to be still defined, such that > the -debug option is not enabled. > I have restated my configuration below. you need to configure with --enable-assertions In spite of the name, NDEBUG is not related to
2019 Jan 01
3
[PATCH nbdkit] include: Annotate function parameters with attribute((nonnull)).
Should we use attribute((nonnull)) at all? There's a very interesting history of this in libvirt -- try looking at commit eefb881 plus the commits referencing eefb881 -- but it does seem to work for me using recent GCC and Clang. I only did a few functions because annotating them gets old quickly... Rich.
2020 Apr 09
2
[RFC] Usage of NDEBUG as a guard for non-assert debug code
On Thu, Apr 9, 2020 at 9:59 AM Chris Tetreault via llvm-dev < llvm-dev at lists.llvm.org> wrote: > David, > > > > In my opinion, NDEBUG is one of those gross old C things that everybody > complains about. It’s called “Not Debug”, but really it means “Assert > Disabled”. I think one could be forgiven for actually using it as a > heuristic of whether or not a build
2018 Aug 18
7
[PATCH v3 0/4] file: Zero for block devices and older file systems
This version addresses some of the comments on v2. Changes since v2: - file_zero: Add missing space in function call - is_aligned: Assert that align is indeed a power of 2 - Spelling in commit message Not changed: - Eric commented that spacing was off: https://www.redhat.com/archives/libguestfs/2018-August/msg00113.html but I could not find anything wrong. - Eric asked if ioctl.h will cause
2018 Sep 17
3
Re: [PATCH nbdkit 1/3] common: isaligned: Use uint64_t instead of unsigned int.
On Mon, Sep 17, 2018 at 6:03 PM Richard W.M. Jones <rjones@redhat.com> wrote: > This should have no effect. However it's probably better to pass the > full type explicitly rather than using an implicit truncation. > Why is it better? We care only about the least significant bits; current code is clear about that. This is also specified behavior, although the only reference
2020 Apr 09
7
[RFC] Usage of NDEBUG as a guard for non-assert debug code
Hi all, During discussions about assertions in the Flang project, we noticed that there are a lot of cases in LLVM that #ifndef NDEBUG is used as a guard for non-assert code that we want enabled in debug builds. This works fine on its own, however it affects the behaviour of LLVM_ENABLE_ASSERTIONS; since NDEBUG controls whether assertions are enabled or not, a lot of debug code gets enabled in