summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-09-19 20:21:55 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-09-20 14:26:09 +0200
commit1b5245199680841fd088cf1a834b3623b3ef18d0 (patch)
tree6e77f161f84a7ad5a8621278ea5dce507cf48f5b /test/unit
parent548c69f58174b3cb3997c0fcff09276bd7502796 (diff)
downloadlvm2-1b5245199680841fd088cf1a834b3623b3ef18d0.tar.gz
cov: mask some warning about leakage
Mask false-positive leak report.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/bcache_utils_t.c2
-rw-r--r--test/unit/io_engine_t.c1
-rw-r--r--test/unit/radix_tree_t.c1
-rw-r--r--test/unit/run.c1
4 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/bcache_utils_t.c b/test/unit/bcache_utils_t.c
index 48dab142e..73b8902fb 100644
--- a/test/unit/bcache_utils_t.c
+++ b/test/unit/bcache_utils_t.c
@@ -67,6 +67,7 @@ static void *_fix_init(struct io_engine *engine)
T_ASSERT(f);
snprintf(f->fname, sizeof(f->fname), "unit-test-XXXXXX");
+ /* coverity[secure_temp] don't care */
f->fd = mkstemp(f->fname);
T_ASSERT(f->fd >= 0);
@@ -243,6 +244,7 @@ static void _reopen(struct fixture *f)
static uint8_t _random_pattern(void)
{
+ /* coverity[dont_call] don't care */
return random();
}
diff --git a/test/unit/io_engine_t.c b/test/unit/io_engine_t.c
index d45d8ffa7..2f6ea5b03 100644
--- a/test/unit/io_engine_t.c
+++ b/test/unit/io_engine_t.c
@@ -89,6 +89,7 @@ static void *_fix_init(void)
test_fail("posix_memalign failed");
snprintf(f->fname, sizeof(f->fname), "unit-test-XXXXXX");
+ /* coverity[secure_temp] don't care */
f->fd = mkstemp(f->fname);
T_ASSERT(f->fd >= 0);
diff --git a/test/unit/radix_tree_t.c b/test/unit/radix_tree_t.c
index 88c8bd5a7..be24ce76d 100644
--- a/test/unit/radix_tree_t.c
+++ b/test/unit/radix_tree_t.c
@@ -169,6 +169,7 @@ static void test_prefix_keys_reversed(void *fixture)
static void _gen_key(uint8_t *b, uint8_t *e)
{
for (; b != e; b++)
+ /* coverity[dont_call] don't care */
*b = rand() % 256;
}
diff --git a/test/unit/run.c b/test/unit/run.c
index 0abd47246..24624aea9 100644
--- a/test/unit/run.c
+++ b/test/unit/run.c
@@ -200,6 +200,7 @@ static void _run_test(struct test_details *t, bool use_colour, unsigned *passed,
(*passed)++;
fprintf(stderr, "%s[ OK]%s\n", green(use_colour), normal(use_colour));
+ /* coverity[leaked_storage] fixture released by fixture_exit */
}
}