summaryrefslogtreecommitdiff
path: root/test/py/tests/test_fs/fstest_helpers.py
diff options
context:
space:
mode:
authorGabriel Dalimonte <gabriel.dalimonte@gmail.com>2025-02-17 13:26:44 -0500
committerTom Rini <trini@konsulko.com>2025-03-07 11:50:22 -0600
commit06159a1465fc97d8d7b72b9bea39a396f6e7057c (patch)
tree71a27cbcbc587d8157021fb1d8a7cca37ec9c8fc /test/py/tests/test_fs/fstest_helpers.py
parentd9c149664fa7a0c2eabfc046dcf89637f655364b (diff)
fs: fat: add rename
The implementation roughly follows the POSIX specification for rename() [1]. The ordering of operations attempting to minimize the chance for data loss in unexpected circumstances. The 'mv' command was implemented as a front end for the rename operation as that is what most users are likely familiar with in terms of behavior. The 'FAT_RENAME' Kconfig option was added to prevent code size increase on size-oriented builds like SPL. [1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/rename.html Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
Diffstat (limited to 'test/py/tests/test_fs/fstest_helpers.py')
-rw-r--r--test/py/tests/test_fs/fstest_helpers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/py/tests/test_fs/fstest_helpers.py b/test/py/tests/test_fs/fstest_helpers.py
index faec2982489..c1447b4d43e 100644
--- a/test/py/tests/test_fs/fstest_helpers.py
+++ b/test/py/tests/test_fs/fstest_helpers.py
@@ -9,5 +9,7 @@ def assert_fs_integrity(fs_type, fs_img):
try:
if fs_type == 'ext4':
check_call('fsck.ext4 -n -f %s' % fs_img, shell=True)
+ elif fs_type in ['fat12', 'fat16', 'fat32']:
+ check_call('fsck.fat -n %s' % fs_img, shell=True)
except CalledProcessError:
raise