Commit graph

19968 commits

Author SHA1 Message Date
Brian Gianforcaro
4b8b8b91c2 LibTest: Convert Crash test runner to outln(..) 2021-05-08 00:04:10 +01:00
Brian Gianforcaro
7f51754780 LibTest: Expose new EXPECT_CRASH(..) macro for unit test assertions
Utilize the Crash type we imported into LibTest to support testing
of crash scenarios when testing all other components.
2021-05-08 00:04:10 +01:00
Brian Gianforcaro
7e28ecc305 Meta + Lagom: Fix paths after movement of tests to Tests/
Not sure how this didn't cause a build break when I originally
moved them in #6891. Better fix them now.
2021-05-08 00:04:10 +01:00
Brian Gianforcaro
1162e71a5c Meta: Remove AK/Tests from check-newlines-at-eof.py
The json file was removed a while back, and now AK/Tests has been
moved to Tests/AK. So this is wrong and out of date in every way.
2021-05-08 00:04:10 +01:00
Brian Gianforcaro
4c0d3f47e1 LibTest: Move Crash testing facility from crash.cpp to LibTest 2021-05-08 00:04:10 +01:00
Brian Gianforcaro
9720ad3901 Tests: Move Userland/Utilities/test-js to Tests/LibJS 2021-05-08 00:04:10 +01:00
Brian Gianforcaro
b390554ad8 Tests: Move Userland/Utilities/test-web to Tests/LibWeb 2021-05-08 00:04:10 +01:00
Idan Horowitz
284730c002 Utilities: Use GzipDecompressor::describe_header for gzip descriptions 2021-05-07 23:22:07 +02:00
Idan Horowitz
2119e0fb3f LibCompress: Add a method that describes a Gzip Header
This can be used to display information about a gzip file that is
stored in it's header.
2021-05-07 23:22:07 +02:00
Tobias Christiansen
1b6824d296 LibWeb: Make frames nesting-aware and disallow deep nesting
A Frame now knows about its nesting-level.

The FrameLoader checks whether the recursion level of the current
frame allows it to be displayed and if not doesn't even load the
requested resource.

The nesting-check is done on a per-URL-basis, so there can be many many
nested Frames as long as they have different URLs.
If there are however Frames with the same URL nested inside each other
we only allow this to happen 3 times.

This mitigates infinetely recursing <iframe>s in an HTML-document
crashing the browser with an OOM.
2021-05-07 22:34:34 +02:00
Valtteri Koskivuori
9e49895bbf Userland: Fix some weird syntax in find
Spotted this while trying to fix a bug. clang-format approved.
2021-05-07 22:29:19 +02:00
Linus Groh
867072c7d8 Meta: Improve man.serenityos.org titles and link names
Index page:
- Change links from "Man 1" to "Section 1"

Section index pages:
- Change title from "1" to "Section 1 - SerenityOS man pages"
- Change links from "foo" to "foo(1)"

