Skip to content

Commit

Permalink
test: disable pmem2_badblock tests due to pmem#5636
Browse files Browse the repository at this point in the history
  • Loading branch information
osalyk committed May 17, 2023
1 parent 37292d4 commit 3407e84
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/test/unittest/badblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,15 @@ def inject_bad_block(self, file, offset):
raise futils.Fail('unable to translate bad blocks')
block = int(proc.stdout.strip())

futils.run_command("sudo ndctl inject-error --block={} --count={} {}"
.format(block, count, namespace),
"injecting bad block failed")
# XXX - Injection of bad block operations is unsupported on some platforms
# https://github.com/pmem/pmdk/issues/5636
try:
futils.run_command("sudo ndctl inject-error --block={} --count={} {}"
.format(block, count, namespace)).strip().decode('UTF8')
except:
message = "failed to execute command sudo ndctl inject-error"
futils.skip("injection bad block operations is unsupported")


def get_bad_blocks_count(self, file):
device = self._get_path_device(file)
Expand Down

0 comments on commit 3407e84

Please sign in to comment.