Skip to content

Commit

Permalink
test: fix pmem2_map_from_existing/TEST[0-2] w/ memcheck
Browse files Browse the repository at this point in the history
Fixes: pmem#5594

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed May 23, 2023
1 parent 1cfb23d commit a614348
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
9 changes: 0 additions & 9 deletions src/test/pmem2_map_from_existing/TESTS.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,16 @@ def run(self, ctx):
ctx.exec('pmem2_map_from_existing', self.test_case, filepath)


# XXX disable the test for `memcheck'
# until https://github.com/pmem/pmdk/issues/5594 is fixed.
@t.require_valgrind_disabled('memcheck')
class TEST0(Pmem2_from_existing):
"""try to create two the same mappings"""
test_case = "test_two_same_mappings"


# XXX disable the test for `memcheck'
# until https://github.com/pmem/pmdk/issues/5594 is fixed.
@t.require_valgrind_disabled('memcheck')
class TEST1(Pmem2_from_existing):
"""try to map which overlap bottom part of existing mapping"""
test_case = "test_mapping_overlap_bottom"


# XXX disable the test for `memcheck'
# until https://github.com/pmem/pmdk/issues/5594 is fixed.
@t.require_valgrind_disabled('memcheck')
class TEST2(Pmem2_from_existing):
"""try to map which overlap upper part of existing mapping"""
test_case = "test_mapping_overlap_upper"
Expand Down
5 changes: 4 additions & 1 deletion src/test/pmem2_map_from_existing/pmem2_map_from_existing.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020-2021, Intel Corporation */
/* Copyright 2020-2023, Intel Corporation */

/*
* pmem2_map_from_existing.c -- pmem2_map_from_existing unittests
Expand Down Expand Up @@ -37,6 +37,7 @@ test_two_same_mappings(const struct test_case *tc, int argc, char *argv[])
UT_ASSERTeq(map2, NULL);

pmem2_map_delete(&map1);
pmem2_source_delete(&src);
CLOSE(fd);
return 1;
}
Expand Down Expand Up @@ -69,6 +70,7 @@ test_mapping_overlap_bottom(const struct test_case *tc, int argc, char *argv[])
UT_ASSERTeq(map2, NULL);

pmem2_map_delete(&map1);
pmem2_source_delete(&src);
CLOSE(fd);
return 1;
}
Expand Down Expand Up @@ -101,6 +103,7 @@ test_mapping_overlap_upper(const struct test_case *tc, int argc, char *argv[])
UT_ASSERTeq(map2, NULL);

pmem2_map_delete(&map1);
pmem2_source_delete(&src);
CLOSE(fd);
return 1;
}
Expand Down

0 comments on commit a614348

Please sign in to comment.