summaryrefslogtreecommitdiff
path: root/test/py/tests/test_fs/conftest.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-06-23 08:45:09 -0400
committerTom Rini <trini@konsulko.com>2021-06-23 08:45:09 -0400
commit6fc0a2f76bc285dc4bc80f55452311385e6c3d57 (patch)
treeaa741bbc7cb8e0208b7e21c870fdc39f9ca99ae6 /test/py/tests/test_fs/conftest.py
parent1ce892cb1ce970d8ee6ffcecc22351c84e67fca4 (diff)
parentb2710faf82998d7be9e4eef554063a5e27e88ec9 (diff)
Merge branch '2021-06-22-assorted-fixes'
- Assorted minor bugfixes
Diffstat (limited to 'test/py/tests/test_fs/conftest.py')
-rw-r--r--test/py/tests/test_fs/conftest.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/py/tests/test_fs/conftest.py b/test/py/tests/test_fs/conftest.py
index 410a675b971..7325486cdb1 100644
--- a/test/py/tests/test_fs/conftest.py
+++ b/test/py/tests/test_fs/conftest.py
@@ -159,6 +159,10 @@ def mk_fs(config, fs_type, size, id):
count = (size + 1048576 - 1) / 1048576
+ # Some distributions do not add /sbin to the default PATH, where mkfs lives
+ if '/sbin' not in os.environ["PATH"].split(os.pathsep):
+ os.environ["PATH"] += os.pathsep + '/sbin'
+
try:
check_call('rm -f %s' % fs_img, shell=True)
check_call('dd if=/dev/zero of=%s bs=1M count=%d'