Commit Graph

6122 Commits

Author SHA1 Message Date
rillig 7511320300 tests/indent: demonstrate bugs when formatting preprocessing lines 2023-06-02 11:26:21 +00:00
andvar cb40c69b16 follow the steps of Andrew Doran (ad) commit and fix more s/loose/lose/ typos.
also s/beyound/beyond/ and few others along the way, mainly in comments.
2023-06-02 08:51:46 +00:00
riastradh 98256cacf3 ld.elf_so: Separately test eager and lazy resolution of def tls ptr.
eager: before loading use library
lazy: after loading use library

XXX pullup-10
2023-06-01 23:47:24 +00:00
riastradh e04ffa379b ld.elf_so: Shorter test names.
No functional non-cosmetic change intended.

XXX pullup-10
2023-06-01 22:26:51 +00:00
riastradh 6b7ae3bea1 ld.elf_so: Test TLS abuse of static def, dynamic use and vice versa.
XXX pullup-10
2023-06-01 22:26:40 +00:00
riastradh bc9d9d1143 ld.elf_so: Factor out logic in TLS tests to make writing more easier.
No functional change intended.

XXX pullup-10
2023-06-01 22:24:52 +00:00
riastradh 05e97b5a42 ld.elf_so: Test extern dynamic TLS too.
XXX pullup-10
2023-06-01 20:50:18 +00:00
riastradh f4e155a450 ld.elf_so: Test variations on PR toolchain/50277.
XXX pullup-10
2023-06-01 20:48:30 +00:00
riastradh fca22ba5cb ld.elf_so: Nix inadvertently committed private test program. 2023-05-31 01:06:43 +00:00
riastradh 111bb99c35 ld.elf_so: Fix extern TLS test to match PR toolchain/50277.
Now it's actually testing the problem.
2023-05-31 00:46:11 +00:00
riastradh 12037d6a69 ld.elf_so: New test for extern initial-exec TLS, PR toolchain/50277.
XXX pullup-10
2023-05-31 00:18:44 +00:00
hannken b3a4996943 Add RUMPHIJACK option "blanket=/DEV" so mount_ffs may canonicalise
and mount the device path.  Cannot use "/rump/DEV" here as the device
path is embedded in "struct ufs_args" where it doesnt get hijacked.
2023-05-28 08:17:00 +00:00
christos 562596981f match the new compiler warning 2023-05-24 20:02:34 +00:00
christos c59fd10753 no more md5 for you. 2023-05-24 18:22:05 +00:00
rillig e9b5780b33 indent: fix indentation of struct declarations 2023-05-23 16:53:57 +00:00
rillig fadc996fc6 indent: fix spacing around '*' in declarations 2023-05-23 06:43:19 +00:00
rillig 756425c686 indent: fix spacing in declarations in for loops 2023-05-23 06:35:01 +00:00
rillig 3368225913 tests/indent: add code snippets found in make and lint1 2023-05-23 06:18:00 +00:00
rillig 8bd40c7adb indent: fix spacing between block braces 2023-05-22 23:03:16 +00:00
rillig 9bf982382f tests/indent: refine a few tests 2023-05-22 23:01:27 +00:00
rillig 27a3cefcf0 tests/lint1: allow whitespace in files containing the expected output
This reduces the amount of wizardry needed to interpret the files.  For
a more gentle introduction of the file format, see ../lint2/msg_000.ln.

