Merge pull request #26528 from keszybz/valgrind-simplification

Drop the -Dvalgrind configuration option
This commit is contained in:
Yu Watanabe
2023-02-22 23:04:12 +09:00
committed by GitHub
11 changed files with 92 additions and 103 deletions
+2 -6
View File
@@ -5,8 +5,6 @@
#include "strv.h"
#include "tests.h"
const bool mempool_use_allowed = VALGRIND;
TEST(set_steal_first) {
_cleanup_set_free_ Set *m = NULL;
int seen[3] = {};
@@ -37,10 +35,9 @@ static void item_seen(Item *item) {
TEST(set_free_with_destructor) {
Set *m;
struct Item items[4] = {};
unsigned i;
assert_se(m = set_new(NULL));
for (i = 0; i < ELEMENTSOF(items) - 1; i++)
for (size_t i = 0; i < ELEMENTSOF(items) - 1; i++)
assert_se(set_put(m, items + i) == 1);
m = set_free_with_destructor(m, item_seen);
@@ -55,10 +52,9 @@ DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(item_hash_ops, void, trivial_hash_
TEST(set_free_with_hash_ops) {
Set *m;
struct Item items[4] = {};
unsigned i;
assert_se(m = set_new(&item_hash_ops));
for (i = 0; i < ELEMENTSOF(items) - 1; i++)
for (size_t i = 0; i < ELEMENTSOF(items) - 1; i++)
assert_se(set_put(m, items + i) == 1);
m = set_free(m);