Skip to content

Commit

Permalink
test: disable test due to pmem#5641
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed May 16, 2023
1 parent 5bfd7d9 commit efdc6cb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/ex_libpmem2/TESTS.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#
import futils
import testframework as t
from testframework import granularity as g


@t.require_build(['debug', 'release'])
Expand Down Expand Up @@ -73,6 +74,12 @@ def run(self, ctx):
ctx.exec(example_path, *args, stdout_file='out4.log')


# XXX
# Manually disabled for pmemcheck for g.PAGE until ready fix for
# https://github.com/pmem/pmdk/issues/5641
# additionall test TEST501 has been added to cover non-pmemcheck configs.
@g.require_granularity(g.CACHELINE, g.BYTE) # to be removed when fix available
@t.require_valgrind_enabled('pmemcheck') # to be removed when fix available
class TEST5(EX_LIBPMEM2):

def run(self, ctx):
Expand All @@ -81,6 +88,11 @@ def run(self, ctx):
ctx.exec(example_path, "write", file_path, "foobar")
ctx.exec(example_path, "read", file_path, stdout_file='out5.log')

# XXX see TEST5 above
@t.require_valgrind_disabled('pmemcheck')
class TEST501(TEST5): # to be removed when fix available

pass

@t.windows_exclude
# This test case would require two VALGRIND_SET_CLEAN() calls
Expand Down
26 changes: 26 additions & 0 deletions src/test/unittest/granularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,21 @@ def filter(cls, config, msg, tc):
"""
req_gran, kwargs = ctx.get_requirement(tc, 'granularity', None)
disabled, _ = ctx.get_requirement(tc, 'disabled_granularity', ())


# remove granularities if respective test directories in
# test config are not defined
conf_defined = [c for c in config.granularity
if c.testdir_defined(config)]

for tg in conf_defined:
if tg in disabled:
futils.Message("granularity '{}' is disabled by test"
.format(tg))
# raise futils.Skip(
# "granularity '{}' is disabled by test"
# .format(tg))
if req_gran == Non:
return [Non(**kwargs), ]

Expand All @@ -166,6 +175,10 @@ def filter(cls, config, msg, tc):
tmp_req_gran = req_gran

filtered = ctx.filter_contexts(conf_defined, tmp_req_gran)

#for tg in disabled:
# filtered.remove(tg)


kwargs['tc_dirname'] = tc.tc_dirname

Expand Down Expand Up @@ -280,6 +293,19 @@ def wrapped(tc):
return tc
return wrapped

def require_granularity_disabled(*granularity, **kwargs):
for g in granularity:
if not isinstance(g, _Granularity):
raise ValueError('selected granularity {} is invalid'
.format(g))

enum_values = [g.value for g in granularity]

def wrapped(tc):
ctx.add_requirement(tc, 'disabled_granularity', enum_values, **kwargs)
return tc
return wrapped


def no_testdir(**kwargs):
def wrapped(tc):
Expand Down

0 comments on commit efdc6cb

Please # to comment.