The whitespace that is removed is very similar to the one in the lint2
tests, the difference is that '%<space>' and '%#' need to be preserved
in abbreviated printf and scanf format strings.
2023-05-22 20:11:24 +00:00
rillig 960cfb1b4e lint: fix emitted type for arrays of unknown size 2023-05-22 17:53:27 +00:00
rillig f14ab694cd lint: rename constant NOTSPEC to NO_TSPEC
It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.
2023-05-22 12:55:04 +00:00
rillig 9379c1663f tests/lint: demonstrate wrong emitted array length in initialization
Seen in usr.bin/indent/debug.c, in the various 'name' arrays.
2023-05-22 11:51:46 +00:00
rillig b95ee04d96 indent: implement suppressing optional blank lines 2023-05-22 10:28:59 +00:00
rillig 0df62e5bf6 tests/indent: skip creating an intermediate file in tests 2023-05-22 06:35:56 +00:00
andvar e7745f3aff s/thar/that/ in comments. 2023-05-21 18:01:38 +00:00
rillig c99fb69e72 tests/indent: fix outdated or wrong comments 2023-05-21 10:18:44 +00:00
rillig 4779b6fb88 indent: don't error out on unrecognized preprocessor directives
This allows indent to be used on the GCC preprocessor output.
2023-05-21 09:48:22 +00:00
rillig 89b72942a5 tests/indent: prevent 'indent end' with arguments 2023-05-20 22:08:07 +00:00
rillig a9183f83be tests/indent: migrate test driver from AWK to Lua
Lua reports more details when os.execute fails, which is useful when
running old versions of indent for comparison.  The new test driver also
supports multiple test files in the same run.
2023-05-20 21:32:05 +00:00
rillig 04185e831b tests/indent: clean up test driver
No functional change.
2023-05-20 17:31:53 +00:00
rillig fe2fb3c8db indent: don't insert blank line between two closing lines 2023-05-20 12:05:01 +00:00
rillig 5a9a628018 indent: implement blank line above block comment 2023-05-20 11:19:17 +00:00
rillig 1764a17f2c indent: implement blank line after function body 2023-05-20 10:46:21 +00:00
rillig c7613eff0b indent: ensure that no blank lines are inserted in INDENT OFF mode
No blank lines were inserted previously, but the code looked
suspicious as if that were possible.
2023-05-20 10:25:47 +00:00
rillig 4d19140d48 indent: implement blank lines around conditional compilation 2023-05-20 10:09:02 +00:00
rillig 895746d7ed tests/indent: test multi-line comments with -ncdb 2023-05-19 07:05:26 +00:00
rillig d46fdfe393 indent: document the funcname token 2023-05-18 08:09:28 +00:00
rillig 2d18db1bfc indent: manually wrap overly long lines
No functional change.
2023-05-18 05:33:27 +00:00
gutteridge b1f970ed17 t_ptm.c: add a test case that passes extra flags
Validate that O_NONBLOCK and O_CLOEXEC are actually set by
posix_openpt(3), as until circa 9.99.101 they were not.

If/when other flags are added like close-on-fork, this test could be
adjusted. The current concern is with supporting the expectations of
components like vte3, used by various graphical terminal clients.
2023-05-17 03:16:11 +00:00
rillig 81c7fd789d indent: remove support for form feed characters inside a line
Form feeds are occasionally used to split code into pages, and this use
is still supported.  Having a form feed in the middle of a line is
exotic.
2023-05-16 11:32:01 +00:00
rillig db245c79a9 indent: remove blank between comment and parentheses or brackets
Finally, indent formats its own source code without messing up the
layout.
2023-05-16 08:22:11 +00:00
rillig c5b428c7c1 indent: fix handling of INDENT OFF/ON comments
Previously, the 'INDENT OFF' comments were interpreted when the newline
token from the line above the comment was processed, which was earlier
than could be reasonably expected.

The 'INDENT ON' comments were interpreted equally early, which led to
the situation that the 'INDENT OFF' comments were preserved literally
but the 'INDENT ON' comments weren't.
2023-05-16 08:04:03 +00:00
rillig 70c3f641d2 indent: fix detection of casts
A word followed by a '(' does not start a cast expression.
2023-05-15 21:51:45 +00:00
rillig 62d29170f1 indent: fix type cast in function definition 2023-05-15 20:50:37 +00:00
rillig a59ea3192b indent: fix duplicate space between comment and binary operator 2023-05-15 20:30:20 +00:00
rillig 2aaa93dadf indent: fix line wrapping of comments to the right of code 2023-05-15 19:55:51 +00:00
rillig 219ccf6233 indent: improve type guessing, fix formatting of declarations 2023-05-15 18:22:40 +00:00
rillig 3357d7dc84 tests/indent: test type detection 2023-05-15 17:51:49 +00:00