summaryrefslogtreecommitdiff
path: root/Tests/LibC/TestIo.cpp
AgeCommit message (Collapse)Author
2023-05-14Tests: Prefer TRY_OR_FAIL() and MUST() over EXPECT(!.is_error())Ben Wiederhake
Note that in some cases (in particular SQL::Result and PDFErrorOr), there is no Formatter defined for the error type, hence TRY_OR_FAIL cannot work as-is. Furthermore, this commit leaves untouched the places where MUST could be replaced by TRY_OR_FAIL. Inspired by: https://github.com/SerenityOS/serenity/pull/18710#discussion_r1186892445
2023-04-09Tests: Use `FileSystem` instead of `DeprecatedFile`Cameron Youell
2023-02-13LibCore: Rename `File` to `DeprecatedFile`Tim Schumacher
As usual, this removes many unused includes and moves used includes further down the chain.
2023-01-01Kernel+Tests: Allow deleting someone else's file in my sticky directoryAndreas Kling
This should be allowed according to Dr. POSIX. :^)
2023-01-01Kernel+Tests: Remove inaccurate FIXME in sys$rmdir()Andreas Kling
We were already handling the rmdir("..") case by refusing to remove directories that were not empty. This patch removes a FIXME from January 2019 and adds a test. :^)
2023-01-01Kernel+Tests: Make sys$rmdir() fail with EINVAL if basename is "."Andreas Kling
Dr. POSIX says that we should reject attempts to rmdir() the file named "." so this patch does exactly that. We also add a test. This solves a FIXME from January 2019. :^)
2022-10-25Tests: Use new global variables at /sys/kernel/ directoryLiav A
2022-10-16Kernel: Use more fine-grained content data block granularity in TmpFSLiav A
Instead of just having a giant KBuffer that is not resizeable easily, we use multiple AnonymousVMObjects in one Vector to store them. The idea is to not have to do giant memcpy or memset each time we need to allocate or de-allocate memory for TmpFS inodes, but instead, we can allocate only the desired block range when trying to write to it. Therefore, it is also possible to have data holes in the inode content in case of skipping an entire set of one data block or more when writing to the inode content, thus, making memory usage much more efficient. To ensure we don't run out of virtual memory range, don't allocate a Region in advance to each TmpFSInode, but instead try to allocate a Region on IO operation, and then use that Region to map the VMObjects in IO loop.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-24Userland+Tests: Convert File::read_link() from String to ErrorOr<String>Kenneth Myhra
This converts the return value of File::read_link() from String to ErrorOr<String>. The rest of the change is to support the potential of an Error being returned and subsequent release of the value when no Error is returned. Unfortunately at this stage none of the places affected can utililize our TRY() macro.
2021-07-11Userland+Tests: Convert test_io to be LibTest basedAndrew Kaster
Add a few extra tests as well, to make sure we don't have any future TmpFs regressions.