summaryrefslogtreecommitdiff
path: root/Meta/Lagom
AgeCommit message (Collapse)Author
2021-05-01Lagom/Fuzzers: Add fuzzers for Windows-1251 and Windows-1255 decodersIdan Horowitz
2021-05-01Lagom/CMake: Add -fconstexpr-steps for AppleClangCarlos César Neves Enumo
2021-04-29Meta: Increase fconstexpr-steps for Clang Lagom buildsIdan Horowitz
Clang's default constexpr-steps limit is 1048576, which is not enough for LibGfx's generation of the unicode bidirectional class lookup table while GCC doesn't have any limit at all, so this patch increases the limit to an arbitrarily larger value.
2021-04-25AK+Userland: Move AK/TestSuite.h into LibTest and rework Tests' CMakeAndrew Kaster
As many macros as possible are moved to Macros.h, while the macros to create a test case are moved to TestCase.h. TestCase is now the only user-facing header for creating a test case. TestSuite and its helpers have moved into a .cpp file. Instead of requiring a TEST_MAIN macro to be instantiated into the test file, a TestMain.cpp file is provided instead that will be linked against each test. This has the side effect that, if we wanted to have test cases split across multiple files, it's as simple as adding them all to the same executable. The test main should be portable to kernel mode as well, so if there's a set of tests that should be run in self-test mode in kernel space, we can accomodate that. A new serenity_test CMake function streamlines adding a new test with arguments for the test source file, subdirectory under /usr/Tests to install the test application and an optional list of libraries to link against the test application. To accomodate future test where the provided TestMain.cpp is not suitable (e.g. test-js), a CUSTOM_MAIN parameter can be passed to the function to not link against the boilerplate main function.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-21Tests: Reorganize LibCompress unit testsMarco Biscaro
Move LibCompress unit tests to LibCompress/Tests directory and register them with CMake's add_test. This allows us to run these tests with ninja test instead of running a separate executable. Also split the existing tests in 3 test files that better follow the source code structure (inspired by AK tests).
2021-04-20Lagom: Add sql utility and LibSQL unit testsTimothy Flynn
2021-04-11Everywhere: Update references from ReadMe.md => README.mdAndreas Kling
2021-03-27Lagom/Fuzzers: Add fuzzer for zip file parserLuke
2021-03-17LibJS: Rename GlobalObject::initialize() => initialize_global_object()Andreas Kling
This function was shadowing Object::initialize() which cannot be called on global objects and has a different set of parameters.
2021-03-14Lagom/Fuzzers: Add fuzzers for the new Gzip and Deflate compressorsLuke
2021-03-14Lagom/Fuzzers: Add fuzzers for Latin 1, Latin 2 and UTF16-BELuke
No fuzzer for UTF-8 as it (currently) just returns the input.
2021-03-12FuzzilliJs: Add missing <errno.h> includeAndreas Kling
2021-03-04Lagom/Fuzzers: Add fuzzers for LibCompessLuke
Adds fuzzers for Deflate, Gzip and Zlib.
2021-03-02Meta: Run test-js and test-compress as CTest executablesAndrew Kaster
Reduces the number of steps in the Actions workflow this way :^)
2021-03-01AK/Lagom: Modify TestSuite to return how many tests failed from mainAndrew Kaster
This allows us to remove the FAIL_REGEX logic from the CTest invocation of AK and LibRegex tests, as they will return a non-zero exit code on failure :^). Also means that running a failing TestSuite-enabled test with the run-test-and-shutdown script will actually print that the test failed.
2021-03-01Lagom/Fuzzers: Add WAV fuzzerLuke
2021-02-28Meta: Build AK and LibRegex tests in Lagom and for SerenityAndrew Kaster
These tests were never built for the serenity target. Move their Lagom build steps to the Lagom CMakeLists.txt, and add serenity build steps for them. Also, fix the build errors when building them with the serenity cross-compiler :^)
2021-02-27Lagom: Build with -Wno-literal-suffix when using GCCLinus Groh
This is already set in the root CMakeLists.txt as well as here for Clang (-Wno-user-defined-literals), but was forgotten for GCC which made an Lagom-only build (cmake ../Meta/Lagom [...]) fail.
2021-02-27Lagom: CMakeLists.txt housekeepingLinus Groh
- Remove unused LIBM_SOURCES - Some cosmetic and whitespace changes
2021-02-26Everywhere: Remove a bunch of redundant 'AK::' namespace prefixesLinus Groh
This is basically just for consistency, it's quite strange to see multiple AK container types next to each other, some with and some without the namespace prefix - we're 'using AK::Foo;' a lot and should leverage that. :^)
2021-02-24AK: Add support for AK::StringView literals with operator""svBrian Gianforcaro
A new operator, operator""sv was added as of C++17 to support string_view literals. This allows string_views to be constructed from string literals and with no runtime cost to find the string length. See: https://en.cppreference.com/w/cpp/string/basic_string_view/operator%22%22sv This change implements that functionality in AK::StringView. We do have to suppress some warnings about implementing reserved operators as we are essentially implementing STL functions in AK as we have no STL :).
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-16Lagom: Build LibTextCodec into LagomAndreas Kling
2021-02-13Lagom/Fuzzers: Add RSA key parser fuzzerLuke
First issue: #5317
2021-02-08Everywhere: Remove unnecessary headers 4/4Ben Wiederhake
Arbitrarily split up to make git bisect easier. These unnecessary #include's were found by combining an automated tool (which determined likely candidates) and some brain power (which decided whether the #include is also semantically superfluous).
2021-02-08Fuzz: Remove unused FuzziliJS headerBen Wiederhake
2021-01-30Lagom/Fuzzers: Recommend enabling UBSan, extend instructionsBen Wiederhake
2021-01-30Lagom: Don't include Shell/main.cppBen Wiederhake
This caused some confusion: Apparently, clang has no trouble overriding Shell's main, and this issue only surfaced when I tried to build the fuzzers with wrong configuration (i.e., without the clang-injected 'main'). The diff is suggested by, and work of, @alimpfard.
2021-01-28Lagom+AK: Remove remains of clang -Wconsumed usageAndreas Kling
We stopped using that warning ages ago since it confused the compiler.
2021-01-26Meta: Split debug defines into multiple headers.asynts
The following script was used to make these changes: #!/bin/bash set -e tmp=$(mktemp -d) echo "tmp=$tmp" find Kernel \( -name '*.cpp' -o -name '*.h' \) | sort > $tmp/Kernel.files find . \( -path ./Toolchain -prune -o -path ./Build -prune -o -path ./Kernel -prune \) -o \( -name '*.cpp' -o -name '*.h' \) -print | sort > $tmp/EverythingExceptKernel.files cat $tmp/Kernel.files | xargs grep -Eho '[A-Z0-9_]+_DEBUG' | sort | uniq > $tmp/Kernel.macros cat $tmp/EverythingExceptKernel.files | xargs grep -Eho '[A-Z0-9_]+_DEBUG' | sort | uniq > $tmp/EverythingExceptKernel.macros comm -23 $tmp/Kernel.macros $tmp/EverythingExceptKernel.macros > $tmp/Kernel.unique comm -1 $tmp/Kernel.macros $tmp/EverythingExceptKernel.macros > $tmp/EverythingExceptKernel.unique cat $tmp/Kernel.unique | awk '{ print "#cmakedefine01 "$1 }' > $tmp/Kernel.header cat $tmp/EverythingExceptKernel.unique | awk '{ print "#cmakedefine01 "$1 }' > $tmp/EverythingExceptKernel.header for macro in $(cat $tmp/Kernel.unique) do cat $tmp/Kernel.files | xargs grep -l $macro >> $tmp/Kernel.new-includes ||: done cat $tmp/Kernel.new-includes | sort > $tmp/Kernel.new-includes.sorted for macro in $(cat $tmp/EverythingExceptKernel.unique) do cat $tmp/Kernel.files | xargs grep -l $macro >> $tmp/Kernel.old-includes ||: done cat $tmp/Kernel.old-includes | sort > $tmp/Kernel.old-includes.sorted comm -23 $tmp/Kernel.new-includes.sorted $tmp/Kernel.old-includes.sorted > $tmp/Kernel.includes.new comm -13 $tmp/Kernel.new-includes.sorted $tmp/Kernel.old-includes.sorted > $tmp/Kernel.includes.old comm -12 $tmp/Kernel.new-includes.sorted $tmp/Kernel.old-includes.sorted > $tmp/Kernel.includes.mixed for file in $(cat $tmp/Kernel.includes.new) do sed -i -E 's/#include <AK\/Debug\.h>/#include <Kernel\/Debug\.h>/' $file done for file in $(cat $tmp/Kernel.includes.mixed) do echo "mixed include in $file, requires manual editing." done
2021-01-25Everywhere: Use CMake to generate AK/Debug.h.asynts
This was done with the help of several scripts, I dump them here to easily find them later: awk '/#ifdef/ { print "#cmakedefine01 "$2 }' AK/Debug.h.in for debug_macro in $(awk '/#ifdef/ { print $2 }' AK/Debug.h.in) do find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/#ifdef '$debug_macro'/#if '$debug_macro'/' {} \; done # Remember to remove WRAPPER_GERNERATOR_DEBUG from the list. awk '/#cmake/ { print "set("$2" ON)" }' AK/Debug.h.in
2021-01-24Lagom/Fuzzers: Fix FuzzilliJs build and update patch for new Fuzzilli versionLuke
-fsanitize=fuzzer was being added to LINKER_FLAGS from Lagom/CMakeLists, which we don't want with FuzzilliJs as we want to define the functions it provides ourselves.
2021-01-20Meta: Add some more documentation on oss-fuzzNico Weber
2021-01-19Shell: Make tests use PASS/FAIL instead of exit codesAnotherTest
There's no guarantee that the last executed command will have a zero exit code, and so the shell exit code may or may not be zero, even if all the tests pass. Also changes the `test || echo fail && exit` to `if not test { echo fail && exit }`, since that's nicer-looking.
2021-01-12Lagom: Add Userland/ to include pathsAndreas Kling
This should make FuzzShell build.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling
2021-01-12Userland: Move command-line utilities to Userland/Utilities/Andreas Kling
2021-01-12Shell: Move to Userland/Shell/Andreas Kling
2021-01-09Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.Everything: The modifications in this commit were automatically made using the following command: find . -name '*.cpp' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \;
2021-01-03Lagom: Build gml-formatLinus Groh
2021-01-03Loader.so+LibELF: Move most of Loader.so's logic into ELF::DynamicLinkerWilliam Marlow
Loader.so now just performs the initial self relocations and static LibC initialisation before handing over to ELF::DynamicLinker::linker_main to handle the rest of the process. As a trade-off, ELF::DynamicLinker needs to be explicitly excluded from Lagom unless we really want to try writing a cross platform dynamic loader
2021-01-03FuzzJs: If the program successfully parsed, try running itLuke
This should help us get a lot more coverage in LibJS.
2021-01-02Lagom/Fuzzers: Add TTF fuzzerLuke
2021-01-01Lagom: Build test-compressAndreas Kling
2021-01-01CMake: Consolidate all options to the root of the projectBrian Gianforcaro
2020-12-25LibELF: Remove ELF::Loader and move everyone to ELF::ImageAndreas Kling
This commit gets rid of ELF::Loader entirely since its very ambiguous purpose was actually to load executables for the kernel, and that is now handled by the kernel itself. This patch includes some drive-by cleanup in LibDebug and CrashDaemon enabled by the fact that we no longer need to keep the ref-counted ELF::Loader around.
2020-12-21Everywhere: Switch from (void) to [[maybe_unused]] (#4473)Lenny Maiorani
Problem: - `(void)` simply casts the expression to void. This is understood to indicate that it is ignored, but this is really a compiler trick to get the compiler to not generate a warning. Solution: - Use the `[[maybe_unused]]` attribute to indicate the value is unused. Note: - Functions taking a `(void)` argument list have also been changed to `()` because this is not needed and shows up in the same grep command.
2020-12-19LibHTTP: Make HTTPRequest::from_raw_request() take a ReadonlyBytesAndreas Kling
This allows us to get rid of some ByteBuffer::wrap() usage.
2020-12-15Meta: Set a 10 second timeout on Shell testsAnotherTest
Shell-backgrounding seems to be deadlocking at times, until that's fixed, let's not take 5 hours to fail the build.