Man pages:
- Change title from "foo" to "foo(1) - SerenityOS man pages"
2021-05-07 22:28:33 +02:00
Egor Ananyin
d2b6148787 LibWeb: Make painting order more spec-compliant
Now our painting order inside stacking contexts is closer to the
algorithm specified by CSS 2.1 (see section 9.9 and Appendix E)
2021-05-07 22:27:48 +02:00
Valtteri Koskivuori
33af7075e7 Userland: Remove extra slashes from find output
I noticed while testing `find` that the output of `find` contains extra
forward slashes if the root path has a trailing slash. This patch fixes
that issue by passing the root path through LexicalPath before
proceeding.
2021-05-07 22:25:39 +02:00
Andreas Kling
406c876fce LibCore: Remove Core::IODevice::printf() 2021-05-07 22:11:50 +02:00
Andreas Kling
c7e5ef3057 strace: Stop using Core::IODevice::printf()
There are no other clients of this weird API, so let's get rid of it.
Now that we call IODevice::write() instead, we can also handle errors.
2021-05-07 22:06:58 +02:00
Andreas Kling
05dbf3891a LibCrypto: Fix a mistake in appendff() conversion 2021-05-07 21:57:29 +02:00
Linus Groh
c989550c09 Help: Add "Help" menu and move the about action there 2021-05-07 20:37:28 +01:00
Linus Groh
83d980ab9e Chess+Help: Remove erroneous ampersand from app name
This is not applicable here, the alt shortcut is set elsewhere.
2021-05-07 20:37:28 +01:00
Andreas Kling
834b6508d7 AK: Remove StringBuilder::appendf()
All users have been converted to using AK::Format via appendff().
2021-05-07 21:12:09 +02:00
Andreas Kling
730ed465fe LibMarkdown: Convert StringBuilder::appendf() => AK::Format
These are the last ones in the codebase. :^)
2021-05-07 21:12:09 +02:00
Andreas Kling
32080452e3 LibX86: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
977fa4df81 Utilities: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
e2ffd14e4e WidgetGallery: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
c1967fca0d LibLine: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
c7e9b6d00f LibWeb: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
eb05931ab5 LibGfx: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
f0687dbbb7 Services: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
8c3b603da3 Shell: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
ea027834df LibELF: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
79ff1902aa LibRegex: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
840b908c0b Applications: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
8d5eb075d8 LibGUI: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
5b87276841 LibDiff: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
f1c6288803 LibC: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
72259d5cee LibJS: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
e76956f712 LibCrypto: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
c2a8869c1f LibGemini: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
24c149b013 LibCore: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:08 +02:00
Mart G
cab6155254 Kernel: Allow Ext2FSInode::write_bytes calls with a byte count of zero
write_bytes is called with a count of 0 bytes if a directory is being
deleted, because in that case even the . and .. pseudo directories are
getting removed. In this case write_bytes is now a no-op.

Before write_bytes would fail because it would check to see if there
were any blocks available to write in (even though it wasn't going to
write in them anyway).

This behaviour was uncovered because of a recent change where
directories are correctly reduced in size. Which in this case results in
all the blocks being removed from the inode, whereas previously there
would be some stale blocks around to pass the check.
2021-05-07 21:11:55 +02:00
Linus Groh
db06b106ae Meta: Fix error in lint-ports.py
The data structures here were changed from sets to dicts at some point,
with the sets now having different names - this would crash trying to
subtract two dicts.
2021-05-07 20:08:45 +01:00
Mart G
bfce328ade Kernel: Set unused block pointers in ext2 inodes to zero
e2fsck considers all blocks reachable through any of the pointers in
m_raw_inode.i_block as part of this inode regardless of the value in
m_raw_inode.i_size. When it finds more blocks than the amount that
is indicated by i_size or i_blocks it offers to repair the filesystem
by changing those values. That will actually cause further corruption.
So we must zero all pointers to blocks that are now unused.
2021-05-07 20:13:00 +02:00
Valtteri Koskivuori
09ea57031f Base: Add manpage for file(1) 2021-05-07 16:29:58 +01:00
Linus Groh
336a79a452 Base: Consistently stylize arguments in man pages as inline code 2021-05-07 16:19:49 +01:00
Linus Groh
e37d9eabb1 file: Clean up mime type enumeration macro
- Improve naming
- Order alphabetically
- Remove duplicates
2021-05-07 15:43:23 +01:00
Linus Groh
2ddd2d0866 file: Remove unused static description strings 2021-05-07 15:43:23 +01:00
Linus Groh
d7446e05db file: Don't exit immediately after file open error
Instead just remember that a file failed to open, carry on and return 1
at the end.
2021-05-07 15:43:23 +01:00
Linus Groh
85a7dae391 file: Remove redundant value_or({}) 2021-05-07 15:43:23 +01:00
Linus Groh
a9fcdc767e file: Avoid some unnecessary string copies 2021-05-07 15:43:23 +01:00
Brian Gianforcaro
dd633b9dd1 Meta: Fix Fuzzers CMakeLists.txt and ReadMe.md to use CXX_COMPILER_ID
Previously the directions omitted that you have to specify
`-CMAKE_CXX_COMPILER` when building the Fuzzers. This
would cause all kinds of weird problems at compilation and
link time. You can't specify one or the other, they must
both be pointing at clang in order for things to work as
experted. Fix this by updating the documentation to specify
that the user should specify both the C and CXX compiler explicitly
to be safe, as well as forcing the cmake clang argument handling
to modify the CXX compiler variable instead of the C version.
2021-05-07 15:19:48 +01:00