aboutsummaryrefslogtreecommitdiff
path: root/test/py/tests/test_fs/fstest_helpers.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-04-10 08:18:18 -0400
committerTom Rini <trini@konsulko.com>2019-04-10 08:18:18 -0400
commit48ff1bc4f0a97c3291d0c87c2717fc1d79da5ef5 (patch)
tree52c7f1f8b5f402e48fffbf4cc823da0f9f4d980c /test/py/tests/test_fs/fstest_helpers.py
parent4c24dab391003b99b1e0784fd41fe756cb07039e (diff)
parent0a8406602ae5f234f3f670ab59628673cc52ff4d (diff)
Merge branch '2019-04-09-master-imports-fs'
- test.py tests for mmc - ext4 symlink support and other fixes - ext4 block group descriptor sizing
Diffstat (limited to 'test/py/tests/test_fs/fstest_helpers.py')
-rw-r--r--test/py/tests/test_fs/fstest_helpers.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/py/tests/test_fs/fstest_helpers.py b/test/py/tests/test_fs/fstest_helpers.py
new file mode 100644
index 0000000000..faec298248
--- /dev/null
+++ b/test/py/tests/test_fs/fstest_helpers.py
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2019, Texas Instrument
+# Author: JJ Hiblot <jjhiblot@ti.com>
+#
+
+from subprocess import check_call, CalledProcessError
+
+def assert_fs_integrity(fs_type, fs_img):
+ try:
+ if fs_type == 'ext4':
+ check_call('fsck.ext4 -n -f %s' % fs_img, shell=True)
+ except CalledProcessError:
+ raise