From 70da48e4a4ae22bd19deb555800d6b132504c370 Mon Sep 17 00:00:00 2001 From: Peizhao Ou Date: Thu, 15 Feb 2018 16:26:33 -0800 Subject: [PATCH] Adds writer test case for RCU --- folly/stress-test/stress-parallel-folly-sync.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/folly/stress-test/stress-parallel-folly-sync.cpp b/folly/stress-test/stress-parallel-folly-sync.cpp index 4cb37b47..d87e348d 100644 --- a/folly/stress-test/stress-parallel-folly-sync.cpp +++ b/folly/stress-test/stress-parallel-folly-sync.cpp @@ -221,14 +221,22 @@ unsigned FollySyncTest_Parallel::s_nSharedMutexWritePercentage; unsigned FollySyncTest_Parallel::s_nRWSpinLockWritePercentage; unsigned FollySyncTest_Parallel::s_nRWTicketSpinLockWritePercentage; -TEST_F(FollySyncTest_Parallel, FollyRCU_NonstopReaderSync) { +TEST_F(FollySyncTest_Parallel, FollyRCU_NonstopWriterSync) { FollyRcuThreading(run_rcu_writer_sync_nonstop, run_rcu_reader_pass_count); } -TEST_F(FollySyncTest_Parallel, FollyRCU_NonstopReaderNoSync) { +TEST_F(FollySyncTest_Parallel, FollyRCU_NonstopWriterNoSync) { FollyRcuThreading(run_rcu_writer_retire_nonstop, run_rcu_reader_pass_count); } +//TEST_F(FollySyncTest_Parallel, FollyRCU_NonstopReaderSync) { +// FollyRcuThreading(run_rcu_writer_sync_pass_count, run_rcu_reader_nonstop); +//} + +TEST_F(FollySyncTest_Parallel, FollyRCU_NonstopReaderNoSync) { + FollyRcuThreading(run_rcu_writer_retire_pass_count, run_rcu_reader_nonstop); +} + TEST_F(FollySyncTest_Parallel, FollyRWTicketSpinLock_32) { FollyRWLockThreading(s_nRWTicketSpinLockPassCount, s_nRWTicketSpinLockWritePercentage); -- 2.34.1