summaryrefslogtreecommitdiff
path: root/Tests
AgeCommit message (Collapse)Author
2022-03-31Tests: Test non-trivial re-hashing in HashTablekleines Filmröllchen
This caused a system-wide crash because of a previous bug relating to non-trivial types in HashTable. Therefore, check that such types actually work under various workloads.
2022-03-31Tests: Introduce a HashTable benchmark for "table thrashing"kleines Filmröllchen
Thrashing is what I call the situations where a table is mostly filled with deleted markers, causing an increase in size (at least temporarily) when a simple re-hash would be enough to get rid of those. This happens when a hash table (especially with many elements) has a lot of deletes and re-inserts done to it, which is what this benchmark does.
2022-03-30AK: Allow printing wide characters using %ls modifiersafarp
2022-03-29LibPDF: Add implementation of the Standard security handlerMatthew Olsson
Security handlers manage encryption and decription of PDF files. The standard security handler uses RC4/MD5 to perform its crypto (AES as well, but that is not yet implemented).
2022-03-29Tests: Add a basic UTF-8 to UTF-8 LibTextCodec testKarol Kosek
2022-03-27AK: Add an ArbitrarySizedEnum templateLinus Groh
This is an enum-like type that works with arbitrary sized storage > u64, which is the limit for a regular enum class - which limits it to 64 members when needing bit field behavior. Co-authored-by: Ali Mohammad Pur <mpfard@serenityos.org>
2022-03-26LibCrypto: Correctly add length to SHA384 and SHA512 hashesMichiel Visser
The SHA384 and SHA512 hashes would produce incorrect results for data where the length % 128 was in the range 112-119. This was because the total number of bits in the hashed values was added at the end as a 64-bit number instead of a 128-bit number. In most cases this would not cause any issues, as this space was padded with zeroes, however in the case that the length % 128 was 112-119, some incorrect data ended up where this 128-bit length value was expected. This change fixes the problems in LibTLS where some websites would result in a DecryptError on handshake.
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-20Everywhere: Move commonmark.spec.json to /home/anon/TestsBrian Gianforcaro
2022-03-20Everywhere: Move cpp-tests under /home/anon/TestsBrian Gianforcaro
2022-03-20LibCrypto: Add DH exchange for SECP256r1 to TestCurvesMichiel Visser
2022-03-20LibCrypto+LibTLS: Add SECP256r1 support to LibTLSMichiel Visser
Add the required methods to SECP256r1 to conform to the EllipticCurve virtual base class. Using this updated version of SECP256r1, support in LibTLS is implemented.
2022-03-20LibCrypto+LibTLS: Generalize the elliptic curve interfaceMichiel Visser
These changes generalize the interface with an elliptic curve implementation. This allows LibTLS to support elliptic curves generally without needing the specifics of elliptic curve implementations. This should allow for easier addition of other elliptic curves.
2022-03-18AK+Tests: Fix StringUtils::contains() being confused by repeating textSam Atkins
Previously, case-insensitively searching the haystack "Go Go Back" for the needle "Go Back" would return false: 1. Match the first three characters. "Go ". 2. Notice that 'G' and 'B' don't match. 3. Skip ahead 3 characters, plus 1 for the outer for-loop. 4. Now, the haystack is effectively "o Back", so the match fails. Reducing the skip by 1 fixes this issue. I'm not 100% convinced this fixes all cases, but I haven't been able to find any cases where it doesn't work now. :^)
2022-03-18LibCrypto: Implement the SECP256r1 elliptic curveMichiel Visser
This implementation of the secp256r1 elliptic curve uses two techniques to improve the performance of the operations. 1. All coordinates are stored in Jacobian form, (X/Z^2, Y/Z^3, Z), which removes the need for division operations during point addition or doubling. The points are converted at the start of the computation, and converted back at the end. 2. All values are transformed to Montgomery form, to allow for faster modular multiplication using the Montgomery modular multiplication method. This means that all coordinates have to be converted into this form, and back out of this form before returning them.
2022-03-18LibJS: Add infallible variant of VM::push_execution_context()Linus Groh
It makes no sense to require passing a global object and doing a stack space check in some cases where running out of stack is highly unlikely, we can't recover from errors, and currently ignore the result anyway. This is most commonly in constructors and when setting things up, rather than regular function calls.
2022-03-16LibTest: Provide detailed per-file JSON output with --per-fileAli Mohammad Pur
This makes test-js style runners dump out output in the same format as libjs-test262's per-file output.
2022-03-13AK: Add naive implementations of AK::timing_safe_compareBrian Gianforcaro
For security critical code we need to have some way of performing constant time buffer comparisons.
2022-03-13Tests: Rename AK/TestMemMem.cpp to AK/TestMemory.cppBrian Gianforcaro
Rename to create a new generic test group for the AK memory APIs.
2022-03-10Tests: Port TestHTMLTokenizer to Core::StreamSam Atkins
2022-03-10Tests: Port TestCommonmark to Core::StreamSam Atkins
This passes the same number of tests that it did before this change: > Out of 652 tests, 273 passed and 379 failed.
2022-03-10Tests: Port test-wasm to Core::StreamSam Atkins
2022-03-10Tests: Port test-cpp-preprocessor to Core::StreamSam Atkins
2022-03-10Tests: Port test-cpp-parser to Core::StreamSam Atkins
2022-03-09AK: Add reverse iterator as memberFederico Guerinoni
2022-03-09AK: Implement wrapper for reverse range for loopFederico Guerinoni
Now it is possible to use range for loop in reverse mode for a container. ``` for (auto item : in_reverse(vector)) ```
2022-03-09AK: Implement reverse iterator for Vector classFederico Guerinoni
2022-03-09LibCrypto: Add curve X448stelar7
2022-03-08LibC: Set `saved_str` to null in strtok_r if no tokens were foundDaniel Bertalan
If we do not do this, the next call to strtok_r will start tokenizing (and possibly modifying!) the memory pointed to by `saved_ptr`.
2022-03-08AK: Add IPv6Address classTom
This is the IPv6 counter part to the IPv4Address class and implements parsing strings into a in6_addr and formatting one as a string. It supports the address compression scheme as well as IPv4 mapped addresses.
2022-03-08Tests: Include limits.h for PATH_MAX in realpath testsTim Schumacher
2022-03-08Tests: Include limits.h for MB_LEN_MAX in wchar testsTim Schumacher
2022-03-08LibWeb: Move Window from DOM directory & namespace to HTMLLinus Groh
The Window object is part of the HTML spec. :^) https://html.spec.whatwg.org/multipage/window-object.html
2022-03-07LibPDF: Propagate errors in Parser and DocumentMatthew Olsson
2022-03-07AK: Add test for unbounded HashTable capacity leakAndreas Kling
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-03-02AK: Print NaN and infinite numbers in PrintfImplementationPeter Ross
2022-03-02LibC: Set PRI[xX]8/PRI[xX]16 macros to `x` and `X`Peter Ross
Described in: <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/ inttypes.h.html> The macros were first added in a7a456002e91d9f13793e23aab4c24519c4e87c7, but it is not clear why the PRIx16/32 macros were defined as 'b' & 'w'. PrintfImplementation was never able to parse these values.
2022-02-28AK: Add tests for integer values formatting in printfTimur Sultanov
2022-02-28AK: Add FixedPoint base 2 logarithmkleines Filmröllchen
The log base 2 is implemented using the binary logarithm algorithm by Clay Turner (see the link in the comment)
2022-02-28AK: Fix FixedPoint to integral comparisonskleines Filmröllchen
Add tests to ensure that the fixed point numbers compare correctly to integrals
2022-02-27Tests: Test DisjointChunks with FixedArraykleines Filmröllchen
2022-02-25AK: Ignore whitespace while decoding base64Andreas Kling
This matches how other implementations behave. 1% progression on ACID3. :^)
2022-02-23LibTest+Spreadsheet: Add some basic spreadsheet runtime behaviour testsAli Mohammad Pur
As there's a somewhat active development going on, let's keep the expected behaviour under tests to make sure nothing blows up :^)
2022-02-21LibWeb: Make document.write() work while document is parsingAndreas Kling
This necessitated making HTMLParser ref-counted, and having it register itself with Document when created. That makes it possible for scripts to add new input at the current parser insertion point. There is now a reference cycle between Document and HTMLParser. This cycle is explicitly broken by calling Document::detach_parser() at the end of HTMLParser::run(). This is a huge progression on ACID3, from 31% to 49%! :^)
2022-02-21LibWeb: Fix 'Comment end state' in HTML TokenizerAdam Hodgen
Also, update the expected hash in the LibWeb TestHTMLTokenizer regression test. This is due to the "This comment has a few too many dashes." comment token being updated.
2022-02-20LibRegex: Make codegen+optimisation for alternatives much fasterAli Mohammad Pur
Just a little thinking outside the box, and we can now parse and optimise a million copies of "a|" chained together in just a second :^)
2022-02-20LibRegex: Make parse_disjunction() consume all disjunctions in one frameAli Mohammad Pur
This helps us not blow up when too many disjunctions are chained togther in the regex we're parsing. Fixes #12615.
2022-02-20LibRegex: Allow quantifiers after quantifiable assertionsAli Mohammad Pur
While quantifying assertions is very much meaningless, the specification allows them with annex B's extended grammar for browsers, so read and apply the quantifiers. Fixes #12373.
2022-02-20LibC: Do not write value when scanf assignment value is suppressedPeter Ross
This change has the positive side-effect of causing scanf to *segfault* when a NULL pointer argument is passed to scanf. e.g. sscanf(str, "%d", NULL);