Skip to content

Conversation

@ShoroukRamzy
Copy link

Hi @LittleHuba,

This PR resolves issue #87 and verifies that SkeletonEvent::Send correctly updates the timestamp in the shared memory control data.

Thanks!

@ShoroukRamzy ShoroukRamzy changed the title test lola add unit test for skeleton event timestamp Add unit test in skeleton_event.h for checking timestamp #87 Dec 18, 2025
@ShoroukRamzy
Copy link
Author

Hi @LittleHuba , @castler and @hoe-jo,

Could you please let me know your feedbacks and help me merge this PR if possible? I don't have sufficient permissions to merge.

Thanks!

@ShoroukRamzy ShoroukRamzy force-pushed the skeleton-event-ts-test branch from 3b60016 to 11eccb3 Compare December 24, 2025 12:57
Copy link
Contributor

@LittleHuba LittleHuba left a comment

Choose a reason for hiding this comment

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

Apologies for the delay, we had vacation over Christmas and New Year.
I left you some comments. In general the test is really good. I would only prefer if we can make it more resilient against unrelated changes.

As a bonus you could try to make more variables const.

ASSERT_TRUE(first_send_result.has_value());

// THEN its timestamp should be a valid, non-zero value
auto first_final_slot_status = EventSlotStatus(first_slot_indicator.GetSlotQM().load());
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
auto first_final_slot_status = EventSlotStatus(first_slot_indicator.GetSlotQM().load());
const EventSlotStatus first_final_slot_status{first_slot_indicator.GetSlotQM().load()};


// THEN its timestamp should be a valid, non-zero value
auto first_final_slot_status = EventSlotStatus(first_slot_indicator.GetSlotQM().load());
EXPECT_FALSE(first_final_slot_status.IsInWriting());
Copy link
Contributor

Choose a reason for hiding this comment

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

This assert is IMHO not relevant for this test. Better remove it to make this test less impacted by unrelated changes in the codebase.

Comment on lines +361 to +362
auto second_initial_status = EventSlotStatus(second_slot_indicator.GetSlotQM().load());
ASSERT_TRUE(second_initial_status.IsInWriting());
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
auto second_initial_status = EventSlotStatus(second_slot_indicator.GetSlotQM().load());
ASSERT_TRUE(second_initial_status.IsInWriting());

Comment on lines +340 to +341
auto first_initial_status = EventSlotStatus(first_slot_indicator.GetSlotQM().load());
ASSERT_TRUE(first_initial_status.IsInWriting());
Copy link
Contributor

Choose a reason for hiding this comment

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

This assert is IMHO not relevant for this test. Better remove it to make this test less impacted by unrelated changes in the codebase.

Suggested change
auto first_initial_status = EventSlotStatus(first_slot_indicator.GetSlotQM().load());
ASSERT_TRUE(first_initial_status.IsInWriting());

Comment on lines +368 to +369
auto second_final_slot_status = EventSlotStatus(second_slot_indicator.GetSlotQM().load());
EXPECT_FALSE(second_final_slot_status.IsInWriting());
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
auto second_final_slot_status = EventSlotStatus(second_slot_indicator.GetSlotQM().load());
EXPECT_FALSE(second_final_slot_status.IsInWriting());
const EventSlotStatus second_final_slot_status{second_slot_indicator.GetSlotQM().load()};

@pahmann
Copy link
Member

pahmann commented Jan 7, 2026

I wonder if the test case touches any requirement and therefore should make use of test properties.
See process description here: https://eclipse-score.github.io/process_description/main/process_areas/verification/guidance/verification_templates.html#c-properties-template

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.

3 participants