Skip to content

Commit a49a96b

Browse files
committed
tests/extmod/vfs_basic: Unmount all existing devices before doing test.
This is so the test can run successfully on targets that already have something mounted.
1 parent 923ec11 commit a49a96b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/extmod/vfs_basic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ def open(self, file, mode):
4646
print(self.id, 'open', file, mode)
4747

4848

49+
# first we umount any existing mount points the target may have
50+
for path in uos.listdir('/'):
51+
uos.umount('/' + path)
52+
4953
# stat root dir
5054
print(uos.stat('/'))
5155

0 commit comments

Comments
 (0)