Skip to content

test(coverage): expand MM, VFS, Socket, and Loader branch coverage (#261) - #271

Merged
marcobuschini merged 1 commit into
257-issue-increase-host-unit-test-line-and-branch-coverage-toward-100from
261-subissue-4-increase-branch-coverage-across-mm-vfs-socket-and-loader-modules
Dec 4, 2026
Merged

marcobuschini merged 1 commit into
257-issue-increase-host-unit-test-line-and-branch-coverage-toward-100from
261-subissue-4-increase-branch-coverage-across-mm-vfs-socket-and-loader-modules

Conversation

@marcobuschini

@marcobuschini marcobuschini commented Dec 4, 2026 •

Copy link
Copy Markdown
Member
  • Expand tests/host/socket_syscall_test.cpp for accept/accept4, getsockname/ getpeername, sockopt, shutdown, DGRAM addressing, and multi-iovec sendmsg/recvmsg
  • Expand tests/host/vma_test.cpp for sys_brk, sys_mmap, sys_munmap, sys_mprotect error/boundary paths, and AddressSpace::clone() with MAP_SHARED
  • Expand tests/host/elf_interp_test.cpp for load_elf() error/OOM/PT_PHDR paths and non-PIE load_elf_interpreter()
  • Expand tests/host/ext2_test.cpp for mount errors, O_EXCL/O_TRUNC/O_APPEND, vfs_lseek, cross-directory vfs_rename, vfs_readdir, and VFS error codes

Verification & Quality Gates

  • make all builds cleanly under aarch64-linux-gnu-g++ (-std=c++20 -Werror)
  • make quality passes format-check, lint-report (clang-tidy), and test-host
  • make test-host passes Snitch unit tests under ASan/UBSan with zero PFA/heap leaks
  • Verified in QEMU (make run) where applicable

Checklist

  • PR title and commits follow Conventional Commits / Commitizen specification
  • Changes adhere to freestanding C++20 rules (no exceptions, RTTI, or banned headers)
  • Changes stay strictly within the scope of the linked issue/sub-issue

)

- Expand `tests/host/socket_syscall_test.cpp` for accept/accept4, getsockname/
  getpeername, sockopt, shutdown, DGRAM addressing, and multi-iovec sendmsg/recvmsg
- Expand `tests/host/vma_test.cpp` for `sys_brk`, `sys_mmap`, `sys_munmap`,
  `sys_mprotect` error/boundary paths, and `AddressSpace::clone()` with `MAP_SHARED`
- Expand `tests/host/elf_interp_test.cpp` for `load_elf()` error/OOM/`PT_PHDR`
  paths and non-PIE `load_elf_interpreter()`
- Expand `tests/host/ext2_test.cpp` for mount errors, `O_EXCL`/`O_TRUNC`/`O_APPEND`,
  `vfs_lseek`, cross-directory `vfs_rename`, `vfs_readdir`, and VFS error codes
@marcobuschini
marcobuschini merged commit 437310f into 257-issue-increase-host-unit-test-line-and-branch-coverage-toward-100 Dec 4, 2026
5 checks passed
@marcobuschini
marcobuschini deleted the 261-subissue-4-increase-branch-coverage-across-mm-vfs-socket-and-loader-modules branch December 4, 2026 11:31
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