Commit 9bd67d9f authored by Damien George's avatar Damien George
Browse files

tests/extmod: Make some vfs tests fully unmount FSs before running.

Otherwise the existing FSs can interfere with the tests, and in some
cases the tests can write to the real FS on the device.
parent d00d062a
......@@ -47,6 +47,10 @@ class Filesystem:
# first we umount any existing mount points the target may have
try:
uos.umount('/')
except OSError:
pass
for path in uos.listdir('/'):
uos.umount('/' + path)
......
......@@ -44,6 +44,14 @@ except MemoryError:
print("SKIP")
sys.exit()
# first we umount any existing mount points the target may have
try:
uos.umount('/')
except OSError:
pass
for path in uos.listdir('/'):
uos.umount('/' + path)
uos.VfsFat.mkfs(bdev)
uos.mount(bdev, '/')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment