MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / TEST_F

Function TEST_F

tests/unit_test/spinlock_test.cpp:53–61  ·  view source on GitHub ↗

测试基本的 lock/UnLock 功能

Source from the content-addressed store, hash-verified

51
52// 测试基本的 lock/UnLock 功能
53TEST_F(SpinLockTest, BasicLockUnlock) {
54 SpinLockTestable lock("basic_test");
55
56 // 初始状态应该是未锁定的
57 EXPECT_TRUE(lock.Lock());
58
59 // 解锁应该成功
60 EXPECT_TRUE(lock.UnLock());
61}
62
63// 测试中断控制
64TEST_F(SpinLockTest, InterruptControl) {

Callers

nothing calls this directly

Calls 10

GetInterruptStatusFunction · 0.85
DisableInterruptFunction · 0.85
EnableInterruptFunction · 0.85
BindThreadToCoreMethod · 0.80
IsLockedByCurrentCoreMethod · 0.80
sizeMethod · 0.80
LockMethod · 0.45
UnLockMethod · 0.45
GetCoreCountMethod · 0.45

Tested by

no test coverage detected