Skip to content

fix: name the storage delete hooks as the core declares them - #202

Open
benjaminbruun wants to merge 1 commit into
masterfrom
fix/storage-delete-hooks
Open

benjaminbruun wants to merge 1 commit into
masterfrom
fix/storage-delete-hooks

Conversation

@benjaminbruun

Copy link
Copy Markdown
Member

The port defined its delete and create-dir hooks as ss_remove/ss_rmdir/ss_mkdir, names nothing calls, so the core's weak ss_delete_file/ss_delete_dir/ss_create_dir stayed undefined; on the nRF91 the linker turns those calls into nop.w and DELETE FILE answered 9000 having deleted nothing (on native_sim it is a NULL call). This renames the three functions to the declared names, no logic change, and adds two tests/fs cases covering delete of a middle and of a buffered last entry, the not-found path, flush-after-delete and remount. No exposure with the shipped template: its EF.ARR grants no DELETE FILE access, so the command is refused with 6982 before storage is reached. The test bodies are black-box and also pass on #197's swap-with-last rewrite; removing either its slot re-point or its hole-closing copy makes them fail (checked: 13/14 in both cases, only the new test fails). Footprint: rename only; nrf9151dk/ns app image 150,124 B flash / 74,040 B RAM, the delta versus master is the three restored branch instructions.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Firmware footprint delta — nrf9151dk/nrf9151/ns

softsim_external_profile app image, from the ELF program headers (flash = load image incl. initialized data, RAM = static SRAM use incl. .bss/noinit):

Memory base PR Δ
Flash 146.1 KiB 146.2 KiB +96 B
RAM 72.3 KiB 72.3 KiB +0 B
Section size changes (from the section headers)
     +54 B  .strtab              (65698 -> 65752)
    +144 B  .symtab              (82080 -> 82224)
     +88 B  text                 (111776 -> 111864)
Top symbol changes (10 largest, from the symbol tables)
     +72 B  ss_delete_file
      +8 B  nvs_delete
      +4 B  ss_delete_dir
      +4 B  ss_create_dir

Soft report — informational only. Base 418e66207ab626f4a312fdcf6d5656eb97d5c712 vs PR head.

@benjaminbruun
benjaminbruun marked this pull request as ready for review September 2, 2026 07:00
ss_remove/ss_rmdir/ss_mkdir were never called: the weak ss_delete_file/
ss_delete_dir/ss_create_dir they stood in for stayed undefined, so DELETE
FILE reported success and deleted nothing.

Signed-off-by: Benjamin Bruun <bb@onomondo.com>
@benjaminbruun
benjaminbruun requested a review from a team as a code owner September 2, 2026 07:00
@benjaminbruun
benjaminbruun force-pushed the fix/storage-delete-hooks branch from e55c9ea to d1cfb8d Compare September 2, 2026 07:00
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