Commit graph

17399 commits

Author SHA1 Message Date
Andreas Kling 4d006de2b9 Kernel: Fix build with IO_DEBUG 2021-03-01 16:07:50 +01:00
Andreas Kling 272c2e6ec5 Kernel: Use Userspace<T> in sys${munmap,mprotect,madvise,msyscall}() 2021-03-01 15:53:33 +01:00
Andreas Kling bebceaa32c Kernel: Use Userspace<T> in sys$select() 2021-03-01 15:07:01 +01:00
Andreas Kling a1a82c1d95 Kernel: Use Userspace<T> in sys$get_dir_entries() 2021-03-01 15:04:31 +01:00
Andreas Kling b5f32be577 Kernel: Use Userspace<T> in sys$get_stack_bounds() 2021-03-01 14:50:36 +01:00
Andreas Kling 122c7b6cbb Kernel: Use Userspace<T> in sys$write() 2021-03-01 14:35:06 +01:00
Andreas Kling 6a6eb8844a Kernel: Use Userspace<T> in sys$sigaction()
fuzz-syscalls found a bunch of unaligned accesses into struct sigaction
via this syscall. This patch fixes that issue by porting the syscall
to Userspace<T> which we should have done anyway. :^)

Fixes #5500.
2021-03-01 14:06:20 +01:00
Andreas Kling 261b30e120 Kernel: Detach any attached thread tracer on sys$abort() 2021-03-01 13:57:20 +01:00
Andreas Kling ac71775de5 Kernel: Make all syscall functions return KResultOr<T>
This makes it a lot easier to return errors since we no longer have to
worry about negating EFOO errors and can just return them flat.
2021-03-01 13:54:32 +01:00
Andreas Kling 9af1e1a3bf LibVT: New terminal cells should be filled with whitespace, not '\0' 2021-03-01 11:37:22 +01:00
Idan Horowitz 147d30ae4f Spreadsheet: Implement the cut operation for cells
This is done by adding another field to our custom
text/x-spreadsheet-data mime-type that specifies the
action (just copy/cut for now)
2021-03-01 11:37:02 +01:00
ry755 b474f49164 TextEditor: Add a command line option to jump to a specific line number 2021-03-01 11:18:14 +01:00
Brian Gianforcaro e60d394b32 test-web: Utilize new LibTest types from test-web
test-web has alot of similar code to test-js, so
re-use some of the types we already pulled out
into LibTest.
2021-03-01 11:17:05 +01:00
Brian Gianforcaro 0a49877fdc LibTest + test-js: Add initial skelaton of LibTest and migrate code there.
The test-js reporter is arguably the nicest test runner / reporter that
exists in the serenity code base. To the goal of leveling up all the
other unit test environments, start a new LibTest library so that we
can share code and reporting utilities to make all the test systems
look and behave similarly.
2021-03-01 11:17:05 +01:00
speles 0b5ca28475 FileManager: Focus on file when opening file's location from Properties 2021-03-01 11:16:18 +01:00
speles e964d238b8 FileManager+LaunchServer: Add launching FileManager with focus on file 2021-03-01 11:16:18 +01:00
speles aa9c5d4418 LibGUI: Add possibility to search for exact match in model 2021-03-01 11:16:18 +01:00
speles dff31d5885 LaunchServer: Make spawn() helper accept arguments list 2021-03-01 11:16:18 +01:00
Jean-Baptiste Boric 8dca96fb61 LibWeb: Provide file name to JavaScript interpreter 2021-03-01 11:14:36 +01:00
Jean-Baptiste Boric 6172cb3599 LibJS: Keep track of current AST node inside the call stack 2021-03-01 11:14:36 +01:00
Jean-Baptiste Boric 0039ecb189 LibJS: Keep track of file names, lines and columns inside the AST 2021-03-01 11:14:36 +01:00
Brian Gianforcaro 007b6edce4 Profiler: Print addresses as pointers in new Samples view
The previous formatting was missing the "0x" prefix.
2021-03-01 11:12:53 +01:00
Andrew Kaster e8fd53c247 Base: Add test-math to set of tests run on CI
It currently fails though :( Likely contributes to innacuracies in LibJS
tests as well.
2021-03-01 11:12:36 +01:00
Andrew Kaster 669b6c43aa AK/Lagom: Modify TestSuite to return how many tests failed from main
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-01 11:12:36 +01:00
Tom 5b1edc0678 Meta: Allow specifying custom grub config file for build-image-grub.sh
This allows passing a custom grub config file as second argument to
build-image-grub.sh.
2021-03-01 11:11:56 +01:00
Tom cdbd878a14 Kernel: Fix APIC timer calibration to be more accurate
We were calibrating it to 260 instead of 250 ticks per second (being
off by one for the 1/10th second calibration time), resulting in
ticks of only ~3.6 ms instead of ~4ms. This gets us closer to ~4ms,
but because the APIC isn't nearly as precise as e.g. HPET, it will
only be a best effort. Then, use the higher precision reference
timer to more accurately calculate how many ticks we actually get
each second.

Also the frequency calculation was off, causing a "Frequency too slow"
error with VMware.

Fixes some problems observed in #5539
2021-03-01 11:11:09 +01:00
Paweł Łukasik f66adbdd95
Meta: Use ninja instead of make in the WSL docs (#5575)
Co-authored-by: Paweł Łukasik <lukasik.pawel@gmail.com>
2021-03-01 11:10:50 +01:00
Tom b4c1b96d96 Kernel: Fix scrolling up in VMware
The mouse wheel delta is provided as a signed 8 bit value.
2021-03-01 11:10:10 +01:00
Luke 152af3a297 LibAudio: Move format and BPS checks before VERIFYs in WAV loader
It was accidentally checking the format/bits per sample too late,
which would crash with the assertion.
2021-03-01 11:09:09 +01:00
Luke 69df86c1d6 LibAudio: Use handle_any_error in WAV loader
It was using has_any_error, which causes an assertion failure when
destroying the stream. Instead, use handle_any_error, as the
WAV loader does handle errors.
2021-03-01 11:09:09 +01:00
Luke a66f96ff62 Lagom/Fuzzers: Add WAV fuzzer 2021-03-01 11:09:09 +01:00
Torben Thaysen a723a97750 LibGUI: Implemented line wrapping for new spanned text drawing 2021-03-01 09:16:07 +01:00
Torben Thaysen b76d2450fa LibGUI: drawing spanned text no longer *horribly* inefficient
This makes drawing text with spans a lot faster.
The previous implentation went character by character and then
checked every span whether it contained the current character.

This implentation asumes that the spans are sorted and goes span by
span drawing all the characters contained at once.
Any spans that are out of order will be ignored!

Note: text wrapping is not (yet) supported
2021-03-01 09:16:07 +01:00
Mițca Dumitru 00ef931f79 LibC: Implement fenv.h 2021-03-01 09:14:26 +01:00
Adam Hodgen 53c4be926b LibWeb: Set link cursor via the default CSS
This removes the custom handling of cursor for the link element, which
also allows overriding the cursor on a link element via CSS
2021-02-28 18:19:52 +01:00
Adam Hodgen bedcd9cd88 LibWeb: Support setting the cursor in OutOfProcessWebView 2021-02-28 18:19:52 +01:00
Adam Hodgen fc9225db33 LibWeb: Call page_did_request_cursor_change with CSS cursor 2021-02-28 18:19:52 +01:00
Adam Hodgen e169e24104 LibWeb: Parese the CSS "cursor" property 2021-02-28 18:19:52 +01:00
Andrew Kaster a375133cc5 CI: Allow run step of on target tests to fail
As documented in #5541, there are some Kernel issues that can
sporadically cause the test run to fail. Add continue on error with a
loud comment to let readers know what the issue(s) might be.
2021-02-28 18:19:37 +01:00
Andrew Kaster dc6485cfcb LibRegex: VERIFY that string builder in print_header is not null.
I don't know why g++ thinks this is the case with
ENABLE_ALL_DEBUG_MACROS when building for serenity. Adding an assert to
placate it seems reasonable
2021-02-28 18:19:37 +01:00
Andrew Kaster 87a47de613 Documentation: Add RunningTests document
This page explains how to run host tests with Lagom and on-target tests
with run-tests-and-shutdown.sh
2021-02-28 18:19:37 +01:00
Andrew Kaster 611bbc43be Base/CI: Boot serenity in CI in a mode that runs tests on target
Build a new version of Serenity in CI that doesn't have all the debug
symbols on, or we'd be waiting a very long time to boot.

Insert a TestRunner entry into SystemServer.ini that will run a shell
script that runs tests in /bin and /usr/Tests and shuts down the system
in the new self-test boot mode. Also make sure enough basic services are
started in self-test such that the tests will actually run properly.
2021-02-28 18:19:37 +01:00
Andrew Kaster 5046213556 Kernel: Add self-test boot mode, an alias for text mode
Add a special boot mode for running tests, rather than using the system
as a general purpose OS. We'll use this in SystemServer to specify
only services needed to run tests and exit.
2021-02-28 18:19:37 +01:00
Andrew Kaster ca8319f800 Meta: Add run target for CI
This invocation of qemu has no VGA, no sound, no graphics, debug output
going to a file, and defaults to printing /dev/ttyS0 to stdout.
2021-02-28 18:19:37 +01:00
Andrew Kaster c2d8b8ec14 Userland: Don't leak buffer from getline in shuf program
Probably doesn't matter too too much since the program exits almost
immediately after, but there's the principle of the thing to consider.
2021-02-28 18:19:37 +01:00
Andrew Kaster 2930014c2a Shell: Remove WAITID_ONCE workaround
This hashmap is no longer necessary, and the shell works just fine
without it now. Remove the conditionally compiled code.
2021-02-28 18:19:37 +01:00
Andrew Kaster 8fc862f710 Userland: Install shell tests on Serenity
Also make them runnable anywhere. Previously they required $PWD to be
the directory containing test-commons.inc, and for $PWD to be writable.
2021-02-28 18:19:37 +01:00
Andrew Kaster e787738c24 Meta: Build AK and LibRegex tests in Lagom and for Serenity
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-28 18:19:37 +01:00
Ben Wiederhake 860a3bbce3 Kernel: Use default con/de-structors
This may seem like a no-op change, however it shrinks down the Kernel by a bit:
.text -432
.unmap_after_init -60
.data -480
.debug_info -673
.debug_aranges 8
.debug_ranges -232
.debug_line -558
.debug_str -308
.debug_frame -40

With '= default', the compiler can do more inlining, hence the savings.
I intentionally omitted some opportunities for '= default', because they
would increase the Kernel size.
2021-02-28 18:09:12 +01:00
Idan Horowitz 2dea887e8f Base: Add mktemp(1) man page 2021-02-28 15:30:49 +01:00