summaryrefslogtreecommitdiff
path: root/Tests/LibC
AgeCommit message (Collapse)Author
2021-10-04Everywhere: Fix more Copyright header inconsistenciesTim Schumacher
2021-10-03Tests: Add tests for mbrtowcTim Schumacher
2021-10-03Tests: Add a test for mbsinitTim Schumacher
2021-10-03LibC: Implement wmemmoveTim Schumacher
2021-10-03LibC: Implement wmemsetTim Schumacher
2021-10-03LibC: Implement wmemcpyTim Schumacher
2021-10-03LibC: Implement wmemchrTim Schumacher
2021-10-03LibC: Implement wcsstrTim Schumacher
2021-10-03LibC: Implement wcspbrkTim Schumacher
2021-09-18LibC: Primitively implement wcscollTim Schumacher
At the moment, sorting like LC_COLLATE=C would do is better than nothing.
2021-09-17LibC: Implement towctransTim Schumacher
2021-09-17LibC: Implement iswctypeTim Schumacher
2021-09-17LibC: Implement wctransTim Schumacher
2021-09-17LibC: Implement wctypeTim Schumacher
2021-09-06Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safeAli Mohammad Pur
2021-09-05Tests: Reduce the execution time of the LibC TestQSort testBrian Gianforcaro
Executing 100 times vs 10 times doesn't increase test coverage substantial, this API is stable and more iterations is just a waste of time. Without KVM this test is a clear outlier in runtime during CI: ``` START LibC/TestQsort (106/172) PASS LibC/TestQsort (41.233692s) ```
2021-09-01Tests: Convert remaining LibC tests to LibTestAndrew Kaster
Convert them to using outln instead of printf at the same time.
2021-08-26Tests: Test setjmp/sigsetjmp LibC functionsJean-Baptiste Boric
Since there are no real users of these functions in Serenity's userland and this is my third attempt at this... This time, the great LibTest test suite will make sure that I do it right!
2021-07-14Tests: Fix compile errors on ClangDaniel Bertalan
Since Clang enables a couple of warnings that we don't have in GCC, these were not caught before. Included fixes: - Use correct printf format string for `size_t` - Don't compare Nonnull(Ref|Own)Ptr` to nullptr - Fix unsigned int& => unsigned long& conversion
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.
2021-07-07Tests: Build all tests on x86_64Gunnar Beutner
This builds some previously-disabled tests for x86_64.
2021-07-06Tests+Base: Convert stack-smash to be LibTest based and stop skipping itAndrew Kaster
Now that the test is converted to be LibTest based, we can remove it from the exclude list in /home/anon/.config/Tests.ini. Prior to this it would crash and fail because it was signaled instead of returning normally with exit code 0.
2021-05-25LibC: Implement strerror_r()Gunnar Beutner
This implements the XSI-compliant version of strerror_r() - as opposed to the GNU-specific variant. The function explicitly saves errno so as to not accidentally change it with one of the calls to other functions.
2021-05-19Tests: static vs non-static constexpr variablesLenny Maiorani
Problem: - `static` variables consume memory and sometimes are less optimizable. - `static const` variables can be `constexpr`, usually. - `static` function-local variables require an initialization check every time the function is run. Solution: - If a global `static` variable is only used in a single function then move it into the function and make it non-`static` and `constexpr`. - Make all global `static` variables `constexpr` instead of `const`. - Change function-local `static const[expr]` variables to be just `constexpr`.
2021-05-16AK: Turn ByteBuffer into a value typeGunnar Beutner
Previously ByteBuffer would internally hold a RefPtr to the byte buffer and would behave like a reference type, i.e. copying a ByteBuffer would not create a duplicate byte buffer, but rather two objects which refer to the same internal buffer. This also changes ByteBuffer so that it has some internal capacity much like the Vector<T> type. Unlike Vector<T> however a byte buffer's data may be uninitialized. With this commit ByteBuffer makes use of the kmalloc_good_size() API to pick an optimal allocation size for its internal buffer.
2021-05-14LibC: Move mman.h to sys/mman.hJean-Baptiste Boric
POSIX mandates that it is placed there.
2021-05-14LibC: Do not include errno.h inside unistd.hJean-Baptiste Boric
POSIX does not mandate this, therefore let's not do it.
2021-05-12Tests: Add InodeWatcher and FileWatcher testssin-ack
This patch adds some rudimentary tests for InodeWatcher. It tests the basic functionality, but maybe there are corner cases I haven't caught. Additionally, this is our first LibCore test. :^)
2021-05-06Tests: Establish root Tests directory, move Userland/Tests thereBrian Gianforcaro
With the goal of centralizing all tests in the system, this is a first step to establish a Tests sub-tree. It will contain all of the unit tests and test harnesses for the various components in the system.
2020-08-02Tests: Build automatically, fix compilation errorsBen Wiederhake
2020-08-01Kernel+LibC: Implement 'memmem'AnotherTest
This commit adds an implementation of memmem, using the Bitap text search algorithm for needles smaller than 32 bytes, and a naive loop search for longer needles.
2020-07-03LibC: Replace Berkley's qsort() with AK::dual_pivot_quick_sort() wrapperSahan Fernando
2020-05-11LibC: strtod accuracy tests no longer need to skipBen Wiederhake
2020-05-11LibC: Demonstrate strtod inaccuracyBen Wiederhake
See also #1979.
2020-02-01LibC: The exec() family of functions should not search "." by defaultAndreas Kling
We should only execute the filename verbatim if it contains a slash (/) character somewhere. Otherwise, we need to look through the entries in the PATH environment variable. This fixes an issue where you could easily "override" system programs by placing them in a directory you control, and then waiting for someone to come there and run e.g "ls" :^) Test: LibC/exec-should-not-search-current-directory.cpp