-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters