Commit Graph

17397 Commits

Author SHA1 Message Date
rillig b60cb68fed tests/indent: migrate token tests to other tests
In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
2022-04-24 10:36:37 +00:00
rillig 15606711d7 tests/indent: migrate tests for parentheses, brackets, braces 2022-04-24 08:48:17 +00:00
rillig 173b4e090e tests/indent: migrate tests for the tokens '{' and '.' 2022-04-23 09:59:13 +00:00
rillig c91f4bf8dd tests/indent: migrate a few token tests to psym tests 2022-04-23 09:01:03 +00:00
blymn 83e1731bf4 Add test and check file for bkgrndset 2022-04-20 07:41:04 +00:00
rillig ddac43c43f make: only switch to POSIX mode if '.POSIX:' is the first line
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
says that in order to make a makefile POSIX-conforming, its first
non-comment line must be the special dependency line '.POSIX:' without
any source dependencies.

Previously, make switched to POSIX mode even if such a line occurred
anywhere else, which was allowed by POSIX but was deep in the
"unspecified behavior" area.  For NetBSD make, there is no big
difference since it doesn't ship any <posix.mk> file, this change mainly
affects the bmake distribution.

Previously, makefiles that contain '.POSIX:' somewhere in the middle
could fail due to <posix.mk> resetting .SUFFIXES, among other things.

Suggested by Simon J. Gerraty, who also reviewed an earlier version of
this change.
2022-04-18 15:06:27 +00:00
christos 7f5154de3f bump for OpenSSH-9.0 2022-04-15 14:00:29 +00:00
pgoyette bc7accac9e Add the new scsi_subr module to sets lists. 2022-04-14 16:51:57 +00:00
martin 1d58cb4b56 Make this no-op variant of fmtcheck() compatible with the libc version
when called with NULL as first argument.
2022-04-14 15:51:29 +00:00
martin df3ac62ce2 Adapt to libcurses minor bump 2022-04-12 11:54:57 +00:00
blymn a12028486c Bump libcurses minor 2022-04-12 07:03:29 +00:00
martin ae26e95f81 Add missing EFI bootloaders to the install kernel ramdisk,
noticed by Lloyd Parkes.
2022-04-10 11:56:28 +00:00
riastradh 4f8ce3b31d Introduce membar_acquire/release. Deprecate membar_enter/exit.
The names membar_enter/exit were unclear, and the documentation of
membar_enter has disagreed with the implementations on sparc,
powerpc, and even x86(!) for the entire time it has been in NetBSD.

The terms `acquire' and `release' are ubiquitous in the literature
today, and have been adopted in the C and C++ standards to mean
load-before-load/store and load/store-before-store, respectively,
which are exactly the orderings required by acquiring and releasing a
mutex, as well as other useful applications like decrementing a
reference count and then freeing the underlying object if it went to
zero.

Originally I proposed changing one word in the documentation for
membar_enter to make it load-before-load/store instead of
store-before-load/store, i.e., to make it an acquire barrier.  I
proposed this on the grounds that

(a) all implementations guarantee load-before-load/store,
(b) some implementations fail to guarantee store-before-load/store,
and
(c) all uses in-tree assume load-before-load/store.

I verified parts (a) and (b) (except, for (a), powerpc didn't even
guarantee load-before-load/store -- isync isn't necessarily enough;
need lwsync in general -- but it _almost_ did, and it certainly didn't
guarantee store-before-load/store).

Part (c) might not be correct, however: under the mistaken assumption
that atomic-r/m/w then membar-w/rw is equivalent to atomic-r/m/w then
membar-r/rw, I only audited the cases of membar_enter that _aren't_
immediately after an atomic-r/m/w.  All of those cases assume
load-before-load/store.  But my assumption was wrong -- there are
cases of atomic-r/m/w then membar-w/rw that would be broken by
changing to atomic-r/m/w then membar-r/rw:

https://mail-index.netbsd.org/tech-kern/2022/03/29/msg028044.html

Furthermore, the name membar_enter has been adopted in other places
like OpenBSD where it actually does follow the documentation and
guarantee store-before-load/store, even if that order is not useful.
So the name membar_enter currently lives in a bad place where it
means either of two things -- r/rw or w/rw.

With this change, we deprecate membar_enter/exit, introduce
membar_acquire/release as better names for the useful pair (r/rw and
rw/w), and make sure the implementation of membar_enter guarantees
both what was documented _and_ what was implemented, making it an
alias for membar_sync.

While here, rework all of the membar_* definitions and aliases.  The
new logic follows a rule to make it easier to audit:

	membar_X is defined as an alias for membar_Y iff membar_X is
	guaranteed by membar_Y.

The `no stronger than' relation is (the transitive closure of):

- membar_consumer (r/r) is guaranteed by membar_acquire (r/rw)
- membar_producer (w/w) is guaranteed by membar_release (rw/w)
- membar_acquire (r/rw) is guaranteed by membar_sync (rw/rw)
- membar_release (rw/w) is guaranteed by membar_sync (rw/rw)

And, for the deprecated membars:

- membar_enter (whether r/rw, w/rw, or rw/rw) is guaranteed by
  membar_sync (rw/rw)
- membar_exit (rw/w) is guaranteed by membar_release (rw/w)

(membar_exit is identical to membar_release, but the name is
deprecated.)

Finally, while here, annotate some of the instructions with their
semantics.  For powerpc, leave an essay with citations on the
unfortunate but -- as far as I can tell -- necessary decision to use
lwsync, not isync, for membar_acquire and membar_consumer.

Also add membar(3) and atomic(3) man page links.
2022-04-09 23:32:51 +00:00
riastradh d49616184d membar_ops(3): Add some automatic tests.
These tests run two threads for five seconds each to try to trigger
races in the event of broken memory barriers.  They run only on
machines with at least two CPUs; on uniprocessor systems there's no
point -- the membars can correctly just be (instruction barrier)
no-ops.
2022-04-08 23:35:51 +00:00
rillig 321092b8ae lint: remove unused message 70, add some more tests 2022-04-08 21:29:29 +00:00
reinoud e997ef4acf Add fsck_udf to the debug sets 2022-04-06 14:28:44 +00:00
reinoud aaca3d49cd Add the fsck_udf(8) tool to the build and release 2022-04-06 14:20:07 +00:00
rillig e6d4541762 tests/lint: add tests for a few early messages 2022-04-05 23:09:19 +00:00
andvar 9991cde4dd Remove floppy installation instructions from sparc documentation.
Floppy generation was disabled before NetBSD 6.0 release due to size
constraints and unlikely to be restored soon or at all. PR port-sparc/56776.
ok martin.
2022-04-01 21:53:35 +00:00
pgoyette bb82a354ac Create a loaable adiantum module, and make cgd require it.
This enablees use of a loadable cgd module, rather thtan requiring
it to be built-in.

Partially resolves kern/56772
2022-04-01 21:09:24 +00:00
pgoyette 7694d68911 Split i2c_subr.c into a separate module rather than including it in
the iic module.  There are valid configurations where i2c_subr code
can be both built-in and part of a loaded module (eg, piixpm is in
the kernel, but the iic module is loaded later).  This causes the
in-kernel linker to detect a duplicate symbol.
2022-04-01 15:49:11 +00:00
christos 70ac91e3e3 Add t_link 2022-03-28 20:52:17 +00:00
christos de5bb3186c grow (for llvm) 2022-03-26 17:11:20 +00:00
christos c7671db9d6 grow 2022-03-26 17:09:53 +00:00
wiz 83aebf56b2 add more igpio man pages (cat4, html4) 2022-03-24 16:33:05 +00:00
manu 5943c0fc2c Add man page for Intel GPIO igpio.4 2022-03-24 14:04:28 +00:00
andvar 4d969a39c0 fix few typos in comments and output message. 2022-03-13 14:20:24 +00:00
mrg f3bf968556 disable compatfile for filter-aaaa.so. 2022-03-07 09:45:02 +00:00
mrg 55bbcc605b comment filter-aaaa.so.debug for now. it's not installed normally
and will need a special rule, left as an exercise to the reader.

make plugins .WAIT on everything else.
2022-03-07 09:23:20 +00:00
mrg 2bd052e5d8 enter the bind plugins library dir, and also add missing set lists.
fixes building sets for at least vax.
2022-03-07 07:07:55 +00:00
christos 859122dbc4 add filter-aaaa 2022-03-06 17:54:52 +00:00
mrg 0610295431 fix ati_drv version after switching to newer sources for everyone. 2022-02-25 17:42:59 +00:00
mrg 2104676143 enable blkdiscard(8) build. 2022-02-24 03:35:32 +00:00
christos 1362f06b78 bump libssh 2022-02-23 19:09:42 +00:00
uwe 688bac70ae libXi: Bring back manual pages. 2022-02-22 22:49:39 +00:00
uwe 739fa5515a libXxf86vm: Add missing XF86VidModeAddModeLine.3 mlink. 2022-02-22 15:42:09 +00:00
uwe 23312573e7 libXv: add missing man pages added in libXv-1.0.5
While here, split MAN and MLINKS into individual += assignments and
sort them.
2022-02-22 00:05:13 +00:00
uwe 66a03ef37b libXext: Fix MLINKS for XShape.3
XShapeQueryExtension.3 and XShapeQueryVersion.3 are not conjoined twins.
While here split XShape.3 links into separate MLINKS += src dst assignments
and sort them.
2022-02-21 02:13:47 +00:00
nia 7fb7867321 Be less optimistic about i386 system reqirements. Remove extremely outdated
list of support devices.
2022-02-20 09:40:07 +00:00
uwe 21a341520d Add missing cat pages to fix MKCATPAGES build. 2022-02-16 01:26:30 +00:00
riastradh 66d107c557 KERNEL_LOCK(9): New man page for old not-dead-yet hack.
I'm not documenting this to encourage anyone to use it.  I'm only
documenting this to remind myself what the semantics is, because it's
kind of confusing and not at all like mutex(9).
2022-02-15 22:46:29 +00:00
riastradh 59e18dd467 __cpu_simple_lock(9): New man page.
This doesn't mean you should use it!  Mostly it's to document the
semantics to help understand existing uses, which should not
proliferate, and audit definitions.
2022-02-12 17:10:20 +00:00
rillig d865043f3f tests/make: document the history of bugs in '-k' mode
Reported in PR#49720 in 2015, fixed independently in compat.c 1.199 from
2020-12-07.
2022-02-12 13:17:57 +00:00
rillig b048c4e49a tests/make: demonstrate bug for .SILENT in jobs mode (since 2003)
Reported 2011 in PR#45356.
2022-02-12 01:15:17 +00:00
rillig 1c62825e82 tests/make: demonstrate combination of .USE with transformation rule
Reported in 2003 in PR toolchain/20993.  Linking a transformation rule
with .USE or .USEBEFORE node makes the transformation rule fail.
2022-02-07 22:43:50 +00:00
nia fb47004043 Add pf(4) to the "list of features we plan to remove" (eventually)
list in the installation notes. Ironically, the only other thing here
is groff(1), which is used to generate these installation notes.
2022-02-06 07:37:29 +00:00
tsutsui 991df208a5 Use more shrinked tools in src/distrib/utils.
Saves ~24KB.
2022-02-04 17:21:56 +00:00
tsutsui 4ee8b2d39f Specify -fno-unwind-tables to shring ramdisk binaries.
Saves ~8KB.
2022-02-04 17:19:52 +00:00
andvar 34df0b3791 remove double "with" in comments and usage text. Also fix one typo. 2022-01-24 09:42:13 +00:00
rillig c556b4e908 tests/make: migrate modts to varmod-to-separator and explain 2022-01-23 18:00:53 +00:00
rillig 76f64f81d9 tests/make: rename var-class to var-scope
There is no such concept as a "variable class" in make, these tests
focus on the variable scope instead.
2022-01-23 16:25:53 +00:00
rillig 72c3edd3a3 tests/make: extend test suite, move old tests to 2020 scheme
The tests from envfirst.mk are now in opt-env.mk.
The tests from modword.mk are now in varmod-select-words.mk.
2022-01-23 16:09:38 +00:00
christos f0fde9902f PR/56657: Juraj Hercek: Add plainrsa-gen utility mentioned in racoon.conf(5)
and fix it for OpenSSL 1.1
2022-01-23 14:35:44 +00:00
skrll a8418b3e5b Add __MASK(3)
__MASK(n): first n bits all set, where __MASK(4) == 0b1111.
2022-01-22 08:58:48 +00:00
pho ec9afb4282 lib/librefuse: Implement all sorts of compat tweaks to appease various file systems
ReFUSE now supports all the FUSE API variants from FUSE 1.1 to FUSE
3.10. Sorry for the freaking giant patch. I could not break it down
any further.
2022-01-22 08:09:39 +00:00
pho a95017a87a lib/librefuse: Add support for legacy types and functions 2022-01-22 07:57:30 +00:00
pho 97dc09a69d lib/librefuse: Add stub functions for FUSE polling API 2022-01-22 07:56:15 +00:00
pho ce847e0a0b lib/librefuse: Implement data buffer API appeared on FUSE 2.9 2022-01-22 07:54:56 +00:00
pho 9f39150738 lib/librefuse: Implement FUSE session API and its signal handling functionality 2022-01-22 07:53:05 +00:00
pho 153b9c141b lib/librefuse: Implement logging API appeared on FUSE 3.7 2022-01-22 07:38:45 +00:00
rillig 12889c829b tests/make: demonstrate wrong location in diagnostic (since 2018-12-22)
When a target has multiple places where commands are defined, the
diagnostics mixed up the filename in some cases.
2022-01-19 22:10:41 +00:00
christos eadcbf2061 new vnode op ACL pages 2022-01-17 22:49:43 +00:00
christos 5967eecb18 section 9 acl related changes 2022-01-17 19:12:01 +00:00
thorpej 5eb438ad7a Re-factor and overhaul the "mcp23s17gpio" driver as "mcpgpio", and
add support for 8-bit and I2C variants of the chip:
- MCP23008 / MCP23S08: 8-bit (I2C / SPI)
- MCP23017 / MCP23S17: 16-bit (I2C / SPI)
- MCP23018 / MCP23S18: 16-bit (I2C / SPI), open-drain outputs

The MCP23x17 and MCP23x18 are essentially identical, software-wise; we
merely report different GPIO pin capabilities (no push-pull output for
MCP23x18).  Also, remove the tri-state capability that was previously
advertised by the old version of this driver; these chips have no way
to put the pin into a HI-Z mode.

All 3 I2C versions are supported, but the SPI front-end still only
supports the MCP23S17 for now (SPI autoconfiguration needs an overhaul).

mcp23s17gpio(4) remains present as a link to the new mcpgpio(4) man page.

XXX Still to-do: FDT integration, interrupt suppoort.
2022-01-17 16:31:23 +00:00
martin 9da6ce8f23 Add sysinst catalog files 2022-01-15 16:05:19 +00:00
skrll 04e9f53ab6 bump 2022-01-13 08:25:24 +00:00
martin da781f18d7 A few more sysinst message catalog adjustments 2022-01-12 15:35:51 +00:00
martin 2546ca891c Tweak some sysinst catalog files 2022-01-11 19:27:13 +00:00
martin 906a0c5ecd Add sysinst message catalogs 2022-01-10 19:23:00 +00:00
martin 6f09f6a101 Add sysinst catalogs to a few more md lists 2022-01-10 17:50:18 +00:00
martin f58928245d Add sysinst catalog files 2022-01-10 15:31:38 +00:00
martin bbebeab223 "Unobsolete" the sysinst message catalogs, now that we install them again. 2022-01-10 10:02:30 +00:00
skrll e79355da8c Fix alpha build 2022-01-10 06:00:00 +00:00
martin 9821f7a4ed First try (certainly wrong for many builds) to add sysinst catalog files. 2022-01-09 18:11:09 +00:00
skrll cee6161ff7 Use comp-sysutil-debug (not sysutils) 2022-01-09 07:45:05 +00:00
skrll 979ce140d8 Remove unnecessary machine=emips item - it was added to
distrib/sets/lists/debug/md.emips
2022-01-09 07:38:33 +00:00
christos a42fbaa6e0 fix emips 2022-01-08 14:28:14 +00:00
skrll 72735ed0c4 Attempt to fix emips build 2022-01-08 08:40:19 +00:00
nia 2e2abd82c6 Add man pages for eqos(4), mcommphy(4)
lgtm jmcneill@
2022-01-06 21:55:23 +00:00
christos 2e4c5e6fad put back the nfs ramdisk kernel for emips. 2022-01-04 14:32:21 +00:00
christos dc8e937cab the nfs kernel is only for pmax 2022-01-03 16:44:49 +00:00
christos a7e278e4d4 move the kernels for earmv5{,eb} in the ad.arm file so that they don't
override it
2022-01-03 16:43:32 +00:00
martin 348bea3af9 There is no point in putting a second sysinst binary into the install
image's root filesystem.
2022-01-03 12:10:17 +00:00
christos 42d5a646b9 fix pmax 2022-01-02 23:10:37 +00:00
christos f43fe87265 fix part of mips 2022-01-02 16:38:36 +00:00
christos a75ac3aaa9 forgot one @CONFIG@ 2021-12-31 17:51:14 +00:00
christos d08ab2c58e Grow to fit debug kernels 2021-12-31 16:43:04 +00:00
christos 5cac1204b1 Grow a little 2021-12-31 16:40:59 +00:00
christos d83e6a7379 Add kernel debug files. 2021-12-31 16:15:58 +00:00
christos 974c7c1676 change CONFIG to @CONFIG@ to indicate substitution is going to happen. 2021-12-31 16:14:44 +00:00
pgoyette 103e3da3fd Still not big enough - bump some more. 2021-12-31 04:59:15 +00:00
pgoyette 669869f4e7 With recent changees to debug kernel stuff from Christos we are
once again pushing the size limit.  Bump it again.
2021-12-30 15:01:55 +00:00
christos 6a678624a1 don't match the empty pattern 2021-12-30 02:30:53 +00:00
christos 508aca192c Enable split-debug files for kernels. Enabled by default with MKDEBUG=yes. 2021-12-29 22:22:12 +00:00
rillig 1ed2b64416 tests/make: document inconsistencies between '!=' and '::!='
Found while trying to make the error messages from Cmd_Exec more
detailed.
2021-12-28 00:56:16 +00:00
pgoyette 4eb53ee9e8 Once again things have grown, so the install image allocation size
needs to be bumped.

XXX There's gotta be a better way to maintain this!  :-)
2021-12-26 03:07:06 +00:00
rillig e499719151 tests/make: explain the current behavior of the option '--version' 2021-12-23 11:05:58 +00:00
thorpej 3000bba86d Document PR_PSERIALIZE. Remove documentation for pool_cache_setpredestruct(). 2021-12-22 17:28:17 +00:00
thorpej 1af3a96973 Add pool_cache_setpredestruct(), which allows a pool cache to specify
a function to be called before the destructor for a batch of one or more
objects is called.  This can be used as a synchronization point by
subsystems that rely on the type-stable nature of pool cache objects or
subsystems that use other forms of passive serialization.
2021-12-21 18:59:22 +00:00
rillig d161e75752 tests/lint: test excess braces around initializers 2021-12-20 19:48:05 +00:00
maya 682f7c225a don't conditionalize the installation of nouveau directories 2021-12-14 12:13:38 +00:00
rillig 6a699af09c make: remove unreachable code for parsing the dependency operator
At the point where ParseDependencyOp is called, cp is guaranteed to
point to either ':' or '!'.

No functional change.
2021-12-14 00:02:57 +00:00
maya 8b9ca392fe Add newer nouveau firmware build goo
Symlinks inferred from linux-firmware/WHENCE and compared to a linux distro's
firmware.

Note: said linux distro appears to have some mistakes compared to the
linux-firmware repo in linking ucode_unload.bin to unload_bl.bin and vice
versa in some places.
I didn't replicate this aspect, and lack the hardware to test it.
2021-12-13 23:59:35 +00:00
rillig d37de80bd6 tests/make: extend tests for parsing makefiles 2021-12-13 23:38:54 +00:00
rillig e67aefd60c tests/make: test and document the newly added "variable" .SUFFIXES 2021-12-12 22:16:48 +00:00
maya 1eb4f57936 Add amdgpu firmware build goo (disabled) 2021-12-12 20:33:21 +00:00
mrg d914a3c1b9 remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line.  again.  (i did this in 2008 and then
did not update all of my personal templates.)
2021-12-11 19:24:18 +00:00
uwe a737087573 Make .Nx \*V happy for current builds.
I'm not sure why mdoc complains here (not the technical reason, but
the pragmatic purpose).  My best guess is that it wants to catch
mistakes like .Fx 1.6.1 (instead of .Nx 1.6.1).  I'm not entirely
convinced this doesn't create more problems that it solves.

No objections in the 15 years since this was proposed netbsd-docs.
2021-12-08 13:06:44 +00:00
uwe cbbc3947cd Punctuation in macro invocation must be a separate argument. 2021-12-08 12:54:15 +00:00
brad bf53d44167 A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip.  The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus.  One can interface with the SCMD using tty uart commands, SPI or
I2C.  The driver in this commit adds a kernel driver for the I2C and
SPI interfaces.  The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.
2021-12-07 17:39:53 +00:00
rillig 2089b7e855 tests/lint: demonstrate wrong warning for __builtin_alloca 2021-12-06 23:20:26 +00:00
abs 9a317b44dd Add Xwsfb X server to pmax build
With the previous tweak to TURBOchannel framebuffers in sys/dev/tc this
should allows pmax to once again run X11.

TODO: Investigate pullup to -9
2021-12-06 17:51:59 +00:00
nia f6aa23ee82 armbsd.org is gone 2021-12-05 19:43:30 +00:00
rillig 412424cefd make: fix use-after-free in modifier ':@'
Without memory allocator debugging, the newly added test doesn't show
any obvious failure.

With memory allocator debugging enabled, all make versions since
2016.02.27.16.20.06 crash with a segmentation fault.
2021-12-05 15:20:13 +00:00
msaitoh cf1a0e0a8e s/progam/program/ 2021-12-05 07:18:53 +00:00
msaitoh 83cf79d6fc s/partiton/partition/ 2021-12-05 07:06:17 +00:00
msaitoh b5ffb2e0d6 s/filesytem/filesystem/ in comment. 2021-12-05 04:47:17 +00:00
rillig d15bc7b966 tests/indent: migrate token_question to lsym_question and extend it 2021-11-28 16:20:13 +00:00
rillig 2c9e62c12f tests/indent: migrate test token_case_label to lsym_case_label 2021-11-28 16:05:59 +00:00
rillig 1284b73f20 tests/indent: migrate token_comma to lsym_comma
The section on initializer values is new.
2021-11-28 15:26:22 +00:00
rillig f8e8fcdaab tests/indent: move test for ':' to lsym_token.c 2021-11-28 14:49:28 +00:00
rillig af3ccc52b1 indent: treat L"string" as a single token
There is never whitespace between the 'L' and the string literal or the
character constant. There might be a backslash-newline between them, but
that case was not handled before either.

No functional change.
2021-11-28 14:29:03 +00:00
ryo 2f5e5e7356 add support COMPAT_LINUX32 for aarch64 2021-11-25 03:08:03 +00:00
rillig 9ae26de163 tests/indent: add skeletons for testing tokens and parser symbols
The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack.  They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests.  This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
2021-11-18 21:19:18 +00:00
rillig 796d49a188 distrib/sets: sort mi file 2021-11-18 18:14:47 +00:00
thorpej 4ae1bf140a Add a test case for backtrace(3) across a signal handler. 2021-11-18 15:03:19 +00:00
kre da8d42ff88 Adjust new libcurses test filenames to the ones atually installed.
Possibly the intent was that the names used here were correct, and
the error is where they're installed - if so, that can be corrected later.

Hopefully this will fix the remaining current build issue.
2021-11-17 04:33:26 +00:00
blymn ff475afa83 Add more check files for libcurses tests. 2021-11-16 21:05:33 +00:00
christos 18b914f008 Add man pages for posix_spawn_file_actions_add{f,}chdir from piyush 2021-11-15 14:01:50 +00:00
blymn dc4ea44a5a Add new check files for curses atf. 2021-11-15 06:34:05 +00:00
skrll 50e70fef69 Hook in riscv dtb build 2021-11-13 10:13:42 +00:00
jmcneill 771794bb54 regen 2021-11-12 21:55:46 +00:00
jmcneill bd16283be1 dtb: Re-generate set lists for 5.15 2021-11-07 17:11:05 +00:00
brad 1f3d8cb8fe Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates.  The driver supports
everything about the sensor except for the alert pin.
2021-11-06 13:34:39 +00:00
abs 6bf98a7596 Update some distrib X11R6 references to X11R7
Some of these scripts and notes may no longer be relevant, but now
they are at least not relevant while referring to the current X
installation directory
2021-11-02 22:02:42 +00:00
martin 0a474c24d1 Use libhack and the non-widechar hacked version of curses for
the ramdisk image to save some space.
2021-11-01 19:37:32 +00:00
thorpej 02edde8aa3 Version the sigaction(2) libc wrapper. The new version uses the "siginfo"
trampoline exclusively, thus relegating "sigcontext"-style handlers (which
have not been documented for many years now) to the dustbin of the compat
library.
2021-11-01 05:53:45 +00:00
rillig dc54a6e367 lint: warn if an enum name is used for mismatched array access
This helps to keep the enum definition and the straight-forward
implementation of a to_string or name function in sync.

The test for message 241 had to be adjusted because of exactly this bug.
That test defined a bit mask enum but accessed it like a value enum
type.
2021-10-30 22:04:42 +00:00
macallan 2aad46af06 add mgxreg.h 2021-10-29 19:12:29 +00:00
christos ec46972363 fix pic build 2021-10-27 18:19:12 +00:00
rillig 19aed58afc tests/indent: migrate remaining tests from t_indent to t_options
The test types_from_file was a subset of opt_U and thus has been
removed.
2021-10-23 21:45:14 +00:00
rillig a4008d47fd tests/indent: migrate test for '-bap -sob' to t_options 2021-10-23 20:30:23 +00:00
rillig c8dfed2873 tests/indent: migrate test for '--version' to t_options 2021-10-23 20:23:27 +00:00
rillig 0938f454d8 tests/indent: migrate test for offsetof to t_options 2021-10-23 20:17:08 +00:00
rillig 206790fc56 tests/indent: remove redundant test list_head
The test cases are already in fmt_decl.c, in old_style_definition and
LIST_HEAD.
2021-10-23 20:07:03 +00:00
rillig 4271ee73ee tests/indent: migrate f_decls to using t_options, add more tests 2021-10-23 20:01:14 +00:00
thorpej 4e78a8a8af Fix a regression introduced in kern_event.c,v 1.129 that would cause
"udata" to get clobbered on ONESHOT events, and add a unit test for it.
Reported by martin@ (manifested in his case as a KASSERT() firing when
running unit tests in COMPAT_NETBSD32).
2021-10-23 18:46:26 +00:00
thorpej d5b8844629 Add support for the EVFILT_EMPTY filter, which is activated when the
write buffer associated with the file descriptor is empty.  This is
currently implemented only for sockets, and is intended primarily to
provide visibility to applications that all previously written data
has been acknowledged by the TCP layer on the receiver.  Compatible
with the same filter in FreeBSD.
2021-10-23 01:28:33 +00:00
rillig 5cf73ea1e5 tests/indent: fix file list 2021-10-22 22:31:55 +00:00
rillig e37f4fd358 tests/indent: fix file list
lex.c got renamed to lex_ident.c.
2021-10-22 21:06:21 +00:00
kre 324c46ee63 tzdata2021e update, zoneinfo Pacific/Enderbury renamed to Pacific/Kanton
(old name retained) - so add new zone file for Pacific/Kanton
2021-10-22 21:03:01 +00:00
rillig 32fe626b4a tests/indent: migrate integer options tests to t_options 2021-10-22 20:54:36 +00:00
rillig e1e8104f85 tests/indent: migrate tests for parentheses, struct, #if, wide char 2021-10-22 19:46:41 +00:00
rillig 8c1e5e0299 tests/indent: migrate a few more tests to t_options 2021-10-22 19:27:53 +00:00
gutteridge 9164f1f294 main: add .gz extension to .img references for consistency 2021-10-20 23:45:09 +00:00
gutteridge e0b9843e36 main: add note about amd64 now having a "bios" image, too 2021-10-20 23:30:30 +00:00
gutteridge 1c32cacab5 main: simplify conditional markup 2021-10-20 23:23:59 +00:00
rillig a08a922a72 tests/indent: add test for INDENT OFF/ON comments
Just to prevent unintended side effects when fixing bugs in this area.
2021-10-19 20:20:24 +00:00
rillig ed7ca38191 tests/indent: remove redundant tests for '-ncs' and '-pcs'
These tests are already covered by opt_cs.c and opt_pcs.c.
2021-10-18 23:01:10 +00:00
rillig d543264ca7 tests/indent: condense test for indentation level, add missing files 2021-10-18 22:46:33 +00:00
rillig 2f0d7369b1 tests/indent: condense the token tests
This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
2021-10-18 22:30:34 +00:00
rillig f014d0e7c6 tests/indent: extend tests for labels, extract test driver
Having the test driver in a separate file allows to run it on its own,
as 'awk -f t_options.awk label.c'. When the test driver warns, exit 1;
this is only needed for the standalone version, when run from inside ATF
the warnings on stderr already suffice to make the test fail in the end.
2021-10-18 20:18:00 +00:00
rillig a7fa8202c8 tests/indent: consolidate tests for comments
These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
2021-10-18 19:36:29 +00:00
rillig 19176aa25f tests/indent: merge tests for numbers into token_ident
The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
2021-10-18 18:10:19 +00:00
uki 8d12f8ce38 Replace @dirrm to @pkgdir in packing list of syspkg 2021-10-18 10:47:44 +00:00
jmcneill d283b04119 Background dhcpcd if ec2_init is not enabled to speed up boot. 2021-10-16 14:05:48 +00:00
rillig b7c1e178c2 tests/indent: add newly added t_options to file list 2021-10-16 09:17:21 +00:00
skrll 63761ec5d3 Move tsan entries marked machine=amd64 from .mi files into md.amd64 2021-10-16 07:01:02 +00:00
rillig 0229da1609 tests/indent: remove accidentally added file from the mi list 2021-10-16 05:21:57 +00:00
rillig 0c07b89fde tests/indent: condense tests for bool options
Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
2021-10-16 03:20:12 +00:00
rillig 122ad69440 tests/indent: provide full line coverage for argument handling 2021-10-14 17:42:12 +00:00
brad ea034c40cb A driver for the Sensirion SGP40 MOx gas sensor. An example of this
chip from Adafruit is:

https://www.adafruit.com/product/4829

This is a moderately priced gas sensor that can detect volatile
organic compounds in the air.  The driver uses the 3-clause BSD
licensed VOC algorithm provided by Sensirion to turn the raw sensor
metric into a VOC index which can indicate the quality of the air in a
particular indoor environment.  All published functions of the chip
are supported and one unpublished feature.
2021-10-14 13:54:45 +00:00
rillig 405d75dbcb indent: check command line options stricter
Previously, bool options were allowed to have trailing garbage. For
example, the option '-bacc' could be spelled '-bacchus' as well.

Check that the exact option name is given in the command line, to
prevent typos in the configuration files and to reduce surprises just in
case a future option is a prefix of an existing option, or vice versa.

Add a new test program for error handling. Most of these tests are so
simple that it would be overkill to create 3 files for each test.
2021-10-13 23:33:52 +00:00
thorpej dbceac44db Add support for the NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS,
NOTE_NSECONDS, and NOTE_ABSTIME filter flags to EVFILT_TIMER,
API-compatible with the same in FreeBSD.
2021-10-13 04:57:19 +00:00
msaitoh c6448522e7 Add hvn.4. OK'd by nonaka@. 2021-10-12 04:55:19 +00:00
thorpej a8831e8f69 Add a test case for the race condition in PR kern/50094, modeled after
the Go run-time scenario described in the PR.
2021-10-10 17:47:38 +00:00
thorpej b4c8cdcd4b Add a test case to heavily exercise EVFILT_PROC + NOTE_TRACK. 2021-10-10 17:43:15 +00:00
jmcneill c3146444be efi: Add /dev/efi character device
Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.
2021-10-10 13:03:08 +00:00
ryo 2c176dfd77 Modularize compat_linux(8) for aarch64. 2021-10-09 07:01:34 +00:00
maya 7ab68eeadb Restore having a BIOS-only amd64 USB image.
Several people reported having hardware that struggles booting the mix
EFI+BIOS image, and it's better to offer them a working image.

Keeping the EFI image as having the obvious name, this is going to become
more likely to work by default as newer hardware may not support BIOS boot.

(XXX pullup-9)
2021-10-08 20:24:06 +00:00
rillig 75ecb1b870 tests/indent: test parsing of command line options in profile file 2021-10-07 18:07:25 +00:00
rillig 2f7d443f9a tests/indent: demonstrate off-by-one error in edge case 2021-10-05 17:09:45 +00:00
brad 20bbeb9e49 Sorry.. missed the debug module build in the previous commit. 2021-10-04 07:04:39 +00:00
brad ee2dd9d79d A driver for the Sensirion SHT40/SHT41/SHT45 temperature and humidity
sensor.  An example of this chip is:

https://www.adafruit.com/product/4885

This is a lower cost chip that provides higher then usual precision
according to the data sheet.  This driver supports all of the published
functions that the chip has.
2021-10-03 17:27:02 +00:00
jmcneill 2017b9f914 efiboot: Build and install bootriscv64.efi for riscv64 builds. 2021-09-30 20:02:54 +00:00
yamaguchi 5256dbbccb Added tests for the linear hook APIs 2021-09-30 02:00:19 +00:00
yamaguchi 8085a44f47 Introduce a generic linear hook list 2021-09-30 01:26:07 +00:00
rillig b6d6b0c54e tests/lint: add tests for platform characteristics
Running lint in usr.bin/make on i386 fails due to this warning:

cond.c(800): warning: argument #3 is converted from 'unsigned char' to
    'unsigned int' due to prototype [259]

This warning only occurred on i386 but not on sparc or x86_64. Try to
reproduce the test situation in platform_int.

The platform code in t_integration.sh was not strict enough, it didn't
check for multiple conditions, such as in msg_132_ilp32. That test was
only supposed to run on ILP32 platforms where size_t is unsigned int. It
also ran on sparc, even though size_t is long there.
2021-09-26 03:17:59 +00:00
maya 48cbb9381e Restore MKNOUVEAUFIRMWARE and MKRADEONFIRMWARE and make gpufw set unconditional
Simplifies logic.
Restoring MK* requested by mrg on tech-kern discussion
https://mail-index.netbsd.org/tech-kern/2021/09/25/msg027695.html
2021-09-25 21:26:03 +00:00
maya cb00f44e85 Remove duplicate line - also appears in base/mi. 2021-09-25 21:18:22 +00:00
maya b9fd198ba6 Disable drmkms module builds.
They haven't been functional (and won't be before fixing genfb abi).
In a new drm update, we haven't prioritized fixing the build either.
2021-09-25 17:55:37 +00:00
rillig 576163d116 tests/indent: test deeply nested struct declarations 2021-09-25 13:04:55 +00:00
rillig a43b9a4656 tests/indent: test edge cases for the tokenizer 2021-09-25 12:20:44 +00:00
rillig 1d9925cdd1 tests/indent: test lexing of character constants and string literals 2021-09-25 09:46:29 +00:00
maya f54624bd74 Move DRM-driver firmware from base to its own set, gpufw
This set is only installed on amd64,i386,evbarm.
This set is installed on minimal installs and on install media, in
case someone needs it for basic driver functionality.

Comments:
Switched to a single MK tunable for it - that is probably unneeded.

An upcoming DRM update will include even fatter firmware, and we'd
like to minimize the impact of it.
2021-09-25 08:54:29 +00:00
christos 9ec0418677 bump libfido2 2021-09-24 13:13:07 +00:00
thorpej e714af64e3 Add native implementations of eventfd(2) and timerfd(2), compatible with
the Linux interfaces of the same name.
2021-09-19 15:51:27 +00:00
christos a043955316 Patch the build script and toolchain to allow passing through
HOST_CPPFLAGS, HOST_CXXFLAGS, but not LIBRARY_PATH because it breaks
the build. These variables are necessary to support building NetBSD
from a GNU Guix or NixOS host, where /usr/include, /lib, and all
but /bin/sh do not exist.  In many cases, support for HOST_CPPFLAGS
was incomplete. From Ryan Sundberg
2021-09-18 01:47:07 +00:00
kre d76f908912 Re-instate /usr/lib/dtrace which seems to have been accidentally deleted
in the previous update.
2021-09-17 14:09:00 +00:00
christos 79d5820b5e Move the sanitizer libraries from 9.0.0 -> 13.0.0 to match our current clang
version.
2021-09-16 23:32:49 +00:00
rillig 697a010bb5 tests/lint: add more tests for direct-abstract-declarator
Lint's grammar in this area differs a lot from the grammar in C99. GCC's
parser has a long comment about special cases in this area.  It's tricky
to even parse these type names correctly, let alone assign them the
correct types, that's why it needs more tests before trying to refactor
that code.
2021-09-13 22:09:06 +00:00
rillig 732fd0a332 lint: add more details to error about redeclaration
Message 27 is triggered by several conditions.  The one triggered by
register_vget in sbin/fsck_lfs/vnode.c needs more details than the
others.
2021-09-12 16:28:44 +00:00
pgoyette 91ba062cc6 Build and install the if_run module. run(4) is not necessarily included
in all GENERIC kernels (as reported on libera IRC).
2021-09-11 16:10:37 +00:00
rillig 5a4b550cb7 tests/lint: test line number tracking with \v and \f 2021-09-10 19:40:18 +00:00
christos 7d4adb44fc bump for clang/llvm 2021-09-08 11:20:44 +00:00
martin 5805410e2a PR 56389: do not include top level .git or .hg directories
in source sets.
2021-09-07 18:02:46 +00:00
rillig 9665ac6aef tests/lint: test GCC builtins for overflow in strict bool mode
Seen in inetd.c.
2021-09-03 22:44:08 +00:00
christos 1b820af4bd bump libssh 2021-09-02 11:28:45 +00:00
rillig 449d1217ca tests/lint: add test for prototype conversions in C90
The purpose of warning 259 is to find function calls that differ in the
ABI.  The warning's original purpose was not to warn about lossy
conversions, that's just a side effect.

Warning 259 had been implemented before C99 was published, which is more
than 20 years ago.  In the meantime, almost all code has migrated to
using function prototypes.  With the default lint flags from NetBSD's
<sys.mk>, it would rather make sense to focus on lossy conversions now.

To prepare for potentially upcoming differences in lint's C90 and C99
modes, clone the test now as far as possible.  The test for C90 mode is
smaller than for C99 mode, since 'long long' was not available back
then.
2021-08-31 18:59:26 +00:00
rillig 16fe11c78d tests/make: explain where "${var}" in .for loops comes from 2021-08-30 17:08:13 +00:00
christos 2557380693 Inetd enhancements by James Browning, Gabe Coffland, Alex Gavin, Solomon Ritzow
Described in:
    https://www.mail-archive.com/tech-userlevel@netbsd.org/msg03114.html
And developed in:
    https://github.com/ritzow/src/pull/1

From their notes:

All new functionality should be explained by the updated manpage.

The manpage has been refactored a bit: A new section "Directives"
has been added and the information about default hostnames and
IPsec directives has been moved there, and the new file include
directive information is also there.

getconfigent has the most major changes. A newline is no longer
read immediately, but is called only by a "goto more" (inside an
if(false) block). This allows multiple definitions or directives
to exist on a single line for anything that doesn't terminate using
a newline. This means a key-values service definition can be followed
by another key-values service definition, a positional definition,
or an ipsec, hostname, or .include directive on the same line.

memset is no longer used explicitly to clear the servtab structure,
a function init_servtab() is used instead, which uses a C struct
initializer.

The servtab se_group field is its own allocation now, and not just
a pointer into the user:group string.

Refactored some stuff out of getconfigent to separate functions
for use by parse_v2.c. These functions in inetd.c are named with
the form parse_*()

parse_v2.c only has code for parsing a key-values service definition
into a provided servtab. It should not have anything that affects
global state other than line and line_number.

Some function prototypes, structures, and #defines have been moved
from inetd.c to inetd.h.

The function config_root replaces config as the function called on
a config file load/reload. The code removed from the end of
config(void) is now called in config_root, so it is not run on each
recursive config call.

setconfig(void) was removed and its code added into config_root
because that is the only place it is called, and redundant checks
for non-null globals were removed because they are always freed by
endconfig. The fseek code was also removed because the config files
are always closed by endconfig.

Rate limiting code was updated to add a per-service per-IP rate
limiting form. Some of that code was refactored out of other places
into functions with names in the form rl_*()

We have not added any of the license or version information to the
new files parse_v2.c, parse_v2.h, and inetd.h and we have not
updated the license or version info for inetd.c.

Security related:

The behavior when reading invalid IPsec strings has changed. Inetd
no longer exits, it quits reading the current config file instead.
Could this impact program security?

We have not checked for memory leaks. Solomon tried to use dmalloc
without success. getconfigent seemed to have a memory leak at each
"goto more". It seems like inetd has never free'd allocated strings
when throwing away erroneous service definitions during parsing
(i.e. when "goto more" is called when parsing fields). OpenBSD's
version calls freeconfig on "goto more"
(c5eae130d6/usr.sbin/inetd/inetd.c (L1049))
but NetBSD only calls it when service definitions are no longer
needed. This has been fixed. freeconfig is called immediately before
any "goto more". There shouldn't be any time when a servtab is in
an invalid state where freeconfig would break.
2021-08-29 09:54:18 +00:00
rillig 250e4c656b tests/lint: demonstrate hashcode sorting of the lint2 output
The hashcodes modulo 1009 are:

 48 func7000
637 func0000
646 no_prototype
697 func1000
757 func2000
817 func3000
877 func4000
937 func5000
997 func6000
2021-08-28 19:45:18 +00:00
rillig 92de156f15 tests/lint: test conversion from long long to intptr_t on ilp32
Seen in usr.bin/make/var.c:1608.
2021-08-25 22:04:51 +00:00
rillig 72e092a39a lint: allow libraries to use 128-bit integer types 2021-08-24 21:30:52 +00:00
rillig 3238e49756 tests/lint2: reduce indentation for mi files 2021-08-24 20:23:38 +00:00
mrg a9e928488d glu_mangle.h is obsolete now. 2021-08-24 00:12:32 +00:00
mrg 1572c22b0c amdgpu_drv.so got bumped. 2021-08-23 23:08:50 +00:00
rillig 3065c1c35d tests/lint: demonstrate wrong constant folding in strict bool mode
Found while investigating wrong constant folding in default mode.
2021-08-22 20:56:51 +00:00
rillig 59e08a43b7 tests/lint: test folding of constant expressions
Since November 2001, there is a comment above the function 'fold' that
suggests there are a few bugs concerning overflow detection.  Add some
first 'proper regression tests' to prove these bugs.
2021-08-19 20:32:33 +00:00
christos 304373e615 bump bind libraries for bind 9.16.20 2021-08-19 11:53:02 +00:00
mrg e92fa7ec4e install amdgpu.ids. 2021-08-19 09:05:22 +00:00
christos 9399dd9e94 don't mark sodium as solaris 2021-08-19 05:09:24 +00:00
christos 86ec36b1ea modules for if_wg, blake2s, libsodium 2021-08-17 17:31:58 +00:00
rillig 653c9ff116 tests/lint: test arithmetic promotions and enums 2021-08-16 20:11:03 +00:00
mrg 22cfb1f2ea install experimental/* and ext/opt_random.h. they're expected to
be there (and the latter was removed by accident.)

regen for everyone (also picks up missing tgmath.h for many ports.)

fixes build of pkgsrc/databases/mongodb for me.
2021-08-16 06:56:20 +00:00
christos c6390902f2 bump ldap libraries 2021-08-14 16:18:32 +00:00
martin 395ca384d5 add directory for debug data for mkdep tests 2021-08-12 15:06:39 +00:00
martin dcbf5445d1 h_findcc.debug is not obsolete 2021-08-12 13:27:42 +00:00
martin e7d4773f7a oops, fix h_findcc entry 2021-08-12 12:51:25 +00:00
martin 462143732b Add new mkdep test helper h_findcc 2021-08-12 11:57:07 +00:00
rillig e91fe367ea tests/mkdep: test findcc
This function is used by both mkdep and lint.
2021-08-11 20:42:26 +00:00
rillig 9cea3ffa32 lint: warn about 'char * = strchr(const char *, int)'
Found in findcc.c, there are about 25 other instances of this
incongruency in the whole source tree.

For more examples of functions from the C Standard Library that
implicitly remove the 'const' qualifier from an argument, see the C++
include file 'cstring'.
2021-08-09 20:07:23 +00:00
andvar 32a556f954 fix various typos in comments and messages. 2021-08-09 19:24:32 +00:00
rillig 00782fec55 tests/lint: make list of tests simpler
Since the file /usr/tests/usr.bin/xlint/lint2/tests has only been in the
file set for a few minutes, it is not marked as obsolete but simply
removed.
2021-08-08 00:02:02 +00:00
rillig 0d9d928d83 tests/lint: test reading of 128-bit integer types and printf 2021-08-07 23:52:32 +00:00
rillig 9a9312cf60 tests/lint: add test for reading the lint1 output 2021-08-07 21:24:13 +00:00
martin fb69eb3d0e Fix copy+pasto (wrong dir for t_lint2) 2021-08-06 08:44:31 +00:00
rillig 2e1c5b53fe tests/lint: add test skeletons for messages from lint2 2021-08-05 22:36:07 +00:00
rillig 827aba3693 tests/lint: test emitting 128-bit integer types for lint2 2021-08-05 06:34:42 +00:00
rillig a88eea7df9 tests/lint: test GCC extension for casting to union type 2021-08-03 20:34:23 +00:00
rillig e4a7be9ba1 tests/lint: test casting a struct to another struct 2021-08-03 18:03:54 +00:00
andvar cba4208ca7 add pcib(4), pceb(4), pcmb(4).
pcmb is a separate man page for i386 only, pceb and pcib are references to pci(4) only and mentioned in its bridges section.
ok riastradh
2021-08-01 21:56:26 +00:00
rillig c8782a7cbc tests/lint: test the usual arithmetic conversions in traditional C 2021-08-01 16:29:28 +00:00
rillig 5489342aeb tests/lint: test the usual arithmetic conversions
The function 'balance' does not mention __uint128_t and nevertheless
works as expected.  Need to investigate further.
2021-08-01 13:31:48 +00:00
rillig c790f31b75 tests/make: split tests for the variable modifier ':O'
The tests for parse errors are now in varmod-order, which lets the other
tests focus on the desired behavior of the modifiers.
2021-07-31 20:55:45 +00:00
rillig d7db1322e4 tests/make: register test varmod-order-numeric 2021-07-30 21:29:00 +00:00
rillig a3535e9c45 tests/lint: cover every code line in the grammar 2021-07-25 22:03:42 +00:00
rillig b51ebfa06f tests/lint: test declarators with attributes 2021-07-25 17:27:07 +00:00
rillig 8c0cb28db5 tests/lint: demonstrate missing support for GCC typeof 2021-07-25 10:57:38 +00:00
rillig f450420d6f tests/lint: test parse errors in statements
These errors are really unrealistic.  Most parse errors that occur in
statements are already handled elsewhere and continue with the next
semicolon.

The tests had to be split into two separate files because lint assumes
that after the 5th parse error, it does not make sense to continue this
translation unit.
2021-07-25 09:29:20 +00:00
rillig 6201c2aa16 tests/lint: test parsing of type_name 2021-07-25 08:42:28 +00:00
nia 92e19c2b10 Add a man page for amdccp(4) 2021-07-25 07:35:55 +00:00
jmcneill dd061977e6 amd64: liveimage: use RC_CONF_EXTRA instead of rc.conf.d 2021-07-24 16:13:44 +00:00
jmcneill 9764bcee56 evbarm: liveimage: use RC_CONF_EXTRA instead of rc.conf.d 2021-07-24 14:00:08 +00:00
jmcneill e5de8b183d bootimage: allow appending additional rc.conf options
If RC_CONF_EXTRA is defined, append the contents of this file to the
target file-system's rc.conf
2021-07-24 13:59:28 +00:00
jmcneill bbc876812d evbarm: Add build.sh live-image support for armv7/aarch64 2021-07-23 21:53:33 +00:00
mrg 5bb478fc82 fix typo in unused obsolete set name. noted by tnn. 2021-07-22 21:49:44 +00:00
rhialto ad4e58736d Extract just the random bits to feed to /dev/urandom.
This makes no difference in the randomness of the pool, but it improves
on the estimation (if any) of how many random bits were obtained.
Also make the ftp -q time out a bit longer since I got some time outs.
2021-07-20 19:31:23 +00:00
rhialto 7f45e8c6a2 Don't override /etc/rc.conf if it sets ec2_init. 2021-07-20 19:27:51 +00:00
rillig ae95f90ee9 tests/lint: cover more edge cases in the parser 2021-07-15 21:00:05 +00:00
rillig ebf03b177e tests/lint: test struct declarations 2021-07-15 19:51:29 +00:00
rhialto 7a21ea705e Add some OpenStack support.
I found that in the cloud I tried, by the time this script runs, there
is no default route in effect yet. That takes some 5 to 10 seconds
longer. So I added a retry loop, and to make that easier, changed the
order of queries.  To make sure it doesn't wait ~forever for a
non-existent service I added the -q 1 option to ftp invocations.

I also added OpenStack-specific metadata which contains a different
random_seed of 512 bytes every time it is requested.  See
https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L355
It may not be trusted data but only in the strictest sense of the word.
The data can only be observed by people with access to the cloud's
overlay network for the particular VM.
2021-07-15 19:03:17 +00:00
rhialto 9e2fdf32c3 Recognize OpenStack too (it also has a metadata service).
Typical values for machdep.dmi are:

machdep.dmi.system-vendor = OpenStack Foundation
machdep.dmi.system-product = OpenStack Nova
machdep.dmi.system-version = 17.0.12
machdep.dmi.system-serial = c46130fb-a56e-43f2-9d98-492d24656b9c
machdep.dmi.system-uuid = 680b8119-0d74-4f78-a6fd-e79dfede905c
machdep.dmi.bios-vendor = SeaBIOS
machdep.dmi.bios-version = 1.10.2-1ubuntu1
machdep.dmi.bios-date = 20140401
machdep.dmi.chassis-vendor = QEMU
machdep.dmi.chassis-type = QEMU
machdep.dmi.chassis-version = pc-i440fx-2.8
machdep.dmi.processor-vendor = QEMU
machdep.dmi.processor-version = pc-i440fx-2.8
machdep.dmi.processor-frequency = 2000 MHz
2021-07-15 17:20:25 +00:00
rillig 60f9e3d3c0 tests/lint: test precedence of operators 2021-07-15 17:09:08 +00:00
rillig a4bbb22780 tests/lint: add several tests for edge cases in the grammar 2021-07-14 20:39:13 +00:00
ozaki-r 83b6f2d1d3 tests: add tests for ALTQ CBQ 2021-07-14 03:22:33 +00:00
ozaki-r 58bf21983f Rump-ify ALTQ (librumpnet_altq.so) 2021-07-14 03:19:23 +00:00
rillig 74ecc89265 tests/lint: test binary integer literals and underscores 2021-07-13 19:38:10 +00:00
mrg ba02891dc9 move the i18n modules into libX11 directly.
fixes at least alacritty, and saves memory too.
2021-07-13 05:53:12 +00:00
mrg 2653f85101 remove mesa < 18 support 2021-07-11 20:48:48 +00:00
rillig ef79d386d3 lint: support __attribute__((hot))
The corresponding attribute 'cold' was already added in cgram.y 1.84
from 2016-12-29.
2021-07-11 19:24:41 +00:00
rillig c35341a502 tests/lint: test dangling else 2021-07-11 18:58:13 +00:00
tsutsui 1008de6bc8 Mention that emulated disks by HPDisk and HPDrive work.
Also add more HP-IB disk models per recent changes.
2021-07-11 14:17:48 +00:00
tsutsui dbdaeffbea HP9000/360 can have up to 16 MB RAM, not 48 MB.
Per Service Information Manual HP 9000 Series 300 Computers Models 360/370.
2021-07-11 13:53:48 +00:00
mrg bca64f6d85 bump minor for for libXfixes 6.0.0's new function 2021-07-11 00:08:06 +00:00
rillig a829c06c9c tests/lint: test declarations 2021-07-10 18:25:57 +00:00
rillig ae427bfb55 tests/lint: add more tests for covering the grammar 2021-07-10 09:24:26 +00:00
tsutsui ce046ada8b Use more shrinked binaries from distrib/utils/x_foo versions. 2021-07-10 03:19:12 +00:00
rillig 09444204eb tests/lint: add test for unrealistic edge cases in declarations
The example code for triggering these grammar rules looks completely
contrived.  Even if lint had not implemented these cases, hopefully
nobody would have ever noticed.
2021-07-09 20:20:03 +00:00
tsutsui 45c2ddaf52 Use more shrinked binaries from distrib/utils/x_foo versions. 2021-07-09 19:11:06 +00:00
yamaguchi b0d413b9c0 added tests for IFF_PROMISC of vlan(4) 2021-07-09 05:54:11 +00:00
christos e517cc9890 Add new interrupted stdio tests 2021-07-08 09:16:24 +00:00
rillig 19f514055a tests/lint: add tests for C90 mode and malformed declarations
In the grammar, 148 lines are still uncovered by the tests.  The
untested parts are mostly obscure declarations and a few parse errors.
2021-07-08 05:18:49 +00:00
rillig b4c7d7a77e tests/lint: add tests for GCC __attribute__
Before fixing the wrong handling of __attribute__ that is demonstrated
at the end of gcc_attribute.c, ensure that the attribute handling works
in the most basic cases.

Lint currently accepts __attribute__ in more places than it should.
This leads to some ambiguities in the grammar.
2021-07-06 17:33:07 +00:00
jmcneill 9d6d007b0d Disable kernfs on live images -- it is not required. 2021-07-06 11:49:36 +00:00
rillig b1bcf212c7 test/lint: demonstrate wrong warnings for 128-bit shifts 2021-07-04 20:22:31 +00:00
rillig 68c2fce363 lint: remove remaining support for lvalue casts
These had been GCC extensions until GCC 3.4, they were removed in GCC
4.0.
2021-07-04 13:14:53 +00:00
rillig d5273b4cbf lint: remove outdated assertion
Since err.c 1.12 from 2000-07-06, lint allows to suppress individual
error messages.  Suppressed error messages do not increment nerr.
Keeping nerr at 0 had triggered the assertion.
2021-07-04 08:19:05 +00:00
rillig 3020101578 tests/lint: add test for suppressing errors in strict bool mode 2021-07-04 07:50:53 +00:00
rillig 5088bff9da tests/lint: fix test for character comparison on macppc
On macppc, char == unsigned char, which generates one more warning than
on platforms where char == signed char.
2021-07-03 19:31:22 +00:00
rillig 933a6ade01 tests/lint: add test for array subscripts in C99 initialization 2021-07-02 21:52:36 +00:00
jmcneill fc920d3dcf AWS marketplace does not allow root ssh logins. Create an ec2-user account
and install the ssh key in that user's home directory instead.
2021-07-01 18:05:45 +00:00
jmcneill 33c1feaac0 port-evbarm/56274: no network on ec2 arm64 9.99.85
Add -w to dhcpcd_flags when running on EC2, since we need to wait for the
network to come up before contacting the metadata service.
2021-07-01 17:32:07 +00:00
jmcneill cd1407a13d No need for ec2_init on arm64mbr 2021-07-01 17:31:21 +00:00
rillig 95d33e8c9b lint: fix wrong warning about out-of-range value '\xff' for char
This only affects platforms where char has the same representation as
unsigned char.
2021-06-29 21:33:08 +00:00
rillig b468abca3b tests/lint: add test that only runs where char == unsigned char
There a 4 regular NetBSD builds where lint is activated.  All these
builds run on platforms where char == signed char.

The official test runs from https://releng.netbsd.org/test-results.html
mostly have char == signed char as well.

However, lint behaves differently on platforms with char == unsigned
char.  On these platforms, a simple "char ch = '\xff'" leads to the
bogus warning that "conversion of 'int' to 'char' is out of range".
2021-06-29 13:58:13 +00:00
nia f3c68eb2b0 Remove uscanner(4) driver
This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.
2021-06-29 10:22:33 +00:00
rillig b7cb676ee4 tests/lint: add tests for ILP32 platforms
Previously, all tests for lint had to produce the exact same output, no
matter which platform they ran on.  This differs from practical needs
since lint is intended to produce different results depending on whether
the platform is ILP32 or LP64.

Examples for these are type conversions and the widths of the integer
types during lexical analysis.
2021-06-29 09:19:17 +00:00
rillig cec0b2453a lint: require C11 for _Generic
This does not have any effect in practice since the option -g
(originally meant for GCC extensions to the C standards) implicitly
allows all features from C11, since err.c 1.111 from 2021-04-14.

Since the default lint flags for NetBSD builds include the option -g,
this allows all C11 features.

Currently it is not possible to say "allow GNU extensions but not C11".
2021-06-27 19:10:29 +00:00
rillig f1f9bbff8d lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at
the same time prohibited 'long long', which was added in C99.  This was
caused by the option -s, which is interpreted as "allow features from
C90, but no later".

The test for _Generic, which has been added in C11, demonstrates that
the current implementation is broken.  Lint currently thinks that the
return type of a _Generic selection is the type of the expression, but
it really is the type of the selected expression.  In the current tests,
this is always 'const char *', but C11 does not require that the types
of a generic selection are compatible.
2021-06-27 18:48:45 +00:00
rillig d0d870848f tests/lint: fix list of files to be installed 2021-06-27 12:11:10 +00:00
rillig 9e9145368b tests/lint: rename expected .ln file to .exp-ln
This way, the hack for suffixes is no longer needed.
2021-06-27 09:22:31 +00:00
tsutsui 0c4d55b76b Use more SMALL binaries and reduce diffs between sun2 and sun3. 2021-06-27 05:25:12 +00:00
tsutsui 9ccb882469 Check if /tmp is writable to see whether the rootdev is already mounted.
Creating a dummy /tmp/root_writable file and after mountroot and
checking it on the second installation could be problematic if
users retry to installation after reboot without reinstalling miniroot.
Taken from amiga.
2021-06-26 00:38:16 +00:00
tsutsui 24d61f13ac Remove an obsolete comment. 2021-06-26 00:28:19 +00:00
tsutsui f5daf4027b Don't try to add swap on miniroot. 2021-06-26 00:25:41 +00:00
christos 283cefe320 build gdbserver only when we build gdb (from adam) 2021-06-23 18:30:32 +00:00
rillig 513d7d3b4c tests/lint: test syntax error in initialization using designator
This test prepares the upcoming refactoring of the grammar.
2021-06-20 18:09:48 +00:00
rillig c8d33d92f3 lint: fix endless loop on unfinished comment at EOF
Found using afl.
2021-06-19 20:25:57 +00:00
rillig 921647eafa lint: fix assertion after malformed for loop
Found using afl.
2021-06-19 19:59:01 +00:00
rillig 8873496543 lint: fix assertion failure in struct with unnamed member
Found using afl.
2021-06-19 19:49:15 +00:00
rillig 0c0b119a5d lint: fix crash in malformed initialization 2021-06-19 15:51:11 +00:00
rillig 3ce615eb20 tests/lint: add test cases for lexical analysis 2021-06-19 08:30:08 +00:00
tsutsui 56bb4f15d0 The modules and rescue sets are also required on upgrade.
Should be pulled up to netbsd-9 and netbsd-8.
2021-06-19 00:54:27 +00:00
tsutsui e3c0c034ba Remove netstat(1) calls to print resolver info on upgrade using miniroot.
netstat(1) was removed from miniroot 25 years ago.
 http://cvsweb.netbsd.org/bsdweb.cgi/src/distrib/miniroot/list#rev1.5
2021-06-19 00:00:26 +00:00
tsutsui 17794e1c77 Replace RELEASE and VERSION strings proplery.
sun2 and sun3 don't use MI src/distrib/miniroot/list so this should
have been sync'ed with it.
http://cvsweb.netbsd.org/bsdweb.cgi/src/distrib/miniroot/list#rev1.36
>> 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).

Should be pulled up to netbsd-9.
2021-06-18 23:55:20 +00:00
mrg f253073ae0 make this build with GCC 10.
change makefs flags from:
   density=2048
to:
   density=3072,bsize=4096,fsize=512,optimization=space

so that everything fits again.  add some comment GCC flags
that may help reduce size a little more.
2021-06-18 20:30:58 +00:00
christos 99047b006e new libfido2 2021-06-17 01:16:55 +00:00
rillig e579b79c76 tests/make: demonstrate wrong error handling in jobs mode 2021-06-16 09:39:48 +00:00
christos 9f4fca625f Good bye oabi! Tested building earmv7hf. 2021-06-07 17:11:16 +00:00
christos 1107fae2d2 enable gdbserver for amd64 (so that we don't break its build). 2021-06-07 14:24:42 +00:00
blymn 9bd6f52099 New check files added for the libcurses addstr test. 2021-06-06 04:59:36 +00:00
blymn 9e0181d348 New check file for libcurses clear test. 2021-06-05 22:17:15 +00:00
tsutsui 8f008b4571 Check and remove a stale work file for UEFI images with incorrect size.
Fixes PR/56132 (build.sh target install-image fails in update-mode).
2021-06-04 17:09:36 +00:00
wiz 70e5bf71e9 Fix typo, caught by riastradh 2021-06-03 13:16:41 +00:00
wiz 9fa9487eaa Remove i386/autoconf(4) and i386/console(4) to x86/autoconf(4) and x86/console(4)
Part of PR 36350.
2021-06-03 07:41:26 +00:00
pgoyette e9c9ba6378 The install image grew again - update size 2021-06-02 16:07:33 +00:00
jmcneill 870ca5eaaa Install a copy of rk3399-pinebook-pro.dtb to the base dtb directory for
compatibility with the factory firmware. Normally this is frowned upon,
but this is the only easy way to boot NetBSD on this board without
having to crack open the case and/or hook up a serial console.
2021-06-02 10:31:18 +00:00
martin f57f1d679b bump slightly harder 2021-05-31 07:59:02 +00:00
martin f9b8c0de16 Bump image size slightly (for gcc 10) 2021-05-30 09:54:56 +00:00
joerg 53d1339bf7 Update LLVM build system for 249b40b558955afe5ac2b549edcf2d7f859c8cc9
This enables the use of modules for a significant build performance gain
when building with clang as host compiler or when using HAVE_LLVM=yes.
Switch libc++ to using the copy from the mono-repo.
2021-05-30 01:56:44 +00:00
tsutsui b99d783a87 Handle recent ifconfig(8) outputs in the miniroot installation script.
- Remove netmask slash notation for IP addresses,
  which has been changed between NetBSD 7.x and 8.0:
  http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ifconfig/af_inet.c#rev1.24
- Ignore inet6 entries, which miniroot scripts don't support

Should be pulled up to netbsd-9 and netbsd-8.
2021-05-29 23:46:14 +00:00
thorpej db251d8e92 Document netbsd-GENERIC.QEMU.gz 2021-05-29 19:03:08 +00:00
martin e2871a9909 PR 55413: 64-bit and OK police; grammar improvements.
From Michael Siegel.
2021-05-28 13:55:24 +00:00
martin 3ec01e58b6 Consistency and typo/grammar fixes from Michael Siegel in PR 55413,
With minor adjustments.
2021-05-27 15:47:42 +00:00
jdc 64aa1a5b3e Restore the pnozz Xorg driver, now that it has EXA support. 2021-05-27 04:55:34 +00:00
rillig 7e868d5633 tests/lint: make test d_gcc_extension platform-independent
That test was intended to test the keywords '__extension__' and
'__typeof'.  The GCC builtin functions were just a side-effect.

These built-in functions generated error messages on platforms such as
amd64 where sizeof(long double) != sizeof(double), but not on others
such as sparc.

The current infrastructure for the lint tests cannot handle tests with
platform-dependent outcome.
2021-05-25 19:22:18 +00:00
martin 0e85b4583d While we do not yet have any 64bit kernels, do not build
floppy or CD images for installation.
2021-05-25 11:55:40 +00:00
martin a8ecadd243 Provide support to build 32bit crunched ramdisks and use that for
macppc64. With help from rin.
2021-05-25 10:58:41 +00:00
christos 81aad16d1a PR/56207: Jan-Benedict Glaw: Handle error from find when removing CVS
directories on a git repo.
2021-05-24 22:40:44 +00:00
christos 42e0c9de41 refuse should exit(3). Noted by joerg@ 2021-05-24 21:34:06 +00:00
yamaguchi f0101d0e08 Add a new link-aggregation pseudo interface named lagg(4)
- FreeBSD's lagg(4) based implementation
 - MP-safe and MP-scalable
2021-05-17 04:07:41 +00:00
rillig 2999d7a951 lint: add more specific warning for bit-field of type plain 'int'
Previously, declaring a bit-field of type plain 'int' resulted in this
warning:

	warning: nonportable bit-field type 'int' [34]

This warning was too unspecific to be actionable, and until yesterday it
didn't even include the type.  In order to allow this warning to be
understood and properly fixed, describe the actual nonportability more
precisely:

	warning: bit-field of type plain 'int' has
	implementation-defined signedness [344]
2021-05-16 11:11:36 +00:00
rillig e966428344 tests/lint: add expected output for testing '&' in switch statement 2021-05-16 00:09:49 +00:00
rillig e0df50670a tests/lint: test bitwise mismatch in switch statement 2021-05-14 21:14:55 +00:00
simonb dfd617a3b0 Column alignment. 2021-05-10 14:27:47 +00:00
rin 2b8ef595e1 Add missing aiomixer.debug to fix debug build.
XXX
I *really* hope someone(TM) invent better replacement of
distrib/sets/lists...
2021-05-08 09:23:37 +00:00
nia 209f7af6d7 hook up aiomixer 2021-05-07 21:51:20 +00:00
simonb e85380d6f9 Add links for the other functions documented in arc4random(3). 2021-05-03 11:07:55 +00:00
rillig c29d5e341f tests/lint: add test for bit-field types in GCC mode 2021-05-02 21:22:09 +00:00