| 22 | }; |
| 23 | |
| 24 | auto test_basic_lock() -> bool { |
| 25 | klog::Info("Running test_basic_lock..."); |
| 26 | TestSpinLock lock("basic"); |
| 27 | EXPECT_TRUE(lock.Lock(), "Basic lock failed"); |
| 28 | EXPECT_TRUE(lock.IsLockedByCurrentCore(), |
| 29 | "IsLockedByCurrentCore failed after lock"); |
| 30 | EXPECT_TRUE(lock.UnLock(), "Basic unlock failed"); |
| 31 | EXPECT_TRUE(!lock.IsLockedByCurrentCore(), |
| 32 | "IsLockedByCurrentCore failed after unlock"); |
| 33 | klog::Info("test_basic_lock passed"); |
| 34 | return true; |
| 35 | } |
| 36 | |
| 37 | auto test_recursive_lock() -> bool { |
| 38 | klog::Info("Running test_recursive_lock..."); |
no test coverage detected