3750 Commits
Author SHA1 Message Date
Undefine b5d4da532a Tests: Add a simple test for the LibACPI AML Interpreter
The test .aml file was built with iASL 20260930, using
`iasl Tests/LibACPI/test-inputs/scope_and_name.dsl`
2026-10-28 18:13:04 +01:00
UndefineandRatcheT2497 bc4f17f9f1 Lagom: Build the acpi utility
It's very useful for testing LibACPI without having to boot Serenity
every time.

Co-authored-by: RatcheT2497 <[email protected]>
2026-10-28 18:13:04 +01:00
UndefineandRatcheT2497 95ab8a7e1a LibACPI: Add a skeleton of a AML interpreter
This a simple skeleton for a non recursive AML parser + interpreter.
For now it support very little stuff, only a couple of opcodes but that
is enough to load a very very simple AML table.

Co-authored-by: RatcheT2497 <[email protected]>
2026-10-28 18:13:04 +01:00
Linus Groh 94beea58f1 Ports+Meta: Update ca-certificates to 2026-10-20
We went from "compromised CA keys" to "the key is 4, chosen by fair dice
roll" in a matter of hours:

- https://groups.google.com/a/mozilla.org/g/dev-security-policy/c/0R3XLJL6FuE
- https://chaos.social/@fluepke/117474156947559280
2026-10-20 14:07:41 -04:00
Eduardo Casadei ff889da752 Tests/Shell: Add test cases for cd 2026-10-16 09:57:03 +02:00
Lucas Chollet 2830bdc9e8 CompareMathAgainstMPFR: Add support for the tgamma function 2026-10-14 22:19:04 +02:00
Lucas Chollet bd4bcd52be Meta: Generate one coverage report per library
This allows us to see the coverage of each library without transitive
usages. As an example, Vector::clone() is never tested directly in
Tests/AK, and it's coverage depends on an external test or library. This
means that its coverage is fragile as the code using it in tests might
be dropped in the future.
2026-10-14 09:14:25 +02:00
Lucas Chollet 7dea0e2eb8 Meta: Move $all_binaries definition closer to its use 2026-10-14 09:14:25 +02:00
Lucas Chollet 1241e4f0a6 Meta+CMake: Enable coverage for test binaries
This will allow everything defined in headers to be instrumented. As an
example, the function `AK::any_of` isn't instantiated inside AK, that
means that no coverage is reported if we don't consider the
instantiation in the test binary itself.
2026-10-14 09:14:25 +02:00
Lucas Chollet 05d7ed4e2c Meta+run-tests: Put coverage results in per-library folders 2026-10-14 09:14:25 +02:00
Lucas Chollet 41ebb4e542 Meta: Report an error if the coverage directory already exists
This avoids contaminations from previous runs.
2026-10-14 09:14:25 +02:00
Lucas Chollet f82570ae70 Meta: Make finding executables in analyze-qemu-coverage.sh way faster
Using `find` to do the heavy lifting makes the execution time go from
44s to 3s on my computer.
2026-10-14 09:14:25 +02:00
Lucas Chollet e126a950c3 CompareAKMathAgainstMPFR: Add support for the lgamma function 2026-10-12 18:39:50 +02:00
Sönke Holz 80baeb2970 Meta: Enable the "vc4-kms-v3d.dtbo" Raspberry Pi devicetree overlay
Despite its name, this overlay isn't Linux-specific. It enables the v3d
node next to other things.

Raspberry Pi OS also enables this overlay by default.
2026-10-08 16:07:29 +02:00
Lucas Chollet 1f51afef98 Meta: Make building CompareAKMathAgainstMPFR opt-in
The tool depends on MPFR, which is not listed as a required dependency
on all platforms (e.g. macOS). So let's disable CompareAKMathAgainstMPFR
by default instead of adding a new dependency.

To build the tool, set ENABLE_COMPARE_AK_MATH_AGAINST_MPFR to ON in your
Lagom directory.
2026-10-05 11:09:23 +02:00
Lucas Chollet eda3748a19 CompareAKMathAgainstMPFR: Use all CORE-MATH test cases by default
And provide a flag to sample only N test cases from the list.
2026-10-01 22:09:38 +02:00
Lucas Chollet 4f13bbd630 CompareAKMathAgainstMPFR: Add an option to restrict the testing range
Very useful when working on an approximation that only applies to a
specific range.
2026-10-01 22:09:38 +02:00
Lucas Chollet f66949cd5e CompareAKMathAgainstMPFR: Display the ULP of the worst offender
When displaying the expected and computed result in verbose mode,
printing the ULP of the expected value gives a scale to compare the
values.
2026-10-01 22:09:38 +02:00
Lucas Chollet e8e791951e CompareAKMathAgainstMPFR: Add an option to filter tested functions 2026-10-01 22:09:38 +02:00
Linus Groh 5cf5676408 Ports+Meta: Update ca-certificates to 2026-09-25 2026-09-30 21:42:57 -07:00
Lucas Chollet 4a83903b96 CompareMathAgainstMPFR: Add support for cosh, sinh and tanh 2026-09-27 22:09:41 +02:00
Lucas Chollet c9753b4d3f CompareAKMathAgainstMPFR: Set exponent limits globally
In the CORE-MATH codebase, not all mpfr-based math functions set the
exponents limits, some assume it is done before calling them. So let's
set it globally and remove the call to mpfr_set_emin code in exp().
2026-09-27 22:09:41 +02:00
Lucas Chollet b37efc6925 Meta: Add a tool to compare our math functions against a trusted source
This tool runs a bunch of accuracy and performance tests on standard
math functions. The accuracy is measured against the MPFR library, which
provides results precise enough to be correctly rounded to double
precision floating points.

