Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some RCU tests call rcu_synchronize() but expect rcu_barrier() effects #2292

Open
jarmar opened this issue Sep 13, 2024 · 0 comments
Open

Some RCU tests call rcu_synchronize() but expect rcu_barrier() effects #2292

jarmar opened this issue Sep 13, 2024 · 0 comments

Comments

@jarmar
Copy link

jarmar commented Sep 13, 2024

Some RCU tests assert that deleters have run. For example, RcuTest.Guard (where setting del to true is a side effect of foo's destructor):

rcu_retire(foo);
rcu_synchronize();
EXPECT_TRUE(del);

According to Rcu.h, the purpose of rcu_synchronize() is to wait for all pre-existing readers to finish. The function that "waits for all in-flight deleters to complete" is rcu_barrier(). Since the test expects foo's deleter to have run, it should call rcu_barrier().

I believe this applies to the following RcuTest tests:

  • Guard
  • NewDomainGuardTest
  • ThreadDeath
  • RcuObjBase
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

No branches or pull requests

1 participant