Commit Graph

5978 Commits

Author SHA1 Message Date
hannken 86c75e95c0 Adjust pc/npc before syscall allowing EJUSTRETURN to return
to the next instruction.  Only ERESTART should return to
the same instruction.  Differences to sparc64 reduced.

Test t_ptrace_wait:syscallemu1 now passes on sparc.

Fixes PR kern/52166 "syscallemu does not work on sparc (32-bit)"

Ok: Martin Husemann
2023-03-20 11:19:29 +00:00
kre 23edd9e279 Adjust the tilde expansion test to deal with (very) recent changes
to what the shell produces for tilde expansions, when the expansion
of the tilde prefix ends with '/' and the character immediately following
is another '/' - previously /bin/sh (and most other shells, but not all)
retained both slashes, and this test expected that behaviour.

No longer, now only one of the two will appear.  Adjust the expected
test results accordingly, and add an extra loop iteration to make sure
this is thoroughly tested (one more tilde expansion value).

Also, add two new test cases that test for the new (explicit - though
it was always stated this way, but not as explicitly) that if HOME is
an empty string (not unset - that remains an unspecified case, as it
was) then the expansion of ~ must generate "", and not nothing.
The current test was unable to distinguish those two, since it
simply looked for characters in the output, so add a new test cases
explicitly to test for this particular case.   This also means (also
previously in the standard, but not as explicitly) that shells are
not permitted to decide "The ~ expansion produces an empty string, that
is weird, let's generate something else instead" which some shells were
doing.
2023-03-06 05:54:54 +00:00
nia 188cf0e1a1 delete attribution per request of contributor 2023-03-01 21:06:41 +00:00
rillig eaf30a03e7 lint: split platform-specific test for loss of accuracy
Lint distinguishes between platforms where size_t is unsigned int and
platforms where size_t is unsigned long.
2023-02-27 23:07:53 +00:00
rillig 17f65f1e9a tests/lint: sync test for nonportable character comparisons
Message 230 was changed on 2023-02-22 but only tested on signed char
platforms.
2023-02-27 21:59:14 +00:00
sjg 68f52b2486 t_make skip varname-dot-make-meta-ignore_*
The meta-ignore tests will likely not work in this environment
so skip them.
2023-02-25 19:37:33 +00:00
rillig 6adfeb9415 lint: fix confusing message about nonportable character constants 2023-02-22 22:30:40 +00:00
rillig f29e29e219 tests/lint: add platform-specific tests 2023-02-22 22:12:35 +00:00
rillig 68d13a7aa7 lint: fix null pointer dereference in invalid case expression 2023-02-21 19:47:21 +00:00
christos 36c8de9256 New optval test from des @ FreeBSD 2023-02-20 15:47:56 +00:00
rillig 4995df0909 lint: do not warn about traditional C migration in C99 mode
For large integer constants, the resulting type could differ between
traditional C and C90. In C99 mode, this difference is no longer
relevant since it is too far away from traditional C.
2023-02-19 12:00:15 +00:00
rillig a44d0c3164 tests/lint: fix and extend tests for C90 migration warning 2023-02-19 11:50:29 +00:00
rillig 8ee241b006 lint: remove compat code for lexing hex floating point literals
Hex floating literals are required by C99.
2023-02-18 14:32:32 +00:00
andvar f231fa93bb s/plyaback/playback/ in comment. 2023-02-13 22:24:06 +00:00
rillig 15a1e93882 tests/lint: sync reference to platform properties generator 2023-02-06 21:20:58 +00:00
rillig 456342a5d0 lint: eliminate unnecessary indirection
No functional change.
2023-02-06 21:01:55 +00:00
rillig f1b2140bb8 tests/lint: fix source directory for looking up the .exp-ln files 2023-02-05 17:23:01 +00:00
rillig 6d1c4d2bf4 tests/lint1: the redundantly listed files contained .exp-ln as well 2023-02-05 16:11:56 +00:00
rillig d81c1a19b2 tests/lint: fix resolving of wildcards in builds from other directories 2023-02-05 15:11:19 +00:00
rillig cd59f013cc tests/lint: merge tests for initialization 2023-02-05 13:01:28 +00:00
rillig 6730036cf8 tests/lint: remove redundancy from Makefile
The list of test files is already kept in distrib/sets/lists/tests/mi.
2023-02-05 12:36:56 +00:00
rillig 134e5c5e76 tests/lint: remove redundant tests
The names of the tests were misleading: 'recursive' should have been
'nested', and the interesting topic in the 'cast' tests was not the cast
but the pointer dereference.
2023-02-05 12:25:11 +00:00
rillig 9de3085848 tests/lint: clean up
The .exp files are no longer kept under version control, so there's no
reason anymore to forcefully trigger a warning or an error.
2023-02-05 10:57:48 +00:00
christos e20f737644 PR/57205: Dag-Erling Smørgrav: Add tests strchrnul(3), fix strchr pasto
from strlen.
2023-01-30 19:49:49 +00:00
rillig e0bb9f7cf5 lint: properly clean up when leaving a function definition 2023-01-29 18:37:20 +00:00
rillig b5b35fa5a0 lint: fix definition of __func__ 2023-01-29 18:16:48 +00:00
rillig e80194217c lint: demonstrate wrong declaration of __func__ 2023-01-29 17:36:26 +00:00
rillig 2f05763014 lint: don't warn about negative '>>' when the actual value is positive 2023-01-29 17:13:10 +00:00
rillig 6b8b6837b1 tests/lint: merge tests for '>>' 2023-01-29 17:02:09 +00:00
rillig b4db8a2cd2 tests/lint: document how compilers promote bit-fields 2023-01-28 08:36:17 +00:00
rillig 93f3a70d97 tests/lint: investigate how compilers interpret bit-fields 2023-01-28 08:30:12 +00:00
rillig f25c712f32 tests/lint: merge tests for declaration after statement 2023-01-22 17:17:24 +00:00
rillig 0ad5a70976 lint: prevent undefined behavior for signed '<<'
Found by manual code inspection, verified by MKSANITIZER=yes
USE_SANITIZER=undefined.
2023-01-22 16:05:08 +00:00
rillig a695cd72f6 lint: add test for floating constant overflow 2023-01-21 17:48:29 +00:00
rillig 798c690d94 lint: add support for C11 '_Atomic' as atomic-type-specifier
Following the C11 grammar, the keyword '_Atomic' needs to be a separate
syntactic category, to avoid further conflicts in the grammar.

