littlefs-python 0.13.2__tar.gz → 0.13.3__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.2 → littlefs_python-0.13.3}/.github/workflows/deploy.yml +2 -2
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/PKG-INFO +3 -2
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/.github/workflows/test.yml +23 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/README.md +41 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/bd/lfs_filebd.c +1 -1
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/lfs.c +10 -12
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/prettyasserts.py +3 -3
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/test.py +19 -19
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_dirs.toml +76 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs_python.egg-info/PKG-INFO +3 -2
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/.gitattributes +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/.github/dependabot.yml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/.github/workflows/run-tests.yml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/.gitignore +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/.gitmodules +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/.pre-commit-config.yaml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/.readthedocs.yml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/LICENSE +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/MANIFEST.in +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/README.rst +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/ci/build-wheels.sh +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/ci/download_release_files.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/docs/Makefile +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/docs/api/index.rst +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/docs/cli.rst +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/docs/conf.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/docs/doc8.ini +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/docs/examples/index.rst +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/docs/index.rst +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/docs/make.bat +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/docs/requirements.txt +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/docs/usage.rst +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/examples/mkfsimg.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/examples/walk.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/.git +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/.gitattributes +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/.github/workflows/post-release.yml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/.github/workflows/release.yml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/.github/workflows/status.yml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/.gitignore +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/DESIGN.md +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/LICENSE.md +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/Makefile +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/SPEC.md +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/bd/lfs_emubd.c +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/bd/lfs_emubd.h +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/bd/lfs_filebd.h +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/bd/lfs_rambd.c +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/bd/lfs_rambd.h +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/benches/bench_dir.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/benches/bench_file.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/benches/bench_superblock.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/lfs.h +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/lfs_util.c +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/lfs_util.h +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/runners/bench_runner.c +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/runners/bench_runner.h +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/runners/test_runner.c +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/runners/test_runner.h +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/bench.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/changeprefix.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/code.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/cov.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/data.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/perf.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/perfbd.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/plot.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/plotmpl.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/readblock.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/readmdir.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/readtree.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/stack.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/structs.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/summary.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/tailpipe.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/teepipe.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/tracebd.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/scripts/watch.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_alloc.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_attrs.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_badblocks.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_bd.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_compat.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_entries.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_evil.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_exhaustion.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_files.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_interspersed.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_move.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_orphans.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_paths.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_powerloss.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_relocations.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_seek.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_superblocks.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/littlefs/tests/test_truncate.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/mypy.ini +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/pyproject.toml +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/requirements.txt +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/setup.cfg +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/setup.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs/__init__.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs/__main__.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs/context.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs/errors.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs/lfs.c +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs/lfs.pxd +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs/lfs.pyi +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs/lfs.pyx +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs/py.typed +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs_python.egg-info/SOURCES.txt +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs_python.egg-info/dependency_links.txt +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs_python.egg-info/entry_points.txt +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs_python.egg-info/not-zip-safe +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs_python.egg-info/requires.txt +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs_python.egg-info/top_level.txt +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/lfs/conftest.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/lfs/test_dir_functions.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/lfs/test_file_functions.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/lfs/test_fs_functions.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/test_attr.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/test_block_count.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/test_directories.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/test_files.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/test_grow.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/test_multiversion.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/test_name_max.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/test_remove_rename.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/test_version.py +0 -0
- {littlefs_python-0.13.2 → littlefs_python-0.13.3}/test/test_walk.py +0 -0
|
@@ -27,7 +27,7 @@ jobs:
|
|
|
27
27
|
platforms: all
|
|
28
28
|
|
|
29
29
|
- name: Build wheels
|
|
30
|
-
uses: pypa/cibuildwheel@v2.
|
|
30
|
+
uses: pypa/cibuildwheel@v2.23.1
|
|
31
31
|
|
|
32
32
|
- uses: actions/upload-artifact@v4
|
|
33
33
|
with:
|
|
@@ -48,7 +48,7 @@ jobs:
|
|
|
48
48
|
submodules: "recursive"
|
|
49
49
|
|
|
50
50
|
- name: Build wheels
|
|
51
|
-
uses: pypa/cibuildwheel@v2.
|
|
51
|
+
uses: pypa/cibuildwheel@v2.23.1
|
|
52
52
|
env:
|
|
53
53
|
CIBW_BUILD: ${{ matrix.cibw_build }}
|
|
54
54
|
CIBW_SKIP: "cp36-* pp*"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: littlefs-python
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.3
|
|
4
4
|
Summary: A python wrapper for littlefs
|
|
5
5
|
Home-page: https://github.com/jrast/littlefs-python
|
|
6
6
|
Author: Jürg Rast
|
|
@@ -27,6 +27,7 @@ Dynamic: classifier
|
|
|
27
27
|
Dynamic: description
|
|
28
28
|
Dynamic: description-content-type
|
|
29
29
|
Dynamic: home-page
|
|
30
|
+
Dynamic: license-file
|
|
30
31
|
Dynamic: requires-dist
|
|
31
32
|
Dynamic: summary
|
|
32
33
|
|
|
@@ -374,6 +374,29 @@ jobs:
|
|
|
374
374
|
run: |
|
|
375
375
|
CFLAGS="$CFLAGS -DLFS_NO_INTRINSICS" make test
|
|
376
376
|
|
|
377
|
+
# run with all trace options enabled to at least make sure these
|
|
378
|
+
# all compile
|
|
379
|
+
test-yes-trace:
|
|
380
|
+
runs-on: ubuntu-latest
|
|
381
|
+
steps:
|
|
382
|
+
- uses: actions/checkout@v4
|
|
383
|
+
- name: install
|
|
384
|
+
run: |
|
|
385
|
+
# need a few things
|
|
386
|
+
sudo apt-get update -qq
|
|
387
|
+
sudo apt-get install -qq gcc python3 python3-pip
|
|
388
|
+
pip3 install toml
|
|
389
|
+
gcc --version
|
|
390
|
+
python3 --version
|
|
391
|
+
- name: test-yes-trace
|
|
392
|
+
run: |
|
|
393
|
+
CFLAGS="$CFLAGS \
|
|
394
|
+
-DLFS_YES_TRACE \
|
|
395
|
+
-DLFS_RAMBD_YES_TRACE \
|
|
396
|
+
-DLFS_FILEBD_YES_TRACE \
|
|
397
|
+
-DLFS_RAMBD_YES_TRACE" \
|
|
398
|
+
make test
|
|
399
|
+
|
|
377
400
|
# run LFS_MULTIVERSION tests
|
|
378
401
|
test-multiversion:
|
|
379
402
|
runs-on: ubuntu-latest
|
|
@@ -199,6 +199,47 @@ The tests assume a Linux environment and can be started with make:
|
|
|
199
199
|
make test
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
+
Tests are implemented in C in the .toml files found in the `tests` directory.
|
|
203
|
+
When developing a feature or fixing a bug, it is frequently useful to run a
|
|
204
|
+
single test case or suite of tests:
|
|
205
|
+
|
|
206
|
+
``` bash
|
|
207
|
+
./scripts/test.py -l runners/test_runner # list available test suites
|
|
208
|
+
./scripts/test.py -L runners/test_runner test_dirs # list available test cases
|
|
209
|
+
./scripts/test.py runners/test_runner test_dirs # run a specific test suite
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
If an assert fails in a test, test.py will try to print information about the
|
|
213
|
+
failure:
|
|
214
|
+
|
|
215
|
+
``` bash
|
|
216
|
+
tests/test_dirs.toml:1:failure: test_dirs_root:1g12gg2 (PROG_SIZE=16, ERASE_SIZE=512) failed
|
|
217
|
+
tests/test_dirs.toml:5:assert: assert failed with 0, expected eq 42
|
|
218
|
+
lfs_mount(&lfs, cfg) => 42;
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
This includes the test id, which can be passed to test.py to run only that
|
|
222
|
+
specific test permutation:
|
|
223
|
+
|
|
224
|
+
``` bash
|
|
225
|
+
./scripts/test.py runners/test_runner test_dirs_root:1g12gg2 # run a specific test permutation
|
|
226
|
+
./scripts/test.py runners/test_runner test_dirs_root:1g12gg2 --gdb # drop into gdb on failure
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Some other flags that may be useful:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
./scripts/test.py runners/test_runner -b -j # run tests in parallel
|
|
233
|
+
./scripts/test.py runners/test_runner -v -O- # redirect stdout to stdout
|
|
234
|
+
./scripts/test.py runners/test_runner -ddisk # capture resulting disk image
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
See `-h/--help` for a full list of available flags:
|
|
238
|
+
|
|
239
|
+
``` bash
|
|
240
|
+
./scripts/test.py --help
|
|
241
|
+
```
|
|
242
|
+
|
|
202
243
|
## License
|
|
203
244
|
|
|
204
245
|
The littlefs is provided under the [BSD-3-Clause] license. See
|
|
@@ -133,7 +133,7 @@ int lfs_filebd_prog(const struct lfs_config *cfg, lfs_block_t block,
|
|
|
133
133
|
|
|
134
134
|
int lfs_filebd_erase(const struct lfs_config *cfg, lfs_block_t block) {
|
|
135
135
|
LFS_FILEBD_TRACE("lfs_filebd_erase(%p, 0x%"PRIx32" (%"PRIu32"))",
|
|
136
|
-
(void*)cfg, block, ((
|
|
136
|
+
(void*)cfg, block, ((lfs_filebd_t*)cfg->context)->cfg->erase_size);
|
|
137
137
|
lfs_filebd_t *bd = cfg->context;
|
|
138
138
|
|
|
139
139
|
// check if erase is valid
|
|
@@ -404,18 +404,15 @@ struct lfs_diskoff {
|
|
|
404
404
|
|
|
405
405
|
// operations on global state
|
|
406
406
|
static inline void lfs_gstate_xor(lfs_gstate_t *a, const lfs_gstate_t *b) {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
407
|
+
a->tag ^= b->tag;
|
|
408
|
+
a->pair[0] ^= b->pair[0];
|
|
409
|
+
a->pair[1] ^= b->pair[1];
|
|
410
410
|
}
|
|
411
411
|
|
|
412
412
|
static inline bool lfs_gstate_iszero(const lfs_gstate_t *a) {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
return true;
|
|
413
|
+
return a->tag == 0
|
|
414
|
+
&& a->pair[0] == 0
|
|
415
|
+
&& a->pair[1] == 0;
|
|
419
416
|
}
|
|
420
417
|
|
|
421
418
|
#ifndef LFS_READONLY
|
|
@@ -2369,7 +2366,8 @@ fixmlist:;
|
|
|
2369
2366
|
if (d->m.pair != pair) {
|
|
2370
2367
|
for (int i = 0; i < attrcount; i++) {
|
|
2371
2368
|
if (lfs_tag_type3(attrs[i].tag) == LFS_TYPE_DELETE &&
|
|
2372
|
-
d->id == lfs_tag_id(attrs[i].tag)
|
|
2369
|
+
d->id == lfs_tag_id(attrs[i].tag) &&
|
|
2370
|
+
d->type != LFS_TYPE_DIR) {
|
|
2373
2371
|
d->m.pair[0] = LFS_BLOCK_NULL;
|
|
2374
2372
|
d->m.pair[1] = LFS_BLOCK_NULL;
|
|
2375
2373
|
} else if (lfs_tag_type3(attrs[i].tag) == LFS_TYPE_DELETE &&
|
|
@@ -2558,7 +2556,7 @@ static int lfs_dir_orphaningcommit(lfs_t *lfs, lfs_mdir_t *dir,
|
|
|
2558
2556
|
if (err != LFS_ERR_NOENT) {
|
|
2559
2557
|
if (lfs_gstate_hasorphans(&lfs->gstate)) {
|
|
2560
2558
|
// next step, clean up orphans
|
|
2561
|
-
err = lfs_fs_preporphans(lfs, -hasparent);
|
|
2559
|
+
err = lfs_fs_preporphans(lfs, -(int8_t)hasparent);
|
|
2562
2560
|
if (err) {
|
|
2563
2561
|
return err;
|
|
2564
2562
|
}
|
|
@@ -6288,7 +6286,7 @@ lfs_soff_t lfs_file_size(lfs_t *lfs, lfs_file_t *file) {
|
|
|
6288
6286
|
|
|
6289
6287
|
lfs_soff_t res = lfs_file_size_(lfs, file);
|
|
6290
6288
|
|
|
6291
|
-
LFS_TRACE("lfs_file_size -> %"
|
|
6289
|
+
LFS_TRACE("lfs_file_size -> %"PRIu32, res);
|
|
6292
6290
|
LFS_UNLOCK(lfs->cfg);
|
|
6293
6291
|
return res;
|
|
6294
6292
|
}
|
|
@@ -35,10 +35,10 @@ LEXEMES = {
|
|
|
35
35
|
'assert': ['assert'],
|
|
36
36
|
'arrow': ['=>'],
|
|
37
37
|
'string': [r'"(?:\\.|[^"])*"', r"'(?:\\.|[^'])\'"],
|
|
38
|
-
'paren': ['\(', '\)'],
|
|
38
|
+
'paren': [r'\(', r'\)'],
|
|
39
39
|
'cmp': CMP.keys(),
|
|
40
|
-
'logic': ['\&\&', '\|\|'],
|
|
41
|
-
'sep': [':', ';', '\{', '\}', ','],
|
|
40
|
+
'logic': [r'\&\&', r'\|\|'],
|
|
41
|
+
'sep': [':', ';', r'\{', r'\}', ','],
|
|
42
42
|
'op': ['->'], # specifically ops that conflict with cmp
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -102,9 +102,9 @@ class TestCase:
|
|
|
102
102
|
# the runner itself.
|
|
103
103
|
for v_ in csplit(v):
|
|
104
104
|
m = re.search(r'\brange\b\s*\('
|
|
105
|
-
'(?P<start>[^,\s]*)'
|
|
106
|
-
'\s*(?:,\s*(?P<stop>[^,\s]*)'
|
|
107
|
-
'\s*(?:,\s*(?P<step>[^,\s]*)\s*)?)?\)',
|
|
105
|
+
r'(?P<start>[^,\s]*)'
|
|
106
|
+
r'\s*(?:,\s*(?P<stop>[^,\s]*)'
|
|
107
|
+
r'\s*(?:,\s*(?P<step>[^,\s]*)\s*)?)?\)',
|
|
108
108
|
v_)
|
|
109
109
|
if m:
|
|
110
110
|
start = (int(m.group('start'), 0)
|
|
@@ -163,8 +163,8 @@ class TestSuite:
|
|
|
163
163
|
code_linenos = []
|
|
164
164
|
for i, line in enumerate(f):
|
|
165
165
|
match = re.match(
|
|
166
|
-
'(?P<case>\[\s*cases\s*\.\s*(?P<name>\w+)\s*\])'
|
|
167
|
-
'|' '(?P<code>code\s*=)',
|
|
166
|
+
r'(?P<case>\[\s*cases\s*\.\s*(?P<name>\w+)\s*\])'
|
|
167
|
+
r'|' r'(?P<code>code\s*=)',
|
|
168
168
|
line)
|
|
169
169
|
if match and match.group('case'):
|
|
170
170
|
case_linenos.append((i+1, match.group('name')))
|
|
@@ -602,9 +602,9 @@ def find_perms(runner_, ids=[], **args):
|
|
|
602
602
|
errors='replace',
|
|
603
603
|
close_fds=False)
|
|
604
604
|
pattern = re.compile(
|
|
605
|
-
'^(?P<case>[^\s]+)'
|
|
606
|
-
'\s+(?P<flags>[^\s]+)'
|
|
607
|
-
'\s+(?P<filtered>\d+)/(?P<perms>\d+)')
|
|
605
|
+
r'^(?P<case>[^\s]+)'
|
|
606
|
+
r'\s+(?P<flags>[^\s]+)'
|
|
607
|
+
r'\s+(?P<filtered>\d+)/(?P<perms>\d+)')
|
|
608
608
|
# skip the first line
|
|
609
609
|
for line in it.islice(proc.stdout, 1, None):
|
|
610
610
|
m = pattern.match(line)
|
|
@@ -632,8 +632,8 @@ def find_perms(runner_, ids=[], **args):
|
|
|
632
632
|
errors='replace',
|
|
633
633
|
close_fds=False)
|
|
634
634
|
pattern = re.compile(
|
|
635
|
-
'^(?P<case>[^\s]+)'
|
|
636
|
-
'\s+(?P<path>[^:]+):(?P<lineno>\d+)')
|
|
635
|
+
r'^(?P<case>[^\s]+)'
|
|
636
|
+
r'\s+(?P<path>[^:]+):(?P<lineno>\d+)')
|
|
637
637
|
# skip the first line
|
|
638
638
|
for line in it.islice(proc.stdout, 1, None):
|
|
639
639
|
m = pattern.match(line)
|
|
@@ -676,8 +676,8 @@ def find_path(runner_, id, **args):
|
|
|
676
676
|
errors='replace',
|
|
677
677
|
close_fds=False)
|
|
678
678
|
pattern = re.compile(
|
|
679
|
-
'^(?P<case>[^\s]+)'
|
|
680
|
-
'\s+(?P<path>[^:]+):(?P<lineno>\d+)')
|
|
679
|
+
r'^(?P<case>[^\s]+)'
|
|
680
|
+
r'\s+(?P<path>[^:]+):(?P<lineno>\d+)')
|
|
681
681
|
# skip the first line
|
|
682
682
|
for line in it.islice(proc.stdout, 1, None):
|
|
683
683
|
m = pattern.match(line)
|
|
@@ -706,7 +706,7 @@ def find_defines(runner_, id, **args):
|
|
|
706
706
|
errors='replace',
|
|
707
707
|
close_fds=False)
|
|
708
708
|
defines = co.OrderedDict()
|
|
709
|
-
pattern = re.compile('^(?P<define>\w+)=(?P<value>.+)')
|
|
709
|
+
pattern = re.compile(r'^(?P<define>\w+)=(?P<value>.+)')
|
|
710
710
|
for line in proc.stdout:
|
|
711
711
|
m = pattern.match(line)
|
|
712
712
|
if m:
|
|
@@ -781,12 +781,12 @@ def run_stage(name, runner_, ids, stdout_, trace_, output_, **args):
|
|
|
781
781
|
failures = []
|
|
782
782
|
killed = False
|
|
783
783
|
|
|
784
|
-
pattern = re.compile('^(?:'
|
|
785
|
-
'(?P<op>running|finished|skipped|powerloss) '
|
|
786
|
-
'(?P<id>(?P<case>[^:]+)[^\s]*)'
|
|
787
|
-
'|' '(?P<path>[^:]+):(?P<lineno>\d+):(?P<op_>assert):'
|
|
788
|
-
' *(?P<message>.*)'
|
|
789
|
-
')$')
|
|
784
|
+
pattern = re.compile(r'^(?:'
|
|
785
|
+
r'(?P<op>running|finished|skipped|powerloss) '
|
|
786
|
+
r'(?P<id>(?P<case>[^:]+)[^\s]*)'
|
|
787
|
+
r'|' r'(?P<path>[^:]+):(?P<lineno>\d+):(?P<op_>assert):'
|
|
788
|
+
r' *(?P<message>.*)'
|
|
789
|
+
r')$')
|
|
790
790
|
locals = th.local()
|
|
791
791
|
children = set()
|
|
792
792
|
|
|
@@ -725,6 +725,82 @@ code = '''
|
|
|
725
725
|
lfs_unmount(&lfs) => 0;
|
|
726
726
|
'''
|
|
727
727
|
|
|
728
|
+
[cases.test_dirs_remove_read]
|
|
729
|
+
defines.N = 10
|
|
730
|
+
if = 'N < BLOCK_COUNT/2'
|
|
731
|
+
code = '''
|
|
732
|
+
lfs_t lfs;
|
|
733
|
+
lfs_format(&lfs, cfg) => 0;
|
|
734
|
+
lfs_mount(&lfs, cfg) => 0;
|
|
735
|
+
lfs_mkdir(&lfs, "prickly-pear") => 0;
|
|
736
|
+
for (int i = 0; i < N; i++) {
|
|
737
|
+
char path[1024];
|
|
738
|
+
sprintf(path, "prickly-pear/cactus%03d", i);
|
|
739
|
+
lfs_mkdir(&lfs, path) => 0;
|
|
740
|
+
}
|
|
741
|
+
lfs_dir_t dir;
|
|
742
|
+
lfs_dir_open(&lfs, &dir, "prickly-pear") => 0;
|
|
743
|
+
struct lfs_info info;
|
|
744
|
+
lfs_dir_read(&lfs, &dir, &info) => 1;
|
|
745
|
+
assert(info.type == LFS_TYPE_DIR);
|
|
746
|
+
assert(strcmp(info.name, ".") == 0);
|
|
747
|
+
lfs_dir_read(&lfs, &dir, &info) => 1;
|
|
748
|
+
assert(info.type == LFS_TYPE_DIR);
|
|
749
|
+
assert(strcmp(info.name, "..") == 0);
|
|
750
|
+
for (int i = 0; i < N; i++) {
|
|
751
|
+
char path[1024];
|
|
752
|
+
sprintf(path, "cactus%03d", i);
|
|
753
|
+
lfs_dir_read(&lfs, &dir, &info) => 1;
|
|
754
|
+
assert(info.type == LFS_TYPE_DIR);
|
|
755
|
+
assert(strcmp(info.name, path) == 0);
|
|
756
|
+
}
|
|
757
|
+
lfs_dir_read(&lfs, &dir, &info) => 0;
|
|
758
|
+
lfs_dir_close(&lfs, &dir) => 0;
|
|
759
|
+
lfs_unmount(&lfs);
|
|
760
|
+
|
|
761
|
+
for (lfs_size_t k = 0; k < N; k++) {
|
|
762
|
+
for (lfs_size_t j = 0; j < N; j++) {
|
|
763
|
+
lfs_mount(&lfs, cfg) => 0;
|
|
764
|
+
lfs_dir_open(&lfs, &dir, "prickly-pear") => 0;
|
|
765
|
+
lfs_dir_read(&lfs, &dir, &info) => 1;
|
|
766
|
+
assert(info.type == LFS_TYPE_DIR);
|
|
767
|
+
assert(strcmp(info.name, ".") == 0);
|
|
768
|
+
lfs_dir_read(&lfs, &dir, &info) => 1;
|
|
769
|
+
assert(info.type == LFS_TYPE_DIR);
|
|
770
|
+
assert(strcmp(info.name, "..") == 0);
|
|
771
|
+
// iterate over dirs < j
|
|
772
|
+
for (unsigned i = 0; i < j; i++) {
|
|
773
|
+
char path[1024];
|
|
774
|
+
sprintf(path, "cactus%03d", i);
|
|
775
|
+
lfs_dir_read(&lfs, &dir, &info) => 1;
|
|
776
|
+
assert(info.type == LFS_TYPE_DIR);
|
|
777
|
+
assert(strcmp(info.name, path) == 0);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
// remove k while iterating
|
|
781
|
+
char path[1024];
|
|
782
|
+
sprintf(path, "prickly-pear/cactus%03d", k);
|
|
783
|
+
lfs_remove(&lfs, path) => 0;
|
|
784
|
+
|
|
785
|
+
// iterate over dirs >= j
|
|
786
|
+
for (unsigned i = j; i < ((k >= j) ? N-1 : N); i++) {
|
|
787
|
+
char path[1024];
|
|
788
|
+
sprintf(path, "cactus%03d", (k >= j && i >= k) ? i+1 : i);
|
|
789
|
+
lfs_dir_read(&lfs, &dir, &info) => 1;
|
|
790
|
+
assert(info.type == LFS_TYPE_DIR);
|
|
791
|
+
assert(strcmp(info.name, path) == 0);
|
|
792
|
+
}
|
|
793
|
+
lfs_dir_read(&lfs, &dir, &info) => 0;
|
|
794
|
+
lfs_dir_close(&lfs, &dir) => 0;
|
|
795
|
+
|
|
796
|
+
// recreate k
|
|
797
|
+
sprintf(path, "prickly-pear/cactus%03d", k);
|
|
798
|
+
lfs_mkdir(&lfs, path) => 0;
|
|
799
|
+
lfs_unmount(&lfs) => 0;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
'''
|
|
803
|
+
|
|
728
804
|
[cases.test_dirs_other_errors]
|
|
729
805
|
code = '''
|
|
730
806
|
lfs_t lfs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: littlefs-python
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.3
|
|
4
4
|
Summary: A python wrapper for littlefs
|
|
5
5
|
Home-page: https://github.com/jrast/littlefs-python
|
|
6
6
|
Author: Jürg Rast
|
|
@@ -27,6 +27,7 @@ Dynamic: classifier
|
|
|
27
27
|
Dynamic: description
|
|
28
28
|
Dynamic: description-content-type
|
|
29
29
|
Dynamic: home-page
|
|
30
|
+
Dynamic: license-file
|
|
30
31
|
Dynamic: requires-dist
|
|
31
32
|
Dynamic: summary
|
|
32
33
|
|
|
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.2 → littlefs_python-0.13.3}/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
|
{littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{littlefs_python-0.13.2 → littlefs_python-0.13.3}/src/littlefs_python.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{littlefs_python-0.13.2 → littlefs_python-0.13.3}/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
|