summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/vfs_basic.py.exp
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-09-22 15:05:00 +1000
committerDamien George <damien@micropython.org>2020-09-23 16:23:35 +1000
commit71adf506ce43b55b859f81f191ac0826928bbdd5 (patch)
tree21e4910d2befb39f483dab861eb727f374105095 /tests/extmod/vfs_basic.py.exp
parent3e16763201d879cfdd58fdf269fbe03a3d326675 (diff)
downloadmicropython-71adf506ce43b55b859f81f191ac0826928bbdd5.tar.gz
micropython-71adf506ce43b55b859f81f191ac0826928bbdd5.zip
extmod/vfs: Fix lookup of entry in root dir so it fails correctly.
Prior to this commit, uos.chdir('/') followed by uos.stat('noexist') would succeed that stat even though the entry did not exist (some other functions like listdir would have similar issues). This is because, if the current directory was the root and the path was relative, mp_vfs_lookup_path would return success for bad paths. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/extmod/vfs_basic.py.exp')
-rw-r--r--tests/extmod/vfs_basic.py.exp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/extmod/vfs_basic.py.exp b/tests/extmod/vfs_basic.py.exp
index ebca310304..536bb4c805 100644
--- a/tests/extmod/vfs_basic.py.exp
+++ b/tests/extmod/vfs_basic.py.exp
@@ -1,6 +1,18 @@
(16384, 0, 0, 0, 0, 0, 0, 0, 0, 0)
True
/
+chdir x OSError
+chdir /x OSError
+listdir x OSError
+listdir /x OSError
+mkdir x OSError
+mkdir /x OSError
+remove x OSError
+remove /x OSError
+rmdir x OSError
+rmdir /x OSError
+stat x OSError
+stat /x OSError
1 mount False False
['test_mnt']
('test_mnt', 16384, 0)