By default, the tool test the math functions from AK but a runtime flag
can be used to instead test the system's libm.

A few test cases are internally generated, but to get more precise
results the tool is capable of reading worst-cases files from the
CORE-MATH project. The location of the repository should be given with
the --core-math PATH option.

Heavily inspired by https://github.com/nico/js-math-bench.
2026-09-26 21:19:20 +02:00
Lucas Chollet 8a1ff05985 Meta: Support building C files 2026-09-24 11:53:15 +02:00
Andrew Kaster 26732f76a2 LibWeb: Move JS::Promise <-> WebIDL conversion into IDL
This change also removes as much direct use of JS::Promise in LibWeb
as possible. When specs refer to `Promise<T>` they should be assumed
to be referring to the WebIDL Promise type, not the JS::Promise type.

The one exception is the HostPromiseRejectionTracker hook on the JS
VM. This facility and its associated sets and events are intended to
expose the exact opaque object handles that were rejected to author
code. This is not possible with the WebIDL Promise type, so we have
to use JS::Promise or JS::Object to hold onto the promises.

It also exposes which specs need some updates in the area of
promises. WebDriver stands out in this regard. WebAudio could use
some more cross-references to WebIDL as well to clarify things.

(cherry picked from commit 2c3531ab78c5c9ef9fa05a666ec29ecf284961ab)
2026-09-21 20:57:52 -04:00
Alex Ungurianu 891f486e2d LibWeb: Add and implement CSSPropertyRule IDL and bindings
(cherry picked from commit 50d64b0fb730b16d6cdc81ccb1efae567e4f9914)
2026-09-21 20:55:55 -04:00
Jamie Mansfield 62aeff0410 LibWeb/WebAssembly: Use a debug flag for dbgln calls
This prevents the horrendous console spam when functions are resolved,
e.g. on the Royal Albert Hall website.

(cherry picked from commit 48366ddddf3e1231abf116fc38d9b56b3c259229)
2026-09-21 10:32:03 +02:00
Linus Groh c3b63df674 Meta: Update to Unicode 18.0.0
https://www.unicode.org/versions/Unicode18.0.0/
2026-09-17 20:09:11 -04:00
Jelle Raaijmakers 6259c8acc6 LibWeb: Factor out HTMLOrSVGElement
This is a mixin in the IDL, so let's treat it as a mixin in our code and
let both SVGElement and MathMLElement reuse the implementations that we
wrote for HTMLElement.

(cherry picked from commit 5f84c2c3afef81fac09b9b255baa97326ce2b4cd)
2026-09-17 10:39:03 -04:00
Ali Mohammad Pur 77ade98e86 Meta: Pin Wasm spec testsuite to a known commit
The current HEAD contains a bunch of stuff not supported by wabt (or
us), that also appear to not be fully merged yet; stick to the last
known commit for now.

(cherry picked from commit 83f52fca80fc375acb2c20ab54b8a9b62b457802)
2026-09-17 08:53:54 -04:00
Sönke Holz e94c7fb5e1 Meta: Check for wast2json instead of wat2wasm
We use wast2json since 27905af9ec.
2026-09-17 08:53:54 -04:00
Sönke Holz da8d8f61f4 Meta: Correctly check if WebAssembly spec tests were generated
Since 27905af9ec we use wast2json, which writes the modules to
$SPEC_TEST.$INDEX.wasm. Before, we manually wrote them to
$SPEC_TEST_$INDEX.wasm.
2026-09-17 08:53:54 -04:00
Jose 9fff8b73b2 Tests/Kernel: Add a test for UDP datagram length validation
The test sends a datagram whose UDP Length is smaller than a UDP header
and one whose Length is larger than the IPv4 payload, followed by a
well-formed datagram. The two malformed datagrams must be dropped, and
the well-formed one must still be delivered.

Injecting a UDP header with an arbitrary Length requires a raw socket,
which is restricted to the superuser, so the test is installed setuid
root like the other privileged kernel tests.
2026-09-15 18:01:33 +02:00
Lucas Chollet 03220ee363 Meta+Ports: Move file downloading helpers to Meta
This will allow Toolchain's scripts to use the same logic. Note that we
use a symlink in the Ports directory so Meta/install-ports-tree.sh can
just copy the link's destination to have a working and self-contained
copy.
2026-09-10 10:01:18 +02:00
Lucas CholletandEduardo Casadei 73e32131bc Meta: Copy the content of symlink directories in install-ports-tree.sh
For symlinks targeting directories, `git ls-files` only lists the
symlink file and not the content of the targeted directory, so let
`rsync` go recursive on these.

This allows us to also install patches for binutils, gcc and llvm.

Co-authored-by: Eduardo Casadei <[email protected]>
2026-09-10 10:01:18 +02:00
Lucas Chollet c5653a7fc0 Meta: Use rsync in install-ports-tree.sh
This makes the script run a lot faster, ~250ms instead of 10s.
2026-09-10 10:01:18 +02:00
Andrew Kaster 3868242c36 Meta: Munge compile options to make C files not error out on Lagom
Some of our compile flags are C++/Objective-C++ only

For the flags that are used with GCC, wrap them in a 'cxx only'
macro to avoid passing them to a C compiler.
2026-09-06 19:06:52 -04:00
Linus Groh f5a8d96027 Ports+Meta: Update ca-certificates to 2026-08-13 2026-09-01 06:40:06 -04:00
Linus Groh 0e07e4983b Ports: Remove support for version='git'
Pointing to an arbitrary git branch is fundamentally at odds with hash
validation of the downloaded archive file; it may work if the upstream
repo is inactive but should never be relied on.

Additionally external projects consuming ports data benefit from a
unique version identifier, even if that's just a commit hash, e.g.:
https://github.com/repology/repology-updater/issues/1626
2026-08-24 20:06:03 -04:00
Lucas Chollet 55646d7c19 Tests: Add a general folder for Lagom compatible Kernel tests 2026-08-23 17:28:51 +02:00
Edwin Rijkee abebe39271 Meta: Use grid.png as wallpaper for Limine bootloader 2026-08-18 15:04:35 +02:00
Edwin Rijkee 731a2fe4e0 Meta: Upgrade the Limine bootloader to v12.5.2
- New config format, the old format is no longer supported
- Support for EXT2 is dropped in the new version, so the kernel now
  needs to be on the FAT32 partition
- The EFI system partition size has been adjusted to match the
  `build-image-grub-uefi.sh` script
- Limine no longer installs its BIOS stage 2 code into the empty space
  before the first partition, it now has its own BIOS boot partition
- Corrected the root= parameter to something that is at least
  correct if the root file system is on the first disk
- Added missing serial_debug parameter
2026-08-18 15:04:35 +02:00
Linus Groh 21c472aa1c Meta: Update to Unicode 17.0.0
Closes #26758.
2026-08-14 15:53:36 -07:00
Linus Groh 979d496758 Meta: Update cacert.pem to 2026-07-16 2026-08-09 14:21:05 +02:00
ratatatKE b2994de9c3 Meta: Load the x86_64 prekernel executable in debug-kernel.sh
debug-kernel.sh currently attempts to load "Prekernel64" as the
x86_64 prekernel executable.

However, the build system now produces "kernel_x86-64" instead,
causing GDB to fail to load the prekernel executable during
startup.

Load the generated executable so that prekernel debugging works
without manually adding the prekernel symbol file.
2026-07-29 20:58:47 +02:00
Andrew Kaster 08b69787e6 LibGUI+Applications: Rename Button::set_icon_from_{path,resource}
Rather than loading an absolute filepath in GML files, change the
setter for this property to use a resource path.

This results in a bunch of churn related to issue 22864, but does not
change any functionality.
2026-07-26 10:18:45 -04:00
Nico Weber 19e8f5ea00 MacVideoPlayer: Draw video at integer rect coordinates 2026-07-26 10:13:47 -04:00
Nico Weber f03adae364 MacPDF: Draw pages at their aspect ration instead of stretching them
MacPDF is just for hacking on LibPDF so I didn't put this in so far,
but I've spent enough time manually right-sizing PDFs :^)
2026-07-26 10:13:47 -04:00
Nico Weber 44d5e571df Everywhere: Use Rect::scaled_to_fit_within() and Rect::scaled_to_cover()
This is a slight behavior change in some places. Some places did

    (r.size().to_type<float>() * max(scale_x, scale_y)).to_type<int>();

After this commit, the semantics are now like `(...).to_rounded<int>()`,
that is we no longer sometimes omit a column or row in the fitted
direction.
2026-07-26 10:13:47 -04:00
Lucas Chollet e9ad2612ea Meta: Disable VM migration with QEMU
Migration is a QEMU feature that allows to change the host of a VM or to
do a snapshot. However, this feature prevents the x86_64's TSC to be
exposed as invariant, which will be required to make proper use of the
next commit.

Note that Linux guests don't seem to have a problem with using TSC with
migration=on. So if we ever want back the migration feature, there seems
to be a way to still use the TSC at the same time.

For the moment, disabling migration altogether is just simpler.
2026-07-26 12:06:38 +02:00