Skip to content

Conversation

@amgross
Copy link
Contributor

@amgross amgross commented Jan 14, 2026

Bug in REPL

Found bug in repl, that it sends block_count to littlefs based on the file size, but in compacted image the file sze is not really the correct size hence getting error from littlefs.
This is in different than list and extract commands which not sending block_count, and when littlefs getting 0 it ignores it.

(Try run the test file I added with current master and see the failure)

Solution

Make behavior of list+extract+repl same by using same function

great side effects

having code not duplicated is less error prone...
Now also repl getting LittleFS Configuration: which was missing
Have print that tell the Image Size: size and the Input Image Size (compacted):
Have new test that catching this issue (according beyonce rule)
Now that all creation of littlefs pass through _fs_from_args it will be easier for me to implement #150

Left issue

Now REPL succeed to mount and work with compacted image, but when changing the image (with put command for example) it works but the image is being partially compacted (depends on where littlefs decide to put the data). Need design decision here what is expected behaviour, anyway I think it is different task and this one should be merged as is.

2. Add test for creating a compacted image and opening it in REPL
3. Aggragate duplicate code to functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant