Commit Graph

16635 Commits

Author SHA1 Message Date
rillig
0ec7a3ab6a lint: add test for triggering assertion failures in lint1 2021-01-10 18:06:38 +00:00
rillig
76d2ead3e0 lint: add test for treating _Bool as non-scalar type
This strict mode is not yet implemented.  The plan is to use it for
usr.bin/make, to get rid of the many possible variants of defining the
Boolean type in make.h.  These variants did find some bugs, but not
reliably so.  Using static analysis seems more promising for this.

In an early stage of developing this test, lint1 crashed in the enum
definition in line 213, where the node for the '?:' had been NULL.  This
can happen in other situations as well, such as with syntax errors, but
these should be rare, as lint is usually only run if the compiler has
accepted the source code.  Still, there should not be any assertion
failures while running lint1.
2021-01-10 17:43:46 +00:00
rillig
e107438c00 lint: demonstrate wrong handling of conversion to _Bool 2021-01-10 11:24:42 +00:00
uki
1c2777d6b9 Fix "build.sh syspkgs" build error 2021-01-09 02:40:44 +00:00
uki
4670c4d50e Rename man-util-* to comp-c-* 2021-01-08 09:41:24 +00:00
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
tsutsui
a52c876880 Add A1659A CRX framebuffer to "Supported hardware" list.
Also remove SGC support from "Unsupported hardware" list.
2020-12-23 17:57:17 +00:00
rin
f324396195 Fix fallout from mkimage rev 1.76.
For mkimage:

- Update "size" if auto-calculated.
- Use "dd bs=1" instead of non-portable "head -c".
- Some style nits.

For MD make_label() functions:

- Stop using "newsize" as image size in MB, use "size" instead.
2020-12-23 10:35:18 +00:00
riastradh
15867ac673 embedded/mkimage: Pad image with zeros to multiple of 4 MB plus 1 MB.
Otherwise, there may not be enough space after the ffs partition for a
gpt, leading to very confusing results.
2020-12-21 16:38:02 +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
tsutsui
562e3dda50 Fetch files via ftp using auto-fetching with URL per each binary set.
On slower machines, it takes more than five minutes to get a large
set binary and it could cause timeout of ftp control session, so
getting multiple binary sets in a single ftp session always fails.

Briefly tested on HP 9000/425e with 9.1 tree and ftp.netbsd.org binaries.
No particular comments on tech-install@ and port-hp300@.

Maybe should be pulled up to netbsd-9.
2020-12-12 05:23:21 +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
tsutsui
898b1f3481 Inform the default installation directory in the official ftp server. 2020-12-05 18:57:21 +00:00
tsutsui
5f7aa7d27b Use proper release version strings ("9.1" rather than "91") in banners.
Also define and use "MACHINE" variable to describe port names
(no uname(1) or sysctl(8) in miniroot binary list by default).

I guess the short format like "91" by ${DISTRIBREV} was used only
for split sets for floppies in 1990's releases.

Worth to pullup to netbsd-9.
2020-12-05 18:52:06 +00:00
tsutsui
865f9b84f3 Explicitly sort set names fetched via ftp nlist.
Several binary sets are stored as symbolic links on releases and
it seems some ftpd doesn't sort nlist outputs by name in such case.

Worth to pullup to netbsd-9 and netbsd-8.
2020-12-05 18:33:47 +00:00
tsutsui
15362761dc Appease awk warnings on suppressing dmesg timestamps.
> awk: warning: escape sequence `\[' treated as plain `['
>  source line number 1
>  context is
>         { h=$0; >>>  gsub("^[ <<<
> awk: warning: escape sequence `\]' treated as plain `]'
>  source line number 1

Should be pulled up to netbsd-9.
2020-12-05 18:29:50 +00:00
tsutsui
58eaf7a465 Add missing md_get_partition_range() that causes installation failure.
Also reported by Martin Trusler on testing hp300 miniroot.
Should be pulled up to netbsd-9 and netbsd-8.
2020-12-05 18:27:39 +00:00
tsutsui
88b29fde6c Add modules set for default sets on miniroot installation.
Should be pulled up to netbsd-9 and netbsd-8.
2020-12-05 18:24:10 +00:00
tsutsui
f018384299 The kernel and X sets should be specified in MD miniroot scripts.
Otherwise they are not listed at least on ftp installation.
The problem was reported by Martin Trusler on port-hp300@:
 https://mail-index.netbsd.org/port-hp300/2020/11/21/msg000174.html

Should be pulled up to netbsd-9 and netbsd-8.
2020-12-05 18:16:11 +00:00