Skip to content

Test Case for Race Condition in Config Notifier#1018

Merged
tcormackMW merged 7 commits intodevelopmentfrom
configNotifierTest
Jul 2, 2024
Merged

Test Case for Race Condition in Config Notifier#1018
tcormackMW merged 7 commits intodevelopmentfrom
configNotifierTest

Conversation

@tcormackMW
Copy link
Copy Markdown
Contributor

This test case does expose the bug fixed in #1016 for the ConfigNotifier. Essentially if we have a race between unregistering a listener for a config and then notifying of a config change, it can get past the AnyListenersForPid call made in ConfigurationListenerImpl::ConfigurationEvent and into NotifyAllListeners with an empty map. All this means is that the check, already implemented in #1016, needs to done.

Of note, this is a very sporadic occurence even in this test case, on the order of 1/500 runs. I am not sure how common this is in real life examples, I have seen it on a much more common level i.e. 1/3 runs in the wild.

@tcormackMW tcormackMW self-assigned this Jul 1, 2024
@tcormackMW tcormackMW requested a review from jeffdiclemente July 1, 2024 16:43
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
Comment thread compendium/DeclarativeServices/test/gtest/TestComponentConfigurationImpl.cpp Outdated
@jeffdiclemente jeffdiclemente requested a review from carneyweb July 1, 2024 17:26
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.50%. Comparing base (536abf4) to head (4ba6b84).

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #1018      +/-   ##
===============================================
+ Coverage        88.48%   88.50%   +0.01%     
===============================================
  Files              242      242              
  Lines            11880    11880              
===============================================
+ Hits             10512    10514       +2     
+ Misses            1368     1366       -2     

see 2 files with indirect coverage changes

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@tcormackMW tcormackMW merged commit f4cc394 into development Jul 2, 2024
@tcormackMW tcormackMW deleted the configNotifierTest branch July 2, 2024 18:14
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