Some RCU tests call `rcu_synchronize()` but expect `rcu_barrier()` effects
Open
- Dominant language
- C++
- Stars
- 30.5k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Description
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):
```c++
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`
Contributor guide
Assessment
This issue has not been assessed yet.