test(os/time): add coverage for pid 0, TIMER_ABSTIME, and ovalue#113
Open
nhuvaoanh123 wants to merge 1 commit intoeclipse-score:mainfrom
Open
test(os/time): add coverage for pid 0, TIMER_ABSTIME, and ovalue#113nhuvaoanh123 wants to merge 1 commit intoeclipse-score:mainfrom
nhuvaoanh123 wants to merge 1 commit intoeclipse-score:mainfrom
Conversation
Three gaps identified in time_test.cpp: 1. ClockGetCpuClockIdWithCurrentProcess: Existing test uses pid 1 (init), which is semantically incorrect and may fail on privilege-restricted systems. POSIX specifies pid 0 means the calling process — more portable and spec-correct. 2. TimerSettimeWithAbsoluteTimeFlag: All existing timer_settime calls use flags=0 (relative). TIMER_ABSTIME is a distinct code path (absolute wall-clock timestamp interpretation) with no prior test coverage. 3. TimerSettimeOldValueReflectsPreviousArming: TimerSettimeSuccess passes an ovalue but never asserts its contents. This test re-arms a live timer and verifies ovalue correctly reports the remaining time of the previous arming (~10s). All tests annotated with SCR-46010294, ASIL B, Interface test. Signed-off-by: nhuvaoanh123 <webmaster@taktflow-systems.com>
09f7238 to
fc0f120
Compare
|
The created documentation from the pull request is available at: docu-html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three gaps identified in time_test.cpp:
ClockGetCpuClockIdWithCurrentProcess: Existing test uses pid 1 (init), which is semantically incorrect and may fail on privilege-restricted systems. POSIX specifies pid 0 means the calling process — more portable and spec-correct.
TimerSettimeWithAbsoluteTimeFlag: All existing timer_settime calls use flags=0 (relative). TIMER_ABSTIME is a distinct code path (absolute wall-clock timestamp interpretation) with no prior test coverage.
TimerSettimeOldValueReflectsPreviousArming: TimerSettimeSuccess passes an ovalue but never asserts its contents. This test re-arms a live timer and verifies ovalue correctly reports the remaining time of the previous arming (~10s).
All tests annotated with SCR-46010294, ASIL B, Interface test.
Note for future improvement:
Test 1: pid=0 is Linux-only — QNX CI may fail; assertion is too shallow
Test 2: 200ms absolute deadline is flaky under sanitizers; missing SIGEV_NONE could kill the test process
Test 3: The 8–10s range window is the most likely reviewer flag — asan/ubsan slowdown can blow this
All three: No negative/error path coverage (ASIL B typically requires this); RecordProperty may not be consumed by baselibs CI