@@ -1591,9 +1591,9 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_gen_rand_32,
|
||||
test_by_array_32,
|
||||
test_gen_rand_64,
|
||||
test_by_array_64));
|
||||
test_by_array_64);
|
||||
}
|
||||
|
@@ -11,6 +11,6 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test_no_malloc_init(
|
||||
test_a0));
|
||||
return test_no_malloc_init(
|
||||
test_a0);
|
||||
}
|
||||
|
@@ -13,17 +13,17 @@ get_nsizes_impl(const char *cmd) {
|
||||
assert_d_eq(mallctl(cmd, (void *)&ret, &z, NULL, 0), 0,
|
||||
"Unexpected mallctl(\"%s\", ...) failure", cmd);
|
||||
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
get_nsmall(void) {
|
||||
return (get_nsizes_impl("arenas.nbins"));
|
||||
return get_nsizes_impl("arenas.nbins");
|
||||
}
|
||||
|
||||
static unsigned
|
||||
get_nlarge(void) {
|
||||
return (get_nsizes_impl("arenas.nlextents"));
|
||||
return get_nsizes_impl("arenas.nlextents");
|
||||
}
|
||||
|
||||
static size_t
|
||||
@@ -41,17 +41,17 @@ get_size_impl(const char *cmd, size_t ind) {
|
||||
assert_d_eq(mallctlbymib(mib, miblen, (void *)&ret, &z, NULL, 0),
|
||||
0, "Unexpected mallctlbymib([\"%s\", %zu], ...) failure", cmd, ind);
|
||||
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static size_t
|
||||
get_small_size(size_t ind) {
|
||||
return (get_size_impl("arenas.bin.0.size", ind));
|
||||
return get_size_impl("arenas.bin.0.size", ind);
|
||||
}
|
||||
|
||||
static size_t
|
||||
get_large_size(size_t ind) {
|
||||
return (get_size_impl("arenas.lextent.0.size", ind));
|
||||
return get_size_impl("arenas.lextent.0.size", ind);
|
||||
}
|
||||
|
||||
/* Like ivsalloc(), but safe to call on discarded allocations. */
|
||||
@@ -61,13 +61,13 @@ vsalloc(tsdn_t *tsdn, const void *ptr) {
|
||||
|
||||
extent = extent_lookup(tsdn, ptr, false);
|
||||
if (extent == NULL) {
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
if (!extent_active_get(extent)) {
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (isalloc(tsdn, extent, ptr));
|
||||
return isalloc(tsdn, extent, ptr);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
@@ -77,7 +77,7 @@ do_arena_create(extent_hooks_t *h) {
|
||||
assert_d_eq(mallctl("arenas.create", (void *)&arena_ind, &sz,
|
||||
(void *)(h != NULL ? &h : NULL), (h != NULL ? sizeof(h) : 0)), 0,
|
||||
"Unexpected mallctl() failure");
|
||||
return (arena_ind);
|
||||
return arena_ind;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -190,7 +190,7 @@ arena_i_initialized(unsigned arena_ind, bool refresh) {
|
||||
assert_d_eq(mallctlbymib(mib, miblen, (void *)&initialized, &sz, NULL,
|
||||
0), 0, "Unexpected mallctlbymib() failure");
|
||||
|
||||
return (initialized);
|
||||
return initialized;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_arena_destroy_initial) {
|
||||
@@ -255,11 +255,11 @@ extent_dalloc_unmap(extent_hooks_t *extent_hooks, void *addr, size_t size,
|
||||
"Wrong hook function");
|
||||
called_dalloc = true;
|
||||
if (!try_dalloc) {
|
||||
return (true);
|
||||
return true;
|
||||
}
|
||||
pages_unmap(addr, size);
|
||||
did_dalloc = true;
|
||||
return (false);
|
||||
return false;
|
||||
}
|
||||
|
||||
static extent_hooks_t hooks_orig;
|
||||
@@ -313,9 +313,9 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_arena_reset,
|
||||
test_arena_destroy_initial,
|
||||
test_arena_destroy_hooks_default,
|
||||
test_arena_destroy_hooks_unmap));
|
||||
test_arena_destroy_hooks_unmap);
|
||||
}
|
||||
|
@@ -101,10 +101,10 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_atomic_u64,
|
||||
test_atomic_u32,
|
||||
test_atomic_p,
|
||||
test_atomic_zu,
|
||||
test_atomic_u));
|
||||
test_atomic_u);
|
||||
}
|
||||
|
@@ -212,8 +212,8 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_base_hooks_default,
|
||||
test_base_hooks_null,
|
||||
test_base_hooks_not_null));
|
||||
test_base_hooks_not_null);
|
||||
}
|
||||
|
@@ -143,7 +143,7 @@ test_bitmap_size_body(const bitmap_info_t *binfo, size_t nbits,
|
||||
assert_zu_ge(size, (nbits >> 3),
|
||||
"Bitmap size is smaller than expected");
|
||||
assert_zu_ge(size, prev_size, "Bitmap size is smaller than expected");
|
||||
return (size);
|
||||
return size;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_bitmap_size) {
|
||||
@@ -329,11 +329,11 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_bitmap_initializer,
|
||||
test_bitmap_size,
|
||||
test_bitmap_init,
|
||||
test_bitmap_set,
|
||||
test_bitmap_unset,
|
||||
test_bitmap_sfu));
|
||||
test_bitmap_sfu);
|
||||
}
|
||||
|
@@ -204,8 +204,8 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_new_delete,
|
||||
test_count_insert_search_remove,
|
||||
test_insert_iter_remove));
|
||||
test_insert_iter_remove);
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@ static bool monotonic_mock;
|
||||
|
||||
static bool
|
||||
nstime_monotonic_mock(void) {
|
||||
return (monotonic_mock);
|
||||
return monotonic_mock;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -20,7 +20,7 @@ nstime_update_mock(nstime_t *time) {
|
||||
if (monotonic_mock) {
|
||||
nstime_copy(time, &time_mock);
|
||||
}
|
||||
return (!monotonic_mock);
|
||||
return !monotonic_mock;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_decay_ticks) {
|
||||
@@ -352,8 +352,8 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_decay_ticks,
|
||||
test_decay_ticker,
|
||||
test_decay_nonmonotonic));
|
||||
test_decay_nonmonotonic);
|
||||
}
|
||||
|
@@ -134,8 +134,8 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_small_extent_size,
|
||||
test_large_extent_size,
|
||||
test_monotonic));
|
||||
test_monotonic);
|
||||
}
|
||||
|
@@ -57,6 +57,6 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
test_fork));
|
||||
return test(
|
||||
test_fork);
|
||||
}
|
||||
|
@@ -38,9 +38,9 @@ typedef enum {
|
||||
static int
|
||||
hash_variant_bits(hash_variant_t variant) {
|
||||
switch (variant) {
|
||||
case hash_variant_x86_32: return (32);
|
||||
case hash_variant_x86_128: return (128);
|
||||
case hash_variant_x64_128: return (128);
|
||||
case hash_variant_x86_32: return 32;
|
||||
case hash_variant_x86_128: return 128;
|
||||
case hash_variant_x64_128: return 128;
|
||||
default: not_reached();
|
||||
}
|
||||
}
|
||||
@@ -48,9 +48,9 @@ hash_variant_bits(hash_variant_t variant) {
|
||||
static const char *
|
||||
hash_variant_string(hash_variant_t variant) {
|
||||
switch (variant) {
|
||||
case hash_variant_x86_32: return ("hash_x86_32");
|
||||
case hash_variant_x86_128: return ("hash_x86_128");
|
||||
case hash_variant_x64_128: return ("hash_x64_128");
|
||||
case hash_variant_x86_32: return "hash_x86_32";
|
||||
case hash_variant_x86_128: return "hash_x86_128";
|
||||
case hash_variant_x64_128: return "hash_x64_128";
|
||||
default: not_reached();
|
||||
}
|
||||
}
|
||||
@@ -165,8 +165,8 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_hash_x86_32,
|
||||
test_hash_x86_128,
|
||||
test_hash_x64_128));
|
||||
test_hash_x64_128);
|
||||
}
|
||||
|
@@ -138,7 +138,7 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_junk_small,
|
||||
test_junk_large));
|
||||
test_junk_large);
|
||||
}
|
||||
|
@@ -621,7 +621,7 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_mallctl_errors,
|
||||
test_mallctlnametomib_errors,
|
||||
test_mallctlbymib_errors,
|
||||
@@ -643,5 +643,5 @@ main(void) {
|
||||
test_arenas_bin_constants,
|
||||
test_arenas_lextent_constants,
|
||||
test_arenas_create,
|
||||
test_stats_arenas));
|
||||
test_stats_arenas);
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ double_eq_rel(double a, double b, double max_rel_err, double max_abs_err) {
|
||||
double rel_err;
|
||||
|
||||
if (fabs(a - b) < max_abs_err) {
|
||||
return (true);
|
||||
return true;
|
||||
}
|
||||
rel_err = (fabs(b) > fabs(a)) ? fabs((a-b)/b) : fabs((a-b)/a);
|
||||
return (rel_err < max_rel_err);
|
||||
@@ -33,7 +33,7 @@ factorial(unsigned x) {
|
||||
ret *= (uint64_t)i;
|
||||
}
|
||||
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_ln_gamma_factorial) {
|
||||
@@ -380,11 +380,11 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_ln_gamma_factorial,
|
||||
test_ln_gamma_misc,
|
||||
test_pt_norm,
|
||||
test_pt_chi2,
|
||||
test_pt_gamma_shape,
|
||||
test_pt_gamma_scale));
|
||||
test_pt_gamma_scale);
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ thd_receiver_start(void *arg) {
|
||||
assert_ptr_not_null(msg, "mq_get() should never return NULL");
|
||||
dallocx(msg, 0);
|
||||
}
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *
|
||||
@@ -55,7 +55,7 @@ thd_sender_start(void *arg) {
|
||||
msg = (mq_msg_t *)p;
|
||||
mq_put(mq, msg);
|
||||
}
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_mq_threaded) {
|
||||
@@ -82,8 +82,8 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_mq_basic,
|
||||
test_mq_threaded));
|
||||
test_mq_threaded);
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,7 @@ thd_start(void *varg) {
|
||||
arg->x++;
|
||||
mtx_unlock(&arg->mtx);
|
||||
}
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_mtx_race) {
|
||||
@@ -51,7 +51,7 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_mtx_basic,
|
||||
test_mtx_race));
|
||||
test_mtx_race);
|
||||
}
|
||||
|
@@ -198,7 +198,7 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_nstime_init,
|
||||
test_nstime_init2,
|
||||
test_nstime_copy,
|
||||
@@ -209,5 +209,5 @@ main(void) {
|
||||
test_nstime_idivide,
|
||||
test_nstime_divide,
|
||||
test_nstime_monotonic,
|
||||
test_nstime_update));
|
||||
test_nstime_update);
|
||||
}
|
||||
|
@@ -41,12 +41,12 @@ binind_compute(void) {
|
||||
assert_d_eq(mallctlbymib(mib, miblen, (void *)&size, &sz, NULL,
|
||||
0), 0, "Unexpected mallctlbymib failure");
|
||||
if (size == SZ) {
|
||||
return (i);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
test_fail("Unable to compute nregs_per_run");
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static size_t
|
||||
@@ -63,7 +63,7 @@ nregs_per_run_compute(void) {
|
||||
sz = sizeof(nregs);
|
||||
assert_d_eq(mallctlbymib(mib, miblen, (void *)&nregs, &sz, NULL,
|
||||
0), 0, "Unexpected mallctlbymib failure");
|
||||
return (nregs);
|
||||
return nregs;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
@@ -75,7 +75,7 @@ arenas_create_mallctl(void) {
|
||||
assert_d_eq(mallctl("arenas.create", (void *)&arena_ind, &sz, NULL, 0),
|
||||
0, "Error in arenas.create");
|
||||
|
||||
return (arena_ind);
|
||||
return arena_ind;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -158,6 +158,6 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
test_pack));
|
||||
return test(
|
||||
test_pack);
|
||||
}
|
||||
|
@@ -22,6 +22,6 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
test_pages_huge));
|
||||
return test(
|
||||
test_pages_huge);
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ node_cmp(const node_t *a, const node_t *b) {
|
||||
ret = (((uintptr_t)a) > ((uintptr_t)b))
|
||||
- (((uintptr_t)a) < ((uintptr_t)b));
|
||||
}
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -31,7 +31,7 @@ node_cmp_magic(const node_t *a, const node_t *b) {
|
||||
assert_u32_eq(a->magic, NODE_MAGIC, "Bad magic");
|
||||
assert_u32_eq(b->magic, NODE_MAGIC, "Bad magic");
|
||||
|
||||
return (node_cmp(a, b));
|
||||
return node_cmp(a, b);
|
||||
}
|
||||
|
||||
typedef ph(node_t) heap_t;
|
||||
@@ -94,7 +94,7 @@ node_validate(const node_t *node, const node_t *parent) {
|
||||
|
||||
leftmost_child = phn_lchild_get(node_t, link, node);
|
||||
if (leftmost_child == NULL) {
|
||||
return (nnodes);
|
||||
return nnodes;
|
||||
}
|
||||
assert_ptr_eq((void *)phn_prev_get(node_t, link, leftmost_child),
|
||||
(void *)node, "Leftmost child does not link to node");
|
||||
@@ -107,7 +107,7 @@ node_validate(const node_t *node, const node_t *parent) {
|
||||
"sibling's prev doesn't link to sibling");
|
||||
nnodes += node_validate(sibling, node);
|
||||
}
|
||||
return (nnodes);
|
||||
return nnodes;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
@@ -133,7 +133,7 @@ label_return:
|
||||
if (false) {
|
||||
heap_print(heap);
|
||||
}
|
||||
return (nnodes);
|
||||
return nnodes;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_ph_empty) {
|
||||
@@ -156,7 +156,7 @@ static node_t *
|
||||
node_remove_first(heap_t *heap) {
|
||||
node_t *node = heap_remove_first(heap);
|
||||
node->magic = 0;
|
||||
return (node);
|
||||
return node;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_ph_random) {
|
||||
@@ -281,7 +281,7 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_ph_empty,
|
||||
test_ph_random));
|
||||
test_ph_random);
|
||||
}
|
||||
|
@@ -221,7 +221,7 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_prng_lg_range_u32_nonatomic,
|
||||
test_prng_lg_range_u32_atomic,
|
||||
test_prng_lg_range_u64_nonatomic,
|
||||
@@ -231,5 +231,5 @@ main(void) {
|
||||
test_prng_range_u32_atomic,
|
||||
test_prng_range_u64_nonatomic,
|
||||
test_prng_range_zu_nonatomic,
|
||||
test_prng_range_zu_atomic));
|
||||
test_prng_range_zu_atomic);
|
||||
}
|
||||
|
@@ -17,12 +17,12 @@ prof_dump_open_intercept(bool propagate_err, const char *filename) {
|
||||
fd = open("/dev/null", O_WRONLY);
|
||||
assert_d_ne(fd, -1, "Unexpected open() failure");
|
||||
|
||||
return (fd);
|
||||
return fd;
|
||||
}
|
||||
|
||||
static void *
|
||||
alloc_from_permuted_backtrace(unsigned thd_ind, unsigned iteration) {
|
||||
return (btalloc(1, thd_ind*NALLOCS_PER_THREAD + iteration));
|
||||
return btalloc(1, thd_ind*NALLOCS_PER_THREAD + iteration);
|
||||
}
|
||||
|
||||
static void *
|
||||
@@ -51,7 +51,7 @@ thd_start(void *varg) {
|
||||
}
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_idump) {
|
||||
@@ -81,6 +81,6 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
test_idump));
|
||||
return test(
|
||||
test_idump);
|
||||
}
|
||||
|
@@ -117,6 +117,6 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
test_prof_active));
|
||||
return test(
|
||||
test_prof_active);
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@ prof_dump_open_intercept(bool propagate_err, const char *filename) {
|
||||
fd = open("/dev/null", O_WRONLY);
|
||||
assert_d_ne(fd, -1, "Unexpected open() failure");
|
||||
|
||||
return (fd);
|
||||
return fd;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_gdump) {
|
||||
@@ -73,6 +73,6 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
test_gdump));
|
||||
return test(
|
||||
test_gdump);
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ prof_dump_open_intercept(bool propagate_err, const char *filename) {
|
||||
fd = open("/dev/null", O_WRONLY);
|
||||
assert_d_ne(fd, -1, "Unexpected open() failure");
|
||||
|
||||
return (fd);
|
||||
return fd;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_idump) {
|
||||
@@ -50,6 +50,6 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
test_idump));
|
||||
return test(
|
||||
test_idump);
|
||||
}
|
||||
|
@@ -12,7 +12,7 @@ prof_dump_open_intercept(bool propagate_err, const char *filename) {
|
||||
fd = open("/dev/null", O_WRONLY);
|
||||
assert_d_ne(fd, -1, "Unexpected open() failure");
|
||||
|
||||
return (fd);
|
||||
return fd;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -29,7 +29,7 @@ get_lg_prof_sample(void) {
|
||||
assert_d_eq(mallctl("prof.lg_sample", (void *)&lg_prof_sample, &sz,
|
||||
NULL, 0), 0,
|
||||
"Unexpected mallctl failure while reading profiling sample rate");
|
||||
return (lg_prof_sample);
|
||||
return lg_prof_sample;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -94,7 +94,7 @@ prof_dump_header_intercept(tsdn_t *tsdn, bool propagate_err,
|
||||
prof_dump_header_intercepted = true;
|
||||
memcpy(&cnt_all_copy, cnt_all, sizeof(prof_cnt_t));
|
||||
|
||||
return (false);
|
||||
return false;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_prof_reset_cleanup) {
|
||||
@@ -181,7 +181,7 @@ thd_start(void *varg) {
|
||||
}
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_prof_reset) {
|
||||
@@ -283,9 +283,9 @@ main(void) {
|
||||
/* Intercept dumping prior to running any tests. */
|
||||
prof_dump_open = prof_dump_open_intercept;
|
||||
|
||||
return (test(
|
||||
return test(
|
||||
test_prof_reset_basic,
|
||||
test_prof_reset_cleanup,
|
||||
test_prof_reset,
|
||||
test_xallocx));
|
||||
test_xallocx);
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ thd_start(void *varg) {
|
||||
mallctl_thread_name_set(thread_name);
|
||||
mallctl_thread_name_set("");
|
||||
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_prof_thread_name_threaded) {
|
||||
@@ -118,7 +118,7 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_prof_thread_name_validation,
|
||||
test_prof_thread_name_threaded));
|
||||
test_prof_thread_name_threaded);
|
||||
}
|
||||
|
@@ -192,11 +192,11 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_ql_empty,
|
||||
test_ql_tail_insert,
|
||||
test_ql_tail_remove,
|
||||
test_ql_head_insert,
|
||||
test_ql_head_remove,
|
||||
test_ql_insert));
|
||||
test_ql_insert);
|
||||
}
|
||||
|
@@ -232,10 +232,10 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_qr_one,
|
||||
test_qr_after_insert,
|
||||
test_qr_remove,
|
||||
test_qr_before_insert,
|
||||
test_qr_meld_split));
|
||||
test_qr_meld_split);
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ node_cmp(const node_t *a, const node_t *b) {
|
||||
ret = (((uintptr_t)a) > ((uintptr_t)b))
|
||||
- (((uintptr_t)a) < ((uintptr_t)b));
|
||||
}
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
typedef rb_tree(node_t) tree_t;
|
||||
@@ -73,7 +73,7 @@ tree_recurse(node_t *node, unsigned black_height, unsigned black_depth) {
|
||||
node_t *right_node;
|
||||
|
||||
if (node == NULL) {
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
left_node = rbtn_left_get(node_t, link, node);
|
||||
@@ -112,7 +112,7 @@ tree_recurse(node_t *node, unsigned black_height, unsigned black_depth) {
|
||||
ret += (black_depth != black_height);
|
||||
}
|
||||
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static node_t *
|
||||
@@ -139,7 +139,7 @@ tree_iterate_cb(tree_t *tree, node_t *node, void *data) {
|
||||
|
||||
(*i)++;
|
||||
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
@@ -149,7 +149,7 @@ tree_iterate(tree_t *tree) {
|
||||
i = 0;
|
||||
tree_iter(tree, NULL, tree_iterate_cb, (void *)&i);
|
||||
|
||||
return (i);
|
||||
return i;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
@@ -159,7 +159,7 @@ tree_iterate_reverse(tree_t *tree) {
|
||||
i = 0;
|
||||
tree_reverse_iter(tree, NULL, tree_iterate_cb, (void *)&i);
|
||||
|
||||
return (i);
|
||||
return i;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -201,7 +201,7 @@ remove_iterate_cb(tree_t *tree, node_t *node, void *data) {
|
||||
|
||||
node_remove(tree, node, *nnodes);
|
||||
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static node_t *
|
||||
@@ -211,7 +211,7 @@ remove_reverse_iterate_cb(tree_t *tree, node_t *node, void *data) {
|
||||
|
||||
node_remove(tree, node, *nnodes);
|
||||
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -347,7 +347,7 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_rb_empty,
|
||||
test_rb_random));
|
||||
test_rb_random);
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ rtree_node_alloc_intercept(tsdn_t *tsdn, rtree_t *rtree, size_t nelms) {
|
||||
assert_ptr_not_null(node, "Unexpected calloc() failure");
|
||||
malloc_mutex_lock(tsdn, &rtree->init_lock);
|
||||
|
||||
return (node);
|
||||
return node;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -102,7 +102,7 @@ thd_start(void *varg) {
|
||||
|
||||
free(extent);
|
||||
fini_gen_rand(sfmt);
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_rtree_concurrent) {
|
||||
@@ -283,10 +283,10 @@ main(void) {
|
||||
rtree_node_dalloc = rtree_node_dalloc_intercept;
|
||||
test_rtree = NULL;
|
||||
|
||||
return (test(
|
||||
return test(
|
||||
test_rtree_read_empty,
|
||||
test_rtree_concurrent,
|
||||
test_rtree_extrema,
|
||||
test_rtree_bits,
|
||||
test_rtree_random));
|
||||
test_rtree_random);
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ get_max_size_class(void) {
|
||||
assert_d_eq(mallctlbymib(mib, miblen, (void *)&max_size_class, &sz,
|
||||
NULL, 0), 0, "Unexpected mallctlbymib() error");
|
||||
|
||||
return (max_size_class);
|
||||
return max_size_class;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_size_classes) {
|
||||
@@ -173,8 +173,8 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_size_classes,
|
||||
test_psize_classes,
|
||||
test_overflow));
|
||||
test_overflow);
|
||||
}
|
||||
|
@@ -27,6 +27,6 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
test_arena_slab_regind));
|
||||
return test(
|
||||
test_arena_slab_regind);
|
||||
}
|
||||
|
@@ -95,8 +95,8 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_smoothstep_integral,
|
||||
test_smoothstep_monotonic,
|
||||
test_smoothstep_slope));
|
||||
test_smoothstep_slope);
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ TEST_END
|
||||
|
||||
void *
|
||||
thd_start(void *arg) {
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -339,12 +339,12 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_stats_summary,
|
||||
test_stats_large,
|
||||
test_stats_arenas_summary,
|
||||
test_stats_arenas_small,
|
||||
test_stats_arenas_large,
|
||||
test_stats_arenas_bins,
|
||||
test_stats_arenas_lextents));
|
||||
test_stats_arenas_lextents);
|
||||
}
|
||||
|
@@ -983,7 +983,7 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_json_parser,
|
||||
test_stats_print_json));
|
||||
test_stats_print_json);
|
||||
}
|
||||
|
@@ -64,8 +64,8 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_ticker_tick,
|
||||
test_ticker_ticks,
|
||||
test_ticker_copy));
|
||||
test_ticker_copy);
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ thd_start(void *arg) {
|
||||
"Resetting local data should have no effect on tsd");
|
||||
|
||||
free(p);
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_tsd_main_thread) {
|
||||
@@ -95,11 +95,11 @@ main(void) {
|
||||
/* Core tsd bootstrapping must happen prior to data_tsd_boot(). */
|
||||
if (nallocx(1, 0) == 0) {
|
||||
malloc_printf("Initialization error");
|
||||
return (test_status_fail);
|
||||
return test_status_fail;
|
||||
}
|
||||
data_tsd_boot();
|
||||
|
||||
return (test(
|
||||
return test(
|
||||
test_tsd_main_thread,
|
||||
test_tsd_sub_thread));
|
||||
test_tsd_sub_thread);
|
||||
}
|
||||
|
@@ -296,12 +296,12 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_pow2_ceil_u64,
|
||||
test_pow2_ceil_u32,
|
||||
test_pow2_ceil_zu,
|
||||
test_malloc_strtoumax_no_endptr,
|
||||
test_malloc_strtoumax,
|
||||
test_malloc_snprintf_truncated,
|
||||
test_malloc_snprintf));
|
||||
test_malloc_snprintf);
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ witness_comp(const witness_t *a, void *oa, const witness_t *b, void *ob) {
|
||||
assert(oa == (void *)a);
|
||||
assert(ob == (void *)b);
|
||||
|
||||
return (strcmp(a->name, b->name));
|
||||
return strcmp(a->name, b->name);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -49,7 +49,7 @@ witness_comp_reverse(const witness_t *a, void *oa, const witness_t *b,
|
||||
assert(oa == (void *)a);
|
||||
assert(ob == (void *)b);
|
||||
|
||||
return (-strcmp(a->name, b->name));
|
||||
return -strcmp(a->name, b->name);
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_witness) {
|
||||
@@ -255,11 +255,11 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_witness,
|
||||
test_witness_comp,
|
||||
test_witness_reversal,
|
||||
test_witness_recursive,
|
||||
test_witness_unlock_not_owned,
|
||||
test_witness_lockful));
|
||||
test_witness_lockful);
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return (test(
|
||||
return test(
|
||||
test_zero_small,
|
||||
test_zero_large));
|
||||
test_zero_large);
|
||||
}
|
||||
|
Reference in New Issue
Block a user