Skip to content

test(timer): implement integration test for agnocast::Node timer#1104

Draft
Koichi98 wants to merge 24 commits intomainfrom
test/timer
Draft

test(timer): implement integration test for agnocast::Node timer#1104
Koichi98 wants to merge 24 commits intomainfrom
test/timer

Conversation

@Koichi98
Copy link
Copy Markdown
Collaborator

@Koichi98 Koichi98 commented Feb 25, 2026

Description

  1. CreateTimer_WallClock_CallbackFires
    Verifies that a timer using wall clock (system time) fires its callback correctly via timerfd.
  2. CreateTimer_SimTimeActivation_CallbackFires
    Verifies that after enabling ROS time override, the timer switches from timerfd to clock_eventfd and the callback fires correctly on forward time jumps.
  3. CreateTimer_SimTime_BackwardJump
    Verifies that on a backward time jump, next_call_time is correctly reset to now + period, and the timer fires after advancing past the new next_call_time.
  4. CreateTimer_MultipleTimers_AllFire
    Verifies that multiple timers with different periods (50ms, 100ms, 150ms) fire independently in wall clock mode using timerfd.
  5. CreateTimer_MultipleTimers_SimTime_AllFire
    Verifies that multiple timers with different periods (100ms, 200ms, 300ms) fire correctly in simulation time mode via clock_eventfd, with each timer firing at the expected time based on forward jumps.
  6. CreateTimer_RosTimeAlreadyActive
    Verifies that when a timer is created after ROS time is already active, it uses clock_eventfd (not timerfd) and fires correctly.
  7. CreateTimer_ZeroPeriod_AlwaysReady
    Verifies that a timer with zero period fires rapidly and continuously (always ready).
  8. CreateTimer_LargeForwardJump_SingleCallback
    Verifies that a large forward time jump (spanning multiple periods) triggers only 1-2 callbacks, not one per missed period.

Related links

#990

How was this PR tested?

  • Autoware (required)
  • bash scripts/test/e2e_test_1to1 (required)
  • bash scripts/test/e2e_test_2to2 (required)
  • kunit tests (required when modifying the kernel module)
  • sample application

Notes for reviewers

Version Update Label (Required)

Please add exactly one of the following labels to this PR:

  • need-major-update: User API breaking changes
  • need-minor-update: Internal API breaking changes (heaphook/kmod/agnocastlib compatibility)
  • need-patch-update: Bug fixes and other changes

Important notes:

  • If you need need-major-update or need-minor-update, please include this in the PR title as well.
    • Example: fix(foo)[needs major version update]: bar or feat(baz)[needs minor version update]: qux
  • After receiving approval from reviewers, add the run-build-test label. The PR can only be merged after the build tests pass.

See CONTRIBUTING.md for detailed versioning rules.

Koichi98 and others added 11 commits February 23, 2026 01:58
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Koichi98 and others added 13 commits February 25, 2026 15:39
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
…d after spin() (#1095)

* feat: support lazy callback group

Signed-off-by: atsushi421 <atsushi.yano.2@tier4.jp>

* fix(agnocast_component_container_cie): address review comments

- Iterate over node_wrappers_ instead of node_id_to_executor_wrappers_
  in check_for_new_callback_groups() to detect late-created callback
  groups even for nodes that had no initial executor entries.
- Make monitor polling interval configurable via monitor_polling_interval_ms
  ROS parameter (default: 100ms).
- Fix DEFALUT_GET_NEXT typo to DEFAULT_GET_NEXT in non-deprecated container.

Signed-off-by: atsushi421 <atsushi.yano.2@tier4.jp>

* fix: clang-tidy

---------

Signed-off-by: atsushi421 <atsushi.yano.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
* fix ioctl functions name

Signed-off-by: Koichi <koichi.imai.2@tier4.jp>

* clang-format

Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>

---------

Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
* put test_rmmod_refcount in test dir

Signed-off-by: Koichi <koichi.imai.2@tier4.jp>

* fix

Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>

---------

Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
@Koichi98 Koichi98 added the need-patch-update Bug fixes and other changes - requires PATCH version update label Feb 25, 2026
Base automatically changed from feat/create_timer to main February 26, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need-patch-update Bug fixes and other changes - requires PATCH version update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants