aboutsummaryrefslogtreecommitdiff
path: root/kernel/kernel/filesystem/vfs.tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kernel/filesystem/vfs.tests.cpp')
-rw-r--r--kernel/kernel/filesystem/vfs.tests.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/kernel/kernel/filesystem/vfs.tests.cpp b/kernel/kernel/filesystem/vfs.tests.cpp
index ace1bd1f..c70c13c8 100644
--- a/kernel/kernel/filesystem/vfs.tests.cpp
+++ b/kernel/kernel/filesystem/vfs.tests.cpp
@@ -104,7 +104,7 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
THEN("second image can be mounted, data retrieved and unmounted again")
{
- REQUIRE(vfs.mount("/dev/ram16", "/information"));
+ REQUIRE(vfs.mount("/dev/ram1", "/information"));
auto mounted_monkey_1 = vfs.open("/information/monkey_house/monkey_1.txt");
REQUIRE(mounted_monkey_1);
@@ -120,8 +120,8 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
THEN("third image can be mounted in a mounted file system, unmount only if no child mount exists")
{
- REQUIRE(vfs.mount("/dev/ram16", "/information"));
- REQUIRE(vfs.mount("/dev/ram32", "/information/monkey_house/infrastructure"));
+ REQUIRE(vfs.mount("/dev/ram1", "/information"));
+ REQUIRE(vfs.mount("/dev/ram2", "/information/monkey_house/infrastructure"));
auto mounted_monkey_1 = vfs.open("/information/monkey_house/monkey_1.txt");
auto mounted_fish1 = vfs.open("/information/monkey_house/infrastructure/enclosures/aquarium/tank_1/fish_1.txt");
@@ -139,7 +139,7 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
THEN("image can be mounted, unmount only if no files are open")
{
- REQUIRE(vfs.mount("/dev/ram16", "/information"));
+ REQUIRE(vfs.mount("/dev/ram1", "/information"));
auto mounted_monkey_1 = vfs.open("/information/monkey_house/monkey_1.txt");
REQUIRE(mounted_monkey_1);
@@ -168,8 +168,8 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
THEN("images can be stacked mounted and correct file system is unmounted again")
{
- REQUIRE(vfs.mount("/dev/ram16", "/information"));
- REQUIRE(vfs.mount("/dev/ram32", "/information"));
+ REQUIRE(vfs.mount("/dev/ram1", "/information"));
+ REQUIRE(vfs.mount("/dev/ram2", "/information"));
auto mounted_tickets = vfs.open("/information/entrance/tickets.txt");
REQUIRE(mounted_tickets);
@@ -189,7 +189,7 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
auto info_1 = vfs.open("/information/info_1.txt");
REQUIRE(info_1 != nullptr);
- REQUIRE(vfs.mount("/dev/ram16", "/"));
+ REQUIRE(vfs.mount("/dev/ram1", "/"));
info_1 = vfs.open("/information/info_1.txt");
REQUIRE(info_1.error() == kstd::errc::no_such_file_or_directory);
@@ -210,7 +210,7 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
auto info_1 = vfs.open("/information/info_1.txt");
REQUIRE(info_1 != nullptr);
- REQUIRE(vfs.mount("/dev/ram16", "/"));
+ REQUIRE(vfs.mount("/dev/ram1", "/"));
info_1 = vfs.open("/information/info_1.txt");
REQUIRE(info_1.error() == kstd::errc::no_such_file_or_directory);
@@ -302,7 +302,7 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
THEN("a file can be accessed over multiple mounts if path contains .. or . ")
{
- REQUIRE(vfs.mount("/dev/ram16", "/information"));
+ REQUIRE(vfs.mount("/dev/ram1", "/information"));
auto img = vfs.open("/information/monkey_house/caretaker/../../../../../../archiv/2024.img");
REQUIRE(img != nullptr);
@@ -316,7 +316,7 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
THEN("a file can be accessed over multiple mounts (device and file) if path contains .. ")
{
- REQUIRE(vfs.mount("/dev/ram16", "/information"));
+ REQUIRE(vfs.mount("/dev/ram1", "/information"));
REQUIRE(vfs.mount("/archiv/2024.img", "/information/monkey_house/infrastructure"));
auto pig_1 = vfs.open("/information/monkey_house/infrastructure/stable/pig_1.txt");
@@ -463,7 +463,7 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
THEN("cannot unmount a filesystem if files are mounted")
{
- REQUIRE(vfs.mount("/dev/ram16", "/entrance"));
+ REQUIRE(vfs.mount("/dev/ram1", "/entrance"));
REQUIRE(vfs.mount("/entrance/archiv/2024.img", "/enclosures"));
REQUIRE(vfs.unmount("/entrance").error() == kstd::errc::device_or_resource_busy);
@@ -473,7 +473,7 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
THEN("can mount filesystem onto the directory that contains it")
{
- REQUIRE(vfs.mount("/dev/ram16", "/entrance"));
+ REQUIRE(vfs.mount("/dev/ram1", "/entrance"));
REQUIRE(vfs.mount("/entrance/archiv/2024.img", "/entrance"));
REQUIRE(vfs.unmount("/entrance"));
@@ -566,7 +566,7 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, "VFS
setup_modules_from_img_and_init_vfs({"test_img_module_1", "test_img_module_2"}, {image_path_1, image_path_2}));
auto & vfs = kernel::filesystem::vfs::get();
- REQUIRE(vfs.mount("/dev/ram16", "/information"));
+ REQUIRE(vfs.mount("/dev/ram1", "/information"));
THEN("file can be opened through symbolic link pointing to the parent filesystem and back into the mounted "
"filesystem again")