The two newly added conflicts in the grammar would come into play when
mixing traditional C with C11, in a type name without an implicit 'int'.
If the type '_Atomic(int)*' were parsed as '_Atomic int(int)*', the
trailing '*' would be a syntax error.
2023-01-21 13:48:40 +00:00
rillig e104b7676c lint: add support for the C11 type qualifier '_Atomic'
That keyword can be used as a type specifier as well, support for that
will be added later.
2023-01-21 13:07:21 +00:00
rillig 149d92727c tests/lint: test _Atomic, added in C11 2023-01-21 11:57:03 +00:00
rillig 5db76b35c9 lint: fix null pointer dereference on invalid argument to __typeof__ 2023-01-21 08:04:43 +00:00
rillig d67dd6957e tests/make: rename files that are not test cases 2023-01-19 23:26:14 +00:00
rillig f523563840 tests/lint: fix typo in comment 2023-01-16 00:37:59 +00:00
rillig 66827794fe tests/lint: add basic tests for lint (not lint1 or lint2) 2023-01-15 23:18:05 +00:00
rillig 8e78cfd5a6 tests/lint: document conversion from void pointer 2023-01-15 14:00:09 +00:00
rillig 687f4c966a tests/lint: fix test for sizeof with variable-length array 2023-01-15 13:55:06 +00:00
rillig f0df5ddf92 tests/lint: add more tests for sizeof 2023-01-15 13:30:04 +00:00
rillig 7997ddce85 tests/lint: add test for parsing sizeof expressions 2023-01-15 00:53:19 +00:00
rillig a5ae950d72 tests/lint: add more tests for array/enum mismatch 2023-01-14 11:15:07 +00:00
rillig 0f2ef2d80b lint: rename lint2 functions to be more expressive 2023-01-14 08:48:18 +00:00
rillig 872114d0db lint: do not report usual arithmetic conversions for constants 2023-01-08 18:37:12 +00:00
rillig 12c5dc767e lint/tests: test query for usual arithmetic conversions 2023-01-08 18:21:00 +00:00
rillig 8c46ae662d lint: recognize enum constant named 'max' as a count of values
Seen in external/bsd/mdocml/dist/mdoc.h(50).
2023-01-08 15:22:33 +00:00