Commit Graph

16696 Commits

Author SHA1 Message Date
thorpej fed9ff05fd Add a manual page for strlist(9). 2021-01-21 15:53:15 +00:00
pgoyette 97deb5ac32 Oooppss we need another size bump 2021-01-18 03:35:11 +00:00
rillig fb08819de8 lint: add more tests for system headers in strict bool mode 2021-01-17 23:00:41 +00:00
rillig a5778d2e53 lint: install custom stdbool.h, used for strict bool mode 2021-01-17 19:32:52 +00:00
rillig 93104a9b2f lint: remove custom stdbool.h for strict bool mode again
Adding it broke the official builds.
2021-01-16 22:18:14 +00:00
rillig 9f199e7ddf lint: in strict bool mode, integer constants do not have type bool
Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants.  This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false.  This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
2021-01-16 16:03:46 +00:00
pgoyette beede25931 Install image built with all of MKDEBUG, MKKDEBUG, and MKDEBUGLIB all
set to "yes" is a bit larger, so bump the image size accordingly.
2021-01-15 21:14:53 +00:00
rillig a738d648f3 lint: add tests for newly added messages for strict bool mode 2021-01-14 22:18:13 +00:00
pgoyette 22f3130d8a Update sets lists to accomodate KERNEL_DIR. When both KERNEL_DIR and
MKDEBUG are defined, we create an empty $DESTDIR/usr/libdata/debug/netbsd/
directory.

Should fix ``build.sh release'' issue reported in kern/55923

XXX Since nothing ever seems to populate this directory, perhaps we should
XXX simply prevent its creation?  If we do create it, should its creation
XXX perhaps be conditioned on MKKDEBUG rather than MKDEBUG?

XXX There is still another problem with ``build.sh install-image'' but I
XXX open a new PR for that.
2021-01-14 19:11:48 +00:00
pgoyette a62411020b /home/paul/XXX.txt 2021-01-14 19:07:03 +00:00
riastradh cba96d16f7 Various entropy integration improvements.
- New /etc/security check for entropy in daily security report.

- New /etc/rc.d/entropy script runs (after random_seed and rndctl) to
  check for entropy at boot -- in rc.conf, you can:

  . set `entropy=check' to halt multiuser boot and enter single-user
    mode if not enough entropy

  . set `entropy=wait' to make multiuser boot wait until enough entropy

  Default is to always boot without waiting -- and rely on other
  channels like security report to alert the operator if there's a
  problem.

- New man page entropy(7) discussing the higher-level concepts and
  system integration with cross-references.

- New paragraph in afterboot(8) about entropy citing entropy(7) for
  more details.

This change addresses many of the issues discussed in security/55659.
This is a first draft; happy to take improvements to the man pages and
scripted messages to improve clarity.

I considered changing motd to include an entropy warning with a
reference to the entropy(7) man page, but it's a little trickier:
- Not sure it's appropriate for all users to see at login rather than
  users who have power to affect the entropy estimate (maybe it is,
  just haven't decided).
- We only have a mechanism for changing once at boot; the message would
  remain until next boot even if an operator adds enough entropy.
- The mechanism isn't really conducive to making a message appear
  conditionally from boot to boot.
2021-01-10 23:24:25 +00:00
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
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
rin 7ef73ded12 G/C unused. 2020-12-01 04:21:26 +00:00
rin 938ac472bd rpi.img: Bump boot partition in a similar manner to other images. 2020-12-01 04:21:10 +00:00
sjg 25f0e79eda Added meta-cmd-cmp 2020-11-30 21:36:52 +00:00
tsutsui 6e1d247fb0 Try to shrink ramdiskbin binary.
-Os
-rwxr-xr-x  1 tsutsui  wheel  1371212 Nov 28 14:09 obj.dreamcast/ramdiskbin*

-Os -fno-unwind-tables
-rwxr-xr-x  1 tsutsui  wheel  1366000 Nov 28 14:10 obj.dreamcast/ramdiskbin*

-Os -fno-unwind-tables -DNDEBUG
-rwxr-xr-x  1 tsutsui  wheel  1359700 Nov 28 14:11 obj.dreamcast/ramdiskbin*
2020-11-28 05:16:06 +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
rin bdaedb86bc Correctly support aarch64eb and earmv7hfeb in a similar manner to
their little-endian counterparts.

Fix build failures for periodic binary snapshots.
2020-11-16 11:38:29 +00:00
jmcneill 86731f078b Use "efi" boot image platform ID. 2020-11-15 00:19:17 +00:00
rillig 0bd6f1df40 make(1): add test for the -t option in jobs mode 2020-11-14 15:35:20 +00:00
sjg 10eef09835 Add new make unit-test 2020-11-13 17:19:06 +00:00
maya b8e4133b8f Hook up font-liberation-ttf to the build.
license ok'd by board.
2020-11-12 22:28:02 +00:00
christos 80a97e389b Add /var/games/warp 2020-11-11 19:56:09 +00:00
rillig e0aa1a749c make(1): add more tests for parsing .if directives
The details of parsing are quite tricky and not documented in the manual
page.  Record the current behavior to be a little safer in future
refactorings.
2020-11-10 22:23:37 +00:00
kamil 994be4e978 Reintroduce the support of MKCATPAGES
Requested by <mrg>
2020-11-10 21:47:40 +00:00
kamil 2710a02cd6 Integrate Warp Kit into the NetBSD build
Fix the build and make it install and run with minimal required changes.
2020-11-10 08:49:08 +00:00
rillig d5ad895255 make(1): move test for != assignments to var-op-shell 2020-11-09 20:39:46 +00:00
kamil 4189359aaa Remove the catman sets support
Remnant of MKCATPAGES
2020-11-09 12:12:08 +00:00
kamil f3b4abb0cd Remove catman pages support
No longer relevant after the MKCATPAGES removal.
2020-11-09 01:05:51 +00:00
rillig 99b4cf5a91 make(1): in lint mode, only allow '&&' and '||', not '&' and '|'
These variants of the condition operators are neither documented in the
manual page nor are they used in practice.
2020-11-08 23:54:28 +00:00
kamil f94f87c83f Move the html9/psref* files from comp-sys-catman to comp-sys-htmlman 2020-11-08 16:47:59 +00:00
rillig fc3bb0099a make(1): add test for expanding variable expressions 2020-11-08 16:44:47 +00:00
kamil 4045d62396 Remove the support for MKCATPAGES
It was optional since 1999 and disabled by default since 2012.

Proposed on tech-userlevel@.
2020-11-08 14:52:35 +00:00
rillig d30e3db9c1 make(1): add newly added test to file list 2020-11-08 02:33:18 +00:00
rillig 595e4d4033 make(1): add test for job command flags 2020-11-07 20:01:17 +00:00
martin 6d554402a1 Bump ramdisk size slightly 2020-11-06 18:36:20 +00:00
mrg 10773c0f60 mark pamu2fcfg(1) as pam so MKPAM=no sets work 2020-11-04 19:11:39 +00:00