diff options
author | Stephen Warren <swarren@nvidia.com> | 2020-08-04 11:28:33 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-07 22:31:32 -0400 |
commit | cc886253704424f2a332dade72dc1853e78bca04 (patch) | |
tree | bf202530d38957fae4b49454812b1368e75c5afc /test/py/tests/test_env.py | |
parent | edca8edd79583e6dd04d8d07767288c4fc0948b9 (diff) |
tests: support mkfs.ext4 without metadata_csum
Modify various test/py filesystem creation routines to support systems
that don't implement the metadata_csum ext4 feature.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'test/py/tests/test_env.py')
-rw-r--r-- | test/py/tests/test_env.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py index 86ec1b36d36..2ae8f25381e 100644 --- a/test/py/tests/test_env.py +++ b/test/py/tests/test_env.py @@ -416,7 +416,10 @@ def mk_env_ext4(state_test_env): else: try: u_boot_utils.run_and_log(c, 'dd if=/dev/zero of=%s bs=1M count=16' % persistent) - u_boot_utils.run_and_log(c, 'mkfs.ext4 -O ^metadata_csum %s' % persistent) + u_boot_utils.run_and_log(c, 'mkfs.ext4 %s' % persistent) + sb_content = u_boot_utils.run_and_log(c, 'tune2fs -l %s' % persistent) + if 'metadata_csum' in sb_content: + u_boot_utils.run_and_log(c, 'tune2fs -O ^metadata_csum %s' % persistent) except CalledProcessError: call('rm -f %s' % persistent, shell=True) raise |