Commit Graph

285404 Commits

Author SHA1 Message Date
rillig
76716cd400 curses.h: proofread, indent a bit more consistently 2021-02-13 10:37:00 +00:00
rillig
86536876fb tests/libcurses: extract read_command_argument from process_commands
Having code indented so far to the right that each word gets its own
line is ridiculous.  Fix that.

While here, remove the cargo-cult realloc pattern, which is not needed
if the process exits immediately on error.

While here, reduce the indentation of the code by returning early.

No functional change.
2021-02-13 10:03:49 +00:00
rillig
78dd027b59 tests/libcurses: fix reading from the parent process
In case of a short read, processing the incomplete data invoked
undefined behavior.
2021-02-13 09:28:27 +00:00
rillig
2eec569208 tests/libcurses: fix child process handling
The child process needs to be properly controlled by the parent process.
Otherwise it is not possible to get code coverage data from it using
gcov since that requires the child process to exit normally.  Previously
the child process had been killed because its parent had exited.
2021-02-13 09:18:12 +00:00
rillig
2d435e1f5f tests/libcurses: fix error messages 2021-02-13 08:43:03 +00:00
rillig
c671531bee tests/libcurses: "fix" test mvwin
The test mvwin previously expected an endless stream of bytes, by
comparing the actual output with /dev/zero.  This didn't make sense as
the curses output does not contain '\0' in any of the test cases.

Compare with /dev/null instead.  This is as wrong as before, but the
curses test framework currently ignores this situation, as for many
other test cases.  See the numerous "Excess" messages in atf-run.log.
2021-02-13 08:37:21 +00:00
rillig
08813b709b tests/libcurses: remove undocumented, unused command line option
The option -T has the same effect as the removed option -p.
2021-02-13 08:26:12 +00:00
rillig
dcdcb866a3 tests/libcurses: remove include path from usage message
The option has been removed a few minutes ago.
2021-02-13 08:22:34 +00:00
rillig
177fdb97a1 tests/libcurses: clean up remaining include guard, comments
No functional change.
2021-02-13 08:17:15 +00:00
rillig
cf012ad48f tests/libcurses: clean up inclusion guards, function declarations
No functional change.
2021-02-13 08:14:46 +00:00
rillig
dfef510f35 tests/libcurses: remove include path handling
All include commands in the current test suite use relative paths.
Instead of a fixed include path, interpret the included filename
relative to the including file.
2021-02-13 08:00:07 +00:00
roy
dd39d07da7 if_arp: Ensure that arphdr is aligned 2021-02-13 07:57:09 +00:00
rillig
8e1e8b7233 tests/libcurses: align comments 2021-02-13 07:32:19 +00:00
rillig
c8713e3dc5 tests/libcurses: fix misleading usage documentation
The check-files are not config files.
2021-02-13 07:31:07 +00:00
roy
1aaed635b1 if_ether: Ensure that ether_header is aligned 2021-02-13 07:28:04 +00:00
rillig
1b4c237756 tests/libcurses: fix pipe handling in the parent process
The parent process, like the child process, needs only 2 of the 4 pipe
ends.

In verbose mode (now at testlang_parse.y:1151 and :1154), both ends of the
pipe_from_slave were examined.  This looked like a typo and has been fixed
to those pipe ends that are relevant to the parent process.
2021-02-13 07:08:45 +00:00
rillig
26ce28a5a0 tests/libcurses: fix pipe handling in child process
The child process only ever needs 2 ends of the pipes: one for reading
the commands, one for writing back the results.
2021-02-13 06:45:42 +00:00
rillig
ff6217c297 tests/libcurses: add test for addbytes 2021-02-13 06:29:45 +00:00
dholland
aad6139743 Document EINVAL for invalid flags given to fsync_range(). 2021-02-13 06:24:08 +00:00
rillig
2f4dbca7fd tests/libcurses: fix warnings for missing environment variables 2021-02-13 05:38:16 +00:00
thorpej
9411508aff Improve readability of this file by adding register prefixes. 2021-02-13 02:17:02 +00:00
jakllsch
84ed9069d5 Revert bnx(4) to INTx interrupts.
Should fix PR kern/55974.

This driver does not yet do the special MSI and MSI-X setup that the
chip apparently requires.
2021-02-13 01:51:24 +00:00
thorpej
845bb89288 - Don't change to the OFW stack in C code; instead, switch to the OFW
stack in the openfirmware() wrapper itself.  Inspired by a similar
  change in OpenBSD designed to appease clang.
- The OF_*() entry firmware interfaces use several global resources;
  protect those global resources with a __cpu_simple_lock_t.
- Make ofbcopy() static -- it's no longer referenced outside openfirm.c
2021-02-13 01:48:33 +00:00
thorpej
106bb031ae Call cpu_model_init() after clearing the MSR. 2021-02-13 01:11:58 +00:00
thorpej
9c01e8876c Add some comments to help visually track the nested #ifdef blocks in
ofwoea_batinit().
2021-02-12 23:40:02 +00:00
thorpej
5b0f387aaa No need for a prototype of ofbcopy() here. 2021-02-12 23:38:17 +00:00
ryo
743e52a1a7 UART_RFIFO_REG should be masked before passing to cn_check_magic(). there is any data in other than the lower 8 bits. 2021-02-12 21:39:55 +00:00
rillig
ef1df6f9cf tests/libcurses: format misleading do-while loop 2021-02-12 21:29:54 +00:00
rillig
18799db59b tests/libcurses: remove wrong comments 2021-02-12 21:29:03 +00:00
rillig
ca234efa6a tests/libcurses: remove excess empty lines 2021-02-12 20:45:00 +00:00
rillig
450da2d661 tests/libcurses: query function arguments in consistent order 2021-02-12 20:41:37 +00:00
roy
c77555a631 if_gre: Ensure that gre_h is aligned 2021-02-12 19:57:49 +00:00
jmcneill
7271b77973 entropy: Only print consolidation warning of AB_DEBUG.
The previous fix for PR kern/55458 changed printf to log(LOG_DEBUG, ...) with
the intent of hiding the message unless 'boot -x'. But this did not actually
suppress the message to console as log(LOG_DEBUG, ...) will print to console
if syslogd is not running yet.

So instead, just check for AB_DEBUG flag directly in boothowto, and only
printf the message if it is set.
2021-02-12 19:48:26 +00:00
rillig
25ddeb49df tests/libcurses: don't access args directly
By providing declarative syntax for accessing the arguments, the
unnecessarily detailed boilerplate code is hidden.  This allows easy
inspection by tools and humans, to check for typos and other mistakes.
2021-02-12 18:20:05 +00:00
rillig
5326ff7afe tests/libcurses: replace ARG_CHTYPE_STRING with ARG_CHTYPE
All uses of the previous macro did not treat the argument as a string or
array of chtype, but as a single chtype.  It's strange that the previous
code arbitrarily split the access to the argument by first storing it as
a pointer and then dereferencing it.

No functional change.
2021-02-12 16:59:32 +00:00
rillig
a346ecb379 tests/libcurses: add shortcut macros for SCREEN and unsigned int 2021-02-12 16:49:18 +00:00
rillig
c7ac460c19 tests/libcurses: remove redundant comments
There is nothing surprising about call2, call3 or call4.
2021-02-12 14:05:57 +00:00
rillig
1fe7fa71d8 tests/libcurses: reduce boilerplate in function dispatcher
No functional change.  The generated code for GCC 9.3 on NetBSD 9.99.80
x86_64 is exactly the same as before.
2021-02-12 12:58:52 +00:00
jmcneill
3771b87f20 Reset serial terminal to default state at boot.
UEFI may leave the serial console in an undesireable state (incorrect
foreground and background colour, etc) when exiting. Send ANSI escape
sequences when setting up the early console attachments to turn off
character attributes and erase from the cursor to the end of the screen.
2021-02-12 12:26:09 +00:00
leot
53e7d520bd Add HOTP and TOTP 2021-02-12 08:56:04 +00:00
rillig
b1b4392b00 tests/libcurses: reduce boilerplate in function dispatcher
This makes the code more declarative and easier to reason about.

The generated code stays exactly the same.
2021-02-12 08:55:32 +00:00
riastradh
17dd2b3b7e rnd(4): Consistently call it the `global pool'.
The `ready pool' is a term I used in a draft that I never committed.
2021-02-12 01:52:09 +00:00
macallan
b07abf8aa9 remove unused/useless #ifdef block 2021-02-11 19:06:24 +00:00
mrg
2e97e19f4b add new files for xterm 366. 2021-02-11 12:30:08 +00:00
mrg
b0f74aaafd clean up issues detected by address sanitizer (just some memory
leaks that only apply to the library version.)

XXX: the handling of hr_file and its variants is more crappy
again - the prior clean up is slightly less clean now, but at
least it does not leak memory.

XXX2: cgi-bin test hangs with address sanitizer.  don't know
why yet..
2021-02-11 09:57:52 +00:00
mrg
12d8621dac changes in bozohttpd 20210210:
o  fix various NULL derefs from malformed headers.  mostly from
	   <emily@ingalls.rocks>.
2021-02-11 09:23:55 +00:00
ryo
d9af110bc0 include "opt_gprof.h" so that _PROF_PROLOGUE works properly in ENTRY() macro in *.S files 2021-02-11 08:35:11 +00:00
tsutsui
1e06acd5c6 Fix a message for NMI.
Maybe the "keyboard NMI" message was derived from hp300 but
on X68030 NMI is triggered by the NMI button, and there is no
parity check.
2021-02-11 02:37:11 +00:00
ryoon
28390de185 Enable to mount Raspberry Pi Pico's USB mass storage partition
Fix PR kern/55985.
O.k. by thorpej@.

Pull-up to netbsd-8 and netbsd-9.
2021-02-11 00:15:55 +00:00
christos
45516a99e8 PR/55986: Ryo Onodera: DK_BUSY must have mask as second argument. Make cd.c
consistent by also using __BIT()
2021-02-10 16:30:01 +00:00