summaryrefslogtreecommitdiff
path: root/extmod
diff options
context:
space:
mode:
authorChristian Walther <cwalther@gmx.ch>2023-07-30 17:26:04 +0200
committerChristian Walther <cwalther@gmx.ch>2023-10-19 16:21:08 +0200
commit5f7065f57a1ce445266a566685ad451edecc58c3 (patch)
treeeb954d8f743f44c7ea158d8bdef0ba90a09bffac /extmod
parente3ba6f952bda153cfc3389eb48c7645d71b2b094 (diff)
extmod/vfs_posix: Fix accidentally passing tests.
These tests test an unrealistic situation and only pass by accident due to a bug. The upcoming fix for the bug would make them fail. The unrealistic situation is that VfsPosix methods are called with relative paths while the current working directory is somewhere outside of the root of the VFS. In the intended use of VFS objects via os.mount() (as opposed to calling methods directly as the tests do), this never happens, as mp_vfs_lookup_path() directs incoming calls to the VFS that contains the CWD. Make the testing situation realistic by changing the working directory to the root of the VFS before calling methods on it, as the subsequent relative path accesses expect. Thanks to the preceding commit, the tests still pass, but still for the wrong reason. The following commit "Fix relative paths on non-root VFS" will make them pass for the correct reason. Signed-off-by: Christian Walther <cwalther@gmx.ch>
Diffstat (limited to 'extmod')
0 files changed, 0 insertions, 0 deletions