summaryrefslogtreecommitdiff
path: root/Tests/Kernel
AgeCommit message (Collapse)Author
2022-12-28Kernel: Reorganize Arch/x86 directory to Arch/x86_64 after i686 removalLiav A
No functional change.
2022-12-28Kernel: Remove i686 supportLiav A
2022-12-28Tests: Remove i686 supportLiav A
2022-12-16Kernel: Reintroduce the msyscall syscall as the annotate_mapping syscallLiav A
This syscall will be used later on to ensure we can declare virtual memory mappings as immutable (which means that the underlying Region is basically immutable for both future annotations or changing the protection bits of it).
2022-12-11Kernel+LibC+Tests: Implement `pwritev(2)`sin-ack
While this isn't really POSIX, it's needed by the Zig port and was simple enough to implement.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-29Tests/Kernel: Add a very simple test for posix_fallocate()Andreas Kling
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-11-01Everywhere: Explicitly link all binaries against the LibC targetTim Schumacher
Even though the toolchain implicitly links against -lc, it does not know where it should get LibC from except for the sysroot. In the case of Clang this causes it to pick up the LibC stub instead, which might be slightly outdated and feature missing symbols. This is currently not an issue that manifests because we pass through the dependency on LibC and other libraries by accident, which causes CMake to link against the LibC target (instead of just the library), and thus points the linker at the build output directory. Since we are looking to fix that in the upcoming commits, let's make sure that everything will still be able to find the proper LibC first.
2022-10-14Tests+Userland: Implement AARCH64 support for some inline assembly blobsGunnar Beutner
2022-10-14Tests+Userland: Prefer using __builtin_trap() instead of UD2Gunnar Beutner
This way we don't have to hard-code per-architecture instructions.
2022-10-14AK+Userland: Stub out code that isn't currently implemented on AARCH64Gunnar Beutner
Even though this almost certainly wouldn't run properly even if we had a working kernel for AARCH64 this at least lets us build all the userland binaries.
2022-10-04AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most placesNico Weber
Doesn't use them in libc headers so that those don't have to pull in AK/Platform.h. AK_COMPILER_GCC is set _only_ for gcc, not for clang too. (__GNUC__ is defined in clang builds as well.) Using AK_COMPILER_GCC simplifies things some. AK_COMPILER_CLANG isn't as much of a win, other than that it's consistent with AK_COMPILER_GCC.
2022-09-26Tests/Kernel: Add tests to ensure we don't regress InodeVMObjectsLiav A
2022-09-24Revert "Tests/Kernel: Add tests to ensure we don't regress InodeVMObjects"Liav A
This reverts commit b0d555163bc724542ea6560a2bc82bc3b620c31d.
2022-09-20Kernel/Tests: Don't compile x86 IO for non-x86 buildsLiav A
x86 IO space is not relevant for non-x86 builds so it doesn't make sense to include it in such build as it will not compile anyway.
2022-09-16Tests/Kernel: Add tests to ensure we don't regress InodeVMObjectsLiav A
2022-08-24Tests/Kernel: Make sure inaccessible area in TestEFault is actually thatAndreas Kling
We were relying on luck to make the mapping before our first mmap() be inaccessible. Let's make it explicit.
2022-07-27Everywhere: Make the codebase more architecture awareUndefine
2022-07-19LibC: Remove the `LibPthread` interface targetTim Schumacher
2022-07-19Everywhere: Refer to `pthread.h` by its non-prefixed nameTim Schumacher
This removes a bit of noise from the following patches, where we will move the `pthread.h` header out of the `LibPthread` directory.
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-08Tests: Remove the RDTSC kernel crash testTim Schumacher
We will remove the RDTSC instruction restriction to allow QEMU to read an accurate time, so this will no longer crash and therefore fail the test.
2022-07-05Tests: Add tests for inheriting signal handlersTim Schumacher
2022-05-12Tests: Fix new GCC 12 warningsDaniel Bertalan
2022-05-05Everywhere: Purge all support and usage of framebuffer devicesLiav A
Long live the DisplayConnector object!
2022-05-05Everywhere: Rename FB prefix name ioctls => GRAPHICSLiav A
2022-05-02Kernel: Stop requiring working malloc for syscall.h includesPatrick Meyer
Fixes #13869
2022-04-03Tests: Make TestEFault not rely on automatic guard pagesAndreas Kling
I'm about to break automatic guard page allocation in sys$mmap(), so we need to fix this test to not rely on it.
2022-04-03Tests: Clear errno before syscalls in TestEFaultAndreas Kling
This makes the debug output a little more helpful.
2022-04-03Tests: Remove unused macro in TestEFaultAndreas Kling
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.
2022-03-04Kernel: Add support for SA_SIGINFOAli Mohammad Pur
We currently don't really populate most of the fields, but that can wait :^)
2022-01-24Everywhere: Convert ByteBuffer factory methods from Optional -> ErrorOrSam Atkins
Apologies for the enormous commit, but I don't see a way to split this up nicely. In the vast majority of cases it's a simple change. A few extra places can use TRY instead of manual error checking though. :^)
2022-01-14Tests: Unmap memory ranges on /dev/mem after testing mmap(2)Liav A
2022-01-08Kernel: Implement read functionality for MemoryDeviceLiav A
So far we only had mmap(2) functionality on the /dev/mem device, but now we can also do read(2) on it. The test unit was updated to check we are doing it safely.
2021-12-20Kernel: Return EINVAL when specifying -1 for setuid and similar syscallsLiav A
For setreuid and setresuid syscalls, -1 means to set the current uid/euid/gid/egid value, to be more convenient for programming. However, for other syscalls where we pass only one argument, there's no justification to specify -1. This behavior is identical to how Linux handles the value -1, and is influenced by the fact that the manual pages for the group of one argument syscalls that handle ID operations is ambiguous about this topic.
2021-12-12Tests: Add tests for sigwait/sigwaitinfo/sigtimedwaitIdan Horowitz
2021-12-01Tests: Add a test to ensure sigaltstack() is working correctlyIdan Horowitz
2021-10-31Kernel: Write test that crashes ProcFSBen Wiederhake
2021-10-27Kernel + WindowServer: Re-define the interface to framebuffer devicesLiav A
We create a base class called GenericFramebufferDevice, which defines all the virtual functions that must be implemented by a FramebufferDevice. Then, we make the VirtIO FramebufferDevice and other FramebufferDevice implementations inherit from it. The most important consequence of rearranging the classes is that we now have one IOCTL method, so all drivers should be committed to not override the IOCTL method or make their own IOCTLs of FramebufferDevice. All graphical IOCTLs are known to all FramebufferDevices, and it's up to the specific implementation whether to support them or discard them (so we require extensive usage of KResult and KResultOr, together with virtual characteristic functions). As a result, the interface is much cleaner and understandable to read.
2021-10-22Tests: Add a unit test to ensure the /dev/mem device works correctlyLiav A
To ensure everything works as expected, a unit test was added with multiple scenarios. This binary has to have the SetUID flag, and we also bind-mount the /usr/Tests directory to allow running of SetUID binaries.
2021-10-08Tests: Fix -Wunreachable-code warnings from clangNico Weber
2021-10-01Kernel: Move x86 IO instructions code into the x86 specific folderLiav A
2021-10-01Tests: Fix typosNico Weber
2021-09-16crash: Don't test for qemu-unsupported featureBen Wiederhake
See #10042 for details. In short: qemu doesn't seem to implement that feature, therefore the test correctly fails. However, that does not help us, so we skip that test.
2021-09-16crash: Run automatically during CIBen Wiederhake
2021-09-11Tests/Kernel: Fix test after off-by-one fix in Memory::is_user_range()Brian Gianforcaro
Commit 890c647e0f fixed an off-by-one bug, so the mapping of the page at the very end of the user address space now works correctly. This change adjusts the test so cover the corner cases the original version was designed too.validate.