littlefs-python 0.13.0__tar.gz → 0.13.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/.github/workflows/deploy.yml +1 -1
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/PKG-INFO +10 -2
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/lfs.c +2 -7
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_seek.toml +148 -1
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs_python.egg-info/PKG-INFO +10 -2
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/.gitattributes +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/.github/dependabot.yml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/.github/workflows/run-tests.yml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/.gitignore +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/.gitmodules +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/.pre-commit-config.yaml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/.readthedocs.yml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/LICENSE +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/MANIFEST.in +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/README.rst +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/ci/build-wheels.sh +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/ci/download_release_files.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/docs/Makefile +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/docs/api/index.rst +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/docs/cli.rst +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/docs/conf.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/docs/doc8.ini +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/docs/examples/index.rst +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/docs/index.rst +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/docs/make.bat +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/docs/requirements.txt +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/docs/usage.rst +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/examples/mkfsimg.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/examples/walk.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/.git +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/.gitattributes +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/.github/workflows/post-release.yml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/.github/workflows/release.yml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/.github/workflows/status.yml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/.github/workflows/test.yml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/.gitignore +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/DESIGN.md +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/LICENSE.md +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/Makefile +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/README.md +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/SPEC.md +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/bd/lfs_emubd.c +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/bd/lfs_emubd.h +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/bd/lfs_filebd.c +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/bd/lfs_filebd.h +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/bd/lfs_rambd.c +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/bd/lfs_rambd.h +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/benches/bench_dir.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/benches/bench_file.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/benches/bench_superblock.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/lfs.h +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/lfs_util.c +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/lfs_util.h +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/runners/bench_runner.c +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/runners/bench_runner.h +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/runners/test_runner.c +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/runners/test_runner.h +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/bench.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/changeprefix.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/code.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/cov.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/data.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/perf.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/perfbd.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/plot.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/plotmpl.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/prettyasserts.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/readblock.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/readmdir.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/readtree.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/stack.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/structs.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/summary.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/tailpipe.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/teepipe.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/test.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/tracebd.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/scripts/watch.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_alloc.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_attrs.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_badblocks.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_bd.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_compat.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_dirs.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_entries.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_evil.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_exhaustion.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_files.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_interspersed.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_move.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_orphans.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_paths.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_powerloss.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_relocations.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_superblocks.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/tests/test_truncate.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/mypy.ini +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/pyproject.toml +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/requirements.txt +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/setup.cfg +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/setup.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs/__init__.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs/__main__.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs/context.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs/errors.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs/lfs.c +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs/lfs.pxd +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs/lfs.pyi +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs/lfs.pyx +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs/py.typed +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs_python.egg-info/SOURCES.txt +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs_python.egg-info/dependency_links.txt +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs_python.egg-info/entry_points.txt +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs_python.egg-info/not-zip-safe +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs_python.egg-info/requires.txt +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs_python.egg-info/top_level.txt +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/lfs/conftest.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/lfs/test_dir_functions.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/lfs/test_file_functions.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/lfs/test_fs_functions.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/test_attr.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/test_block_count.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/test_directories.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/test_files.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/test_grow.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/test_multiversion.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/test_name_max.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/test_remove_rename.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/test_version.py +0 -0
- {littlefs_python-0.13.0 → littlefs_python-0.13.1}/test/test_walk.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: littlefs-python
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.1
|
|
4
4
|
Summary: A python wrapper for littlefs
|
|
5
5
|
Home-page: https://github.com/jrast/littlefs-python
|
|
6
6
|
Author: Jürg Rast
|
|
@@ -21,6 +21,14 @@ Classifier: Topic :: System :: Filesystems
|
|
|
21
21
|
Description-Content-Type: text/x-rst
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Requires-Dist: importlib-metadata>=4.4; python_version < "3.10"
|
|
24
|
+
Dynamic: author
|
|
25
|
+
Dynamic: author-email
|
|
26
|
+
Dynamic: classifier
|
|
27
|
+
Dynamic: description
|
|
28
|
+
Dynamic: description-content-type
|
|
29
|
+
Dynamic: home-page
|
|
30
|
+
Dynamic: requires-dist
|
|
31
|
+
Dynamic: summary
|
|
24
32
|
|
|
25
33
|
===================
|
|
26
34
|
littlefs for Python
|
|
@@ -3725,13 +3725,8 @@ static lfs_soff_t lfs_file_seek_(lfs_t *lfs, lfs_file_t *file,
|
|
|
3725
3725
|
|
|
3726
3726
|
// if we're only reading and our new offset is still in the file's cache
|
|
3727
3727
|
// we can avoid flushing and needing to reread the data
|
|
3728
|
-
if (
|
|
3729
|
-
|
|
3730
|
-
!(file->flags & LFS_F_WRITING)
|
|
3731
|
-
#else
|
|
3732
|
-
true
|
|
3733
|
-
#endif
|
|
3734
|
-
) {
|
|
3728
|
+
if ((file->flags & LFS_F_READING)
|
|
3729
|
+
&& file->off != lfs->cfg->block_size) {
|
|
3735
3730
|
int oindex = lfs_ctz_index(lfs, &(lfs_off_t){file->pos});
|
|
3736
3731
|
lfs_off_t noff = npos;
|
|
3737
3732
|
int nindex = lfs_ctz_index(lfs, &noff);
|
|
@@ -137,6 +137,130 @@ code = '''
|
|
|
137
137
|
lfs_unmount(&lfs) => 0;
|
|
138
138
|
'''
|
|
139
139
|
|
|
140
|
+
# boundary seek and reads
|
|
141
|
+
[cases.test_seek_boundary_read]
|
|
142
|
+
defines.COUNT = 132
|
|
143
|
+
code = '''
|
|
144
|
+
lfs_t lfs;
|
|
145
|
+
lfs_format(&lfs, cfg) => 0;
|
|
146
|
+
lfs_mount(&lfs, cfg) => 0;
|
|
147
|
+
lfs_file_t file;
|
|
148
|
+
lfs_file_open(&lfs, &file, "kitty",
|
|
149
|
+
LFS_O_WRONLY | LFS_O_CREAT | LFS_O_APPEND) => 0;
|
|
150
|
+
size_t size = strlen("kittycatcat");
|
|
151
|
+
uint8_t buffer[1024];
|
|
152
|
+
memcpy(buffer, "kittycatcat", size);
|
|
153
|
+
for (int j = 0; j < COUNT; j++) {
|
|
154
|
+
lfs_file_write(&lfs, &file, buffer, size);
|
|
155
|
+
}
|
|
156
|
+
lfs_file_close(&lfs, &file) => 0;
|
|
157
|
+
lfs_unmount(&lfs) => 0;
|
|
158
|
+
|
|
159
|
+
lfs_mount(&lfs, cfg) => 0;
|
|
160
|
+
lfs_file_open(&lfs, &file, "kitty", LFS_O_RDONLY) => 0;
|
|
161
|
+
|
|
162
|
+
size = strlen("kittycatcat");
|
|
163
|
+
const lfs_soff_t offsets[] = {
|
|
164
|
+
512,
|
|
165
|
+
1024-4,
|
|
166
|
+
512+1,
|
|
167
|
+
1024-4+1,
|
|
168
|
+
512-1,
|
|
169
|
+
1024-4-1,
|
|
170
|
+
|
|
171
|
+
512-strlen("kittycatcat"),
|
|
172
|
+
1024-4-strlen("kittycatcat"),
|
|
173
|
+
512-strlen("kittycatcat")+1,
|
|
174
|
+
1024-4-strlen("kittycatcat")+1,
|
|
175
|
+
512-strlen("kittycatcat")-1,
|
|
176
|
+
1024-4-strlen("kittycatcat")-1,
|
|
177
|
+
|
|
178
|
+
strlen("kittycatcat")*(COUNT-2)-1,
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
for (unsigned i = 0; i < sizeof(offsets) / sizeof(offsets[0]); i++) {
|
|
182
|
+
lfs_soff_t off = offsets[i];
|
|
183
|
+
// read @ offset
|
|
184
|
+
lfs_file_seek(&lfs, &file, off, LFS_SEEK_SET) => off;
|
|
185
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
186
|
+
memcmp(buffer,
|
|
187
|
+
&"kittycatcatkittycatcat"[off % strlen("kittycatcat")],
|
|
188
|
+
size) => 0;
|
|
189
|
+
// read after
|
|
190
|
+
lfs_file_seek(&lfs, &file, off+strlen("kittycatcat")+1, LFS_SEEK_SET)
|
|
191
|
+
=> off+strlen("kittycatcat")+1;
|
|
192
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
193
|
+
memcmp(buffer,
|
|
194
|
+
&"kittycatcatkittycatcat"[(off+1) % strlen("kittycatcat")],
|
|
195
|
+
size) => 0;
|
|
196
|
+
// read before
|
|
197
|
+
lfs_file_seek(&lfs, &file, off-strlen("kittycatcat")-1, LFS_SEEK_SET)
|
|
198
|
+
=> off-strlen("kittycatcat")-1;
|
|
199
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
200
|
+
memcmp(buffer,
|
|
201
|
+
&"kittycatcatkittycatcat"[(off-1) % strlen("kittycatcat")],
|
|
202
|
+
size) => 0;
|
|
203
|
+
|
|
204
|
+
// read @ 0
|
|
205
|
+
lfs_file_seek(&lfs, &file, 0, LFS_SEEK_SET) => 0;
|
|
206
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
207
|
+
memcmp(buffer, "kittycatcat", size) => 0;
|
|
208
|
+
|
|
209
|
+
// read @ offset
|
|
210
|
+
lfs_file_seek(&lfs, &file, off, LFS_SEEK_SET) => off;
|
|
211
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
212
|
+
memcmp(buffer,
|
|
213
|
+
&"kittycatcatkittycatcat"[off % strlen("kittycatcat")],
|
|
214
|
+
size) => 0;
|
|
215
|
+
// read after
|
|
216
|
+
lfs_file_seek(&lfs, &file, off+strlen("kittycatcat")+1, LFS_SEEK_SET)
|
|
217
|
+
=> off+strlen("kittycatcat")+1;
|
|
218
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
219
|
+
memcmp(buffer,
|
|
220
|
+
&"kittycatcatkittycatcat"[(off+1) % strlen("kittycatcat")],
|
|
221
|
+
size) => 0;
|
|
222
|
+
// read before
|
|
223
|
+
lfs_file_seek(&lfs, &file, off-strlen("kittycatcat")-1, LFS_SEEK_SET)
|
|
224
|
+
=> off-strlen("kittycatcat")-1;
|
|
225
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
226
|
+
memcmp(buffer,
|
|
227
|
+
&"kittycatcatkittycatcat"[(off-1) % strlen("kittycatcat")],
|
|
228
|
+
size) => 0;
|
|
229
|
+
|
|
230
|
+
// sync
|
|
231
|
+
lfs_file_sync(&lfs, &file) => 0;
|
|
232
|
+
|
|
233
|
+
// read @ 0
|
|
234
|
+
lfs_file_seek(&lfs, &file, 0, LFS_SEEK_SET) => 0;
|
|
235
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
236
|
+
memcmp(buffer, "kittycatcat", size) => 0;
|
|
237
|
+
|
|
238
|
+
// read @ offset
|
|
239
|
+
lfs_file_seek(&lfs, &file, off, LFS_SEEK_SET) => off;
|
|
240
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
241
|
+
memcmp(buffer,
|
|
242
|
+
&"kittycatcatkittycatcat"[off % strlen("kittycatcat")],
|
|
243
|
+
size) => 0;
|
|
244
|
+
// read after
|
|
245
|
+
lfs_file_seek(&lfs, &file, off+strlen("kittycatcat")+1, LFS_SEEK_SET)
|
|
246
|
+
=> off+strlen("kittycatcat")+1;
|
|
247
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
248
|
+
memcmp(buffer,
|
|
249
|
+
&"kittycatcatkittycatcat"[(off+1) % strlen("kittycatcat")],
|
|
250
|
+
size) => 0;
|
|
251
|
+
// read before
|
|
252
|
+
lfs_file_seek(&lfs, &file, off-strlen("kittycatcat")-1, LFS_SEEK_SET)
|
|
253
|
+
=> off-strlen("kittycatcat")-1;
|
|
254
|
+
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
255
|
+
memcmp(buffer,
|
|
256
|
+
&"kittycatcatkittycatcat"[(off-1) % strlen("kittycatcat")],
|
|
257
|
+
size) => 0;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
lfs_file_close(&lfs, &file) => 0;
|
|
261
|
+
lfs_unmount(&lfs) => 0;
|
|
262
|
+
'''
|
|
263
|
+
|
|
140
264
|
# boundary seek and writes
|
|
141
265
|
[cases.test_seek_boundary_write]
|
|
142
266
|
defines.COUNT = 132
|
|
@@ -160,31 +284,54 @@ code = '''
|
|
|
160
284
|
lfs_file_open(&lfs, &file, "kitty", LFS_O_RDWR) => 0;
|
|
161
285
|
|
|
162
286
|
size = strlen("hedgehoghog");
|
|
163
|
-
const lfs_soff_t offsets[] = {
|
|
287
|
+
const lfs_soff_t offsets[] = {
|
|
288
|
+
512,
|
|
289
|
+
1024-4,
|
|
290
|
+
512+1,
|
|
291
|
+
1024-4+1,
|
|
292
|
+
512-1,
|
|
293
|
+
1024-4-1,
|
|
294
|
+
|
|
295
|
+
512-strlen("kittycatcat"),
|
|
296
|
+
1024-4-strlen("kittycatcat"),
|
|
297
|
+
512-strlen("kittycatcat")+1,
|
|
298
|
+
1024-4-strlen("kittycatcat")+1,
|
|
299
|
+
512-strlen("kittycatcat")-1,
|
|
300
|
+
1024-4-strlen("kittycatcat")-1,
|
|
301
|
+
|
|
302
|
+
strlen("kittycatcat")*(COUNT-2)-1,
|
|
303
|
+
};
|
|
164
304
|
|
|
165
305
|
for (unsigned i = 0; i < sizeof(offsets) / sizeof(offsets[0]); i++) {
|
|
166
306
|
lfs_soff_t off = offsets[i];
|
|
307
|
+
// write @ offset
|
|
167
308
|
memcpy(buffer, "hedgehoghog", size);
|
|
168
309
|
lfs_file_seek(&lfs, &file, off, LFS_SEEK_SET) => off;
|
|
169
310
|
lfs_file_write(&lfs, &file, buffer, size) => size;
|
|
311
|
+
|
|
312
|
+
// read @ offset
|
|
170
313
|
lfs_file_seek(&lfs, &file, off, LFS_SEEK_SET) => off;
|
|
171
314
|
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
172
315
|
memcmp(buffer, "hedgehoghog", size) => 0;
|
|
173
316
|
|
|
317
|
+
// read @ 0
|
|
174
318
|
lfs_file_seek(&lfs, &file, 0, LFS_SEEK_SET) => 0;
|
|
175
319
|
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
176
320
|
memcmp(buffer, "kittycatcat", size) => 0;
|
|
177
321
|
|
|
322
|
+
// read @ offset
|
|
178
323
|
lfs_file_seek(&lfs, &file, off, LFS_SEEK_SET) => off;
|
|
179
324
|
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
180
325
|
memcmp(buffer, "hedgehoghog", size) => 0;
|
|
181
326
|
|
|
182
327
|
lfs_file_sync(&lfs, &file) => 0;
|
|
183
328
|
|
|
329
|
+
// read @ 0
|
|
184
330
|
lfs_file_seek(&lfs, &file, 0, LFS_SEEK_SET) => 0;
|
|
185
331
|
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
186
332
|
memcmp(buffer, "kittycatcat", size) => 0;
|
|
187
333
|
|
|
334
|
+
// read @ offset
|
|
188
335
|
lfs_file_seek(&lfs, &file, off, LFS_SEEK_SET) => off;
|
|
189
336
|
lfs_file_read(&lfs, &file, buffer, size) => size;
|
|
190
337
|
memcmp(buffer, "hedgehoghog", size) => 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: littlefs-python
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.1
|
|
4
4
|
Summary: A python wrapper for littlefs
|
|
5
5
|
Home-page: https://github.com/jrast/littlefs-python
|
|
6
6
|
Author: Jürg Rast
|
|
@@ -21,6 +21,14 @@ Classifier: Topic :: System :: Filesystems
|
|
|
21
21
|
Description-Content-Type: text/x-rst
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Requires-Dist: importlib-metadata>=4.4; python_version < "3.10"
|
|
24
|
+
Dynamic: author
|
|
25
|
+
Dynamic: author-email
|
|
26
|
+
Dynamic: classifier
|
|
27
|
+
Dynamic: description
|
|
28
|
+
Dynamic: description-content-type
|
|
29
|
+
Dynamic: home-page
|
|
30
|
+
Dynamic: requires-dist
|
|
31
|
+
Dynamic: summary
|
|
24
32
|
|
|
25
33
|
===================
|
|
26
34
|
littlefs for Python
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{littlefs_python-0.13.0 → littlefs_python-0.13.1}/littlefs/.github/workflows/post-release.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs_python.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{littlefs_python-0.13.0 → littlefs_python-0.13.1}/src/littlefs_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|