diff options
| author | Lukas Oesch <lukasoesch20@gmail.com> | 2026-04-19 10:01:52 +0200 |
|---|---|---|
| committer | Lukas Oesch <lukasoesch20@gmail.com> | 2026-04-19 10:01:52 +0200 |
| commit | 1356405c9fc6d54cf9da4d5f6fd54c55d51ce66d (patch) | |
| tree | 8204fad4c5882f7a371410086b12298f88c73a8f /kernel/src/filesystem/open_file_description.tests.cpp | |
| parent | e9837b17eeee5ba69f5067e5bfe3f40aca0a9277 (diff) | |
| download | teachos-1356405c9fc6d54cf9da4d5f6fd54c55d51ce66d.tar.xz teachos-1356405c9fc6d54cf9da4d5f6fd54c55d51ce66d.zip | |
vfs open returns the dentry not the open file description
Diffstat (limited to 'kernel/src/filesystem/open_file_description.tests.cpp')
| -rw-r--r-- | kernel/src/filesystem/open_file_description.tests.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/src/filesystem/open_file_description.tests.cpp b/kernel/src/filesystem/open_file_description.tests.cpp index db8eb49..ec35546 100644 --- a/kernel/src/filesystem/open_file_description.tests.cpp +++ b/kernel/src/filesystem/open_file_description.tests.cpp @@ -76,8 +76,9 @@ SCENARIO_METHOD(kernel::tests::filesystem::storage_boot_module_vfs_fixture, REQUIRE_NOTHROW(setup_modules_from_img_and_init_vfs({"test_img_module"}, {image_path})); auto & vfs = kernel::filesystem::vfs::get(); - auto ofd = vfs.open("/information/info_1.txt"); - REQUIRE(ofd != nullptr); + auto dentry = vfs.open("/information/info_1.txt"); + REQUIRE(dentry != nullptr); + auto ofd = kstd::make_shared<kernel::filesystem::open_file_description>(dentry->get_inode()); THEN("the file can be read and the offset is updated") { |
