diff options
author | Alessandro Gatti <a.gatti@frob.it> | 2025-04-24 05:07:28 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-04-24 22:11:42 +1000 |
commit | ce7f65f96703bbbe6039ba29e079023a32dccef0 (patch) | |
tree | 2942116ec7115c9a448cc590876195445dc7d04a /tests/extmod/machine_signal.py.exp | |
parent | 898c04ae0e24ca523a630eecc9ac4b4787e55a7e (diff) | |
download | micropython-ce7f65f96703bbbe6039ba29e079023a32dccef0.tar.gz micropython-ce7f65f96703bbbe6039ba29e079023a32dccef0.zip |
tests/extmod/vfs_posix.py: Fix test on Android.
This commit makes a slight change to the vfs_posix test suite to let it
pass on Android.
On Android, non-root processes can perform most filesystem operations
only on a restricted set of directories. The vfs_posix test suite
attempted to enumerate the filesystem root directory, and said directory
happens to be restricted for non-root processes. This would raise
an EACCES OSError and terminate the test with a unexpected failure.
To fix this, rather than enumerating the filesystem root directory the
enumeration target is the internal shared storage area root - which
doesn't have enumeration restrictions for non-root processes. The path
is hardcoded because it is guaranteed to be there on pretty much any
recent-ish device for now (it stayed the same for more than a decade for
compatibility reasons). The proper way would be to query the storage
subsystem via a JNI round-trip call, but this introduces too much
complexity for something that is unlikely to break going forward.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'tests/extmod/machine_signal.py.exp')
0 files changed, 0 insertions, 0 deletions