Commit Graph

9547 Commits

Author SHA1 Message Date
ryo
7c39e4802c add dts for odroid-N2 plus 2021-01-02 11:36:36 +00:00
rillig
a0a15c1464 lint: add a test for each message produced by lint1
Having a test for each message ensures that upcoming refactorings don't
break the basic functionality.  Adding the tests will also discover
previously unknown bugs in lint.

The tests ensure that every lint message can actually be triggered, and
they demonstrate how to do so.  Having a separate file for each test
leaves enough space for documenting historical anecdotes, rationale or
edge cases, keeping them away from the source code.

The interesting details of this commit are in Makefile and
t_integration.sh.  All other files are just auto-generated.

When running the tests as part of ATF, they are packed together as a
single test case.  Conceptually, it would have been better to have each
test as a separate test case, but ATF quickly becomes very slow as soon
as a test program defines too many test cases, and 50 is already too
many.  The time complexity is O(n^2), not O(n) as one would expect.
It's the same problem as in tests/usr.bin/make, which has over 300 test
cases as well.
2021-01-02 10:22:42 +00:00
ryo
891e9034bd revert http://mail-index.netbsd.org/source-changes/2021/01/01/msg125648.html
FYI: http://mail-index.netbsd.org/source-changes-d/2021/01/01/msg013085.html
2021-01-02 08:38:55 +00:00
nat
bfa1e92456 Update the debug set for testpat(6). 2021-01-02 03:41:06 +00:00
nat
268f30338f Add testpat(6) to the games set. 2021-01-02 03:24:01 +00:00
rillig
59e2f0df9e lint: demonstrate bug in handling of nested C9X struct initializers 2021-01-01 16:50:47 +00:00
ryo
34121d2a3c add dts for odroid-N2 plus.
meson-g12b-odroid-n2-plus.dts of linux is not optimized for the odroid-N2plus CPU clock.
and the dts for odroid-n2-plus in the hardkernel repository is  significantly changed,
so cannot be imported without modification. Therefore, a simple meson-g12b-odroid-n2-plus.dts
has been added based on "meson-g12b-odroid-n2.dts" with only the cpu_opp_table and
regulator table changed.
2021-01-01 07:41:46 +00:00
rillig
e93292def1 lint: fix segmentation fault when checking returned enum types (211) 2021-01-01 01:07:07 +00:00
rillig
ee607e0b85 lint: check that in "if (cond)", cond is scalar 2020-12-31 18:51:28 +00:00
rillig
d81f96abfb make(1): add test for error handling and expansion in .for loops 2020-12-31 03:05:12 +00:00
rillig
4c09bc6956 make(1): add test for .endfor without corresponding .for 2020-12-30 14:50:08 +00:00
rillig
f4b4e8b893 lint: add test for old style function arguments 2020-12-30 13:15:07 +00:00
martin
5662516c24 Add /var/db/obsolete/xdebug 2020-12-29 17:53:08 +00:00
martin
213b42bc0d Mark resize debug info as obsolete 2020-12-29 12:43:36 +00:00
rillig
c182aecfbc make(1): add test that explains how variables are exported
Exporting the variables at the right time and with the correct values is
a subtle issue.  The current implementation carefully marks variables as
ready to be exported, then exports them and at the same time tries to
export as few variables as possible, to avoid memory leaks.  This test
describes and explains how all this works in detail.

This test also justifies that the call to Var_ReexportVars happens in
the make process itself, not in the child processes, no matter whether
these are created with vfork or (only theoretically) with plain fork.
This has changed in compat.c 1.217, job.c 1.390 and main.c 1.504 from
2020-12-27.
2020-12-29 01:45:06 +00:00
martin
6f4eaa13f9 Add resize 2020-12-28 14:28:54 +00:00
rillig
b435f5a0e0 lint1: add forgotten tests 2020-12-28 12:47:39 +00:00
rillig
b94ceb4d46 lint1: fix file list for recently added test output 2020-12-28 11:40:54 +00:00
reinoud
ef6e52b452 Import Xterm's resize(1) for querying (x)terminal sizes in base for headless
clients
2020-12-27 21:13:17 +00:00
rillig
0134a24c0d make(1): add test for expansion errors in jobs mode
Since compat mode and jobs mode are implemented separately and vary in
lots of small details, each of them needs to be tested on its own.
2020-12-27 05:11:40 +00:00
rillig
8dfbff51e9 make(1): add test for null byte in .for loop body 2020-12-19 16:00:17 +00:00
rillig
e8319c8295 make(1): demonstrate wrong line numbers in .for loops, since 2007-01-01 2020-12-19 12:14:59 +00:00
rillig
22b3e4f8b0 make(1): add test for parsing the end of a condition 2020-12-14 20:23:49 +00:00
rillig
6d3aa3c8ae make(1): demonstrate wrong error handling in compat mode 2020-12-13 17:44:31 +00:00
rillig
7b010c3449 make(1): add test for misspelled directives
This test allows the other directive-* tests to focus on the purpose of
the individual directive, allowing these tests to continue after
parsing, without errors.
2020-12-13 00:46:25 +00:00
roy
fccfea72eb t_ossaudio was installed for clang, so remove gcc marking 2020-12-13 00:37:43 +00:00
rillig
e667d310c7 make(1): add test for a shell with error control
None of the predefined shells has error control, and the corresponding
code had not been covered by the existing unit tests.
2020-12-12 15:06:11 +00:00
pgoyette
803bf850bc Also add the new test to the sets lists. 2020-12-12 03:03:14 +00:00
rillig
57bbdba1d0 make(1): test all combinations of switches for running commands
The code in JobPrintSpecials is rather complicated and contains
surprising interaction between some of the switches.

To see the exact effects of the switches, record the current state and
its output, to prevent accidental breakage during the upcoming
refactorings.
2020-12-10 17:06:13 +00:00
rillig
c179784be7 make(1): add test for the -n option combined with RunFlags 2020-12-09 07:57:51 +00:00
rillig
32df21f05a make(1): add test for combining -j1 with -n 2020-12-09 00:25:00 +00:00
rillig
1e55774c0d make(1): add tests and tutorial for the ?= assignment operator 2020-12-07 21:35:43 +00:00
rillig
bcc992c684 make(1): add new unit test opt-keep-going-multiple.mk to file lists 2020-12-07 07:51:25 +00:00
rillig
abd175cf7f make(1): add test for .END after failed main node 2020-12-06 21:22:04 +00:00
christos
a7527d8eca bump libssh 2020-12-04 18:43:47 +00:00
christos
3b4019a6e5 new libfido2 2020-12-04 18:27:18 +00:00
rillig
583d8bd566 make(1): add test and tutorial for indirect modifiers 2020-12-01 22:16:36 +00:00
rillig
71bfc5d9d5 make(1): add test for the special .MAKEFLAGS variable 2020-12-01 20:37:30 +00:00
rillig
c6ea76207f make(1): add tests for suppressing "stopped in"
These tests demonstrate the unwanted behavior described in PR bin/55578
and PR bin/55832.
2020-12-01 17:50:04 +00:00
sjg
25f0e79eda Added meta-cmd-cmp 2020-11-30 21:36:52 +00:00
rillig
2e03ddb408 make(1): add test for bug in error handling of .BEGIN in -k mode 2020-11-24 19:02:59 +00:00
rillig
b4eade63ff make(1): add test for error in dependency of .END node in -k mode 2020-11-24 17:59:42 +00:00
rillig
c0b7bdab99 make(1): add test for missing "Stop" after error in .END 2020-11-24 15:36:51 +00:00
rillig
69e871d024 make(1): test that .PHONY targets are not resolved using suffix rules 2020-11-23 15:00:32 +00:00
martin
9b9b5e208c Add /dev/pts as standard mountpoint for a ptyfs. 2020-11-23 12:41:47 +00:00
rillig
fde9046190 make(1): add test for debug output from transformation rules 2020-11-22 23:45:20 +00:00
rillig
6bfc267595 make(1): add another unit test for suffix handling 2020-11-22 20:36:17 +00:00
rillig
43adeab6ec make(1): document the selection of the main target 2020-11-22 19:37:27 +00:00
rillig
27b9e4c5e6 make(1): add test for incomplete transformation rule 2020-11-21 10:32:42 +00:00
rillig
f40c84018a make(1): add test for self-referencing suffix rule
Just to ensure that make doesn't run into an endless loop.
2020-11-16 15:12:16 +00:00