SimpleKernel 1.17.0
Loading...
Searching...
No Matches
RamFsTest Class Reference
Inheritance diagram for RamFsTest:
Inheritance graph
Collaboration diagram for RamFsTest:
Collaboration graph

Protected Member Functions

void SetUp () override
 
void TearDown () override
 

Protected Attributes

RamFs ramfs_
 
test_env::TestEnvironmentState env_state_
 

Detailed Description

Definition at line 17 of file ramfs_test.cpp.

Member Function Documentation

◆ SetUp()

void RamFsTest::SetUp ( )
inlineoverrideprotected

Definition at line 22 of file ramfs_test.cpp.

22 {
25 env_state_.BindThreadToCore(std::this_thread::get_id(), 0);
26 auto result = ramfs_.Mount(nullptr);
27 EXPECT_TRUE(result.has_value());
28 }
RamFs ramfs_
test_env::TestEnvironmentState env_state_
auto Mount(vfs::BlockDevice *device) -> Expected< vfs::Inode * > override
挂载 ramfs
Definition ramfs.cpp:36
void BindThreadToCore(std::thread::id tid, size_t core_id)
将指定线程绑定到核心
void InitializeCores(size_t num_cores)
初始化指定数量的核心
void SetCurrentThreadEnvironment()
设置当前线程的环境实例指针
#define EXPECT_TRUE(cond, msg)
Here is the call graph for this function:

◆ TearDown()

void RamFsTest::TearDown ( )
inlineoverrideprotected

Definition at line 30 of file ramfs_test.cpp.

30 {
31 (void)ramfs_.Unmount();
33 }
auto Unmount() -> Expected< void > override
卸载 ramfs
Definition ramfs.cpp:77
void ClearCurrentThreadEnvironment()
清除当前线程的环境实例指针
Here is the call graph for this function:

Member Data Documentation

◆ env_state_

test_env::TestEnvironmentState RamFsTest::env_state_
protected

Definition at line 20 of file ramfs_test.cpp.

◆ ramfs_

RamFs RamFsTest::ramfs_
protected

Definition at line 19 of file ramfs_test.cpp.


The documentation for this class was generated from the following file: