Skip to content

Process Launcher Unit Test - #680

Open
WilliamRoebuck wants to merge 12 commits into
eclipse-score:mainfrom
etas-contrib:feature/process_launcher_UT
Open

WilliamRoebuck wants to merge 12 commits into
eclipse-score:mainfrom
etas-contrib:feature/process_launcher_UT

Conversation

@WilliamRoebuck

Copy link
Copy Markdown
Contributor

98.5% line coverage for the file using syscall and osal mocks.

There are two remaining uncovered regions:

  • std::to_chars error handling
    • Defensive programming. With all current implementations, this cannot happen as there are 15 bytes of space in the buffer and the possible integer longest would be 9 long.
  • "Fork failed" case and log message
    • This is covered and the log can be observed, but the tooling seems not to recognise it

Some refactoring has been done to make the area more testable:

  • Semaphore init/deinit methods extracted to IpcCommsSync static methods
  • Added asserts instead of unreachable code
  • WaitForkRunning/ignoreRunning combined into one function

One small bug fixed:

  • A function that threw had been marked noexcept instead of noexcept(false)

@MaciejKaszynski MaciejKaszynski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's resolve the comments on the impl, then I'll look at the UT as it might change


// NOLINTBEGIN - clang-tidy does not like syscalls

class SyscallMock

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can all of this be put into mock_proc_launch_syscalls.hpp You have to scroll quite a bit to get to the actual test.

This branch is waiting to be deployed

1 waiting deployment
workflow-approval 8b0a24a2 Waiting Sep 23, 2026 by WilliamRoebuck via Build and test unit-tests-x86_64-qnx / approval #984
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants