| 57 | } |
| 58 | |
| 59 | auto test_lock_guard() -> bool { |
| 60 | klog::Info("Running test_lock_guard..."); |
| 61 | TestSpinLock lock("guard"); |
| 62 | { |
| 63 | LockGuard<TestSpinLock> guard(lock); |
| 64 | EXPECT_TRUE(lock.IsLockedByCurrentCore(), "LockGuard failed to lock"); |
| 65 | } |
| 66 | EXPECT_TRUE(!lock.IsLockedByCurrentCore(), "LockGuard failed to unlock"); |
| 67 | klog::Info("test_lock_guard passed"); |
| 68 | return true; |
| 69 | } |
| 70 | |
| 71 | auto test_interrupt_restore() -> bool { |
| 72 | klog::Info("Running test_interrupt_restore..."); |
no test coverage detected