CVS commit: src/tests/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:00:07 UTC 2021

Modified Files:
src/tests/lib/libcurses: t_curses.sh
src/tests/lib/libcurses/director: director.c testlang_conf.l

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tests/lib/libcurses/t_curses.sh
cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libcurses/director/director.c
cvs rdiff -u -r1.18 -r1.19 src/tests/lib/libcurses/director/testlang_conf.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:14:46 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c director.h returns.h
testlang_conf.l testlang_parse.y
src/tests/lib/libcurses/slave: command_table.h commands.c
curses_commands.c curses_commands.h

Log Message:
tests/libcurses: clean up inclusion guards, function declarations

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/tests/lib/libcurses/director/director.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/director/director.h
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libcurses/director/returns.h
cvs rdiff -u -r1.19 -r1.20 src/tests/lib/libcurses/director/testlang_conf.l
cvs rdiff -u -r1.45 -r1.46 src/tests/lib/libcurses/director/testlang_parse.y
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/slave/command_table.h \
src/tests/lib/libcurses/slave/curses_commands.h
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libcurses/slave/commands.c
cvs rdiff -u -r1.21 -r1.22 src/tests/lib/libcurses/slave/curses_commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:17:15 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: slave.c slave.h

Log Message:
tests/libcurses: clean up remaining include guard, comments

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libcurses/slave/slave.c
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/slave/slave.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:22:34 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: remove include path from usage message

The option has been removed a few minutes ago.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:26:12 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
tests/libcurses: remove undocumented, unused command line option

The option -T has the same effect as the removed option -p.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:37:21 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: mvwin

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/mvwin

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/director

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 08:43:03 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: fix error messages


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 09:18:12 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c
src/tests/lib/libcurses/slave: slave.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/tests/lib/libcurses/director/director.c
cvs rdiff -u -r1.13 -r1.14 src/tests/lib/libcurses/slave/slave.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 09:28:27 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: slave.c

Log Message:
tests/libcurses: fix reading from the parent process

In case of a short read, processing the incomplete data invoked
undefined behavior.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libcurses/slave/slave.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 10:03:49 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: slave.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libcurses/slave/slave.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 10:37:00 UTC 2021

Modified Files:
src/lib/libcurses: curses.h

Log Message:
curses.h: proofread, indent a bit more consistently


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/lib/libcurses/curses.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2021-02-13 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Feb 13 13:00:16 UTC 2021

Modified Files:
src/sys/net: if_ethersubr.c if_gre.c
src/sys/netinet: if_arp.c

Log Message:
Prior alignment fixes should not use an offset


To generate a diff of this commit:
cvs rdiff -u -r1.290 -r1.291 src/sys/net/if_ethersubr.c
cvs rdiff -u -r1.178 -r1.179 src/sys/net/if_gre.c
cvs rdiff -u -r1.299 -r1.300 src/sys/netinet/if_arp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 14:30:37 UTC 2021

Modified Files:
src/lib/libcurses: addbytes.c
src/tests/lib/libcurses/check_files: addch.chk
src/tests/lib/libcurses/tests: addch

Log Message:
libcurses: fix wrong tab width for addch

In sysinst, the installation screen is indented with tabs.  Sysinst uses
msgc, which brings its own text layout engine.  This engine does not use
addbytes but addch.  In addch, the x position for each tab was advanced
twice as much as needed.  The menu items were thus not indented by 8
spaces but by 16, which caused an ugly line break in the German
translation.

This bug largely went unnoticed because most other applications use
addbytes instead, which worked fine all the time.  It had been
introduced somewhere between NetBSD 8.0 and NetBSD 9.0.

The code around this bug used aliased variables for win->curx and
win->cury a lot.  Getting this right is difficult and needs a thorough
test suite.  Even though libcurses has 201 tests, that is not nearly
enough to cover all the relations between the various functions in
libcurses that call each other, crossing API boundaries from internal
to external, doing character conversions on the way and juggling around
4 different types of characters (char, wchar_t, chtype, cchar_t).

The simplest fix was to remove all this aliasing, while keeping the
API the same.  If _cursesi_waddbytes is not considered part of the API,
it would be possible to replace px with win->curx in all places, same
for py and win->cury.

The complicated code with the aliasing may have been meant for
performance reasons, but it's hard to see any advantage if both points
of truth need to be synchronized all the time.

Libcurses can be built in 2 modes: with wide character support or
without (-DDISABLE_WCHAR).  The test suite only covers the variant with
wide characters.  The single-byte variant has to be tested manually.
Running sysinst with the single-byte libcurses produces the correct
layout.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/lib/libcurses/addbytes.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/check_files/addch.chk
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libcurses/tests/addch

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/sysinst

2021-02-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 13 15:31:36 UTC 2021

Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c

Log Message:
PR 55991: when extending the marked partition (typically: the NetBSD root
partition) round the new size up to current alignment.

This may lead to a slightly smaller than initialy planned last partition
(depending on order added) if the disk size is odd or the partitioning
scheme needs some internal space (like GPT) - but it avoids gaps elsewhere
due to alignement.

Ideally we would pin all other partitions in a first pass and then let
the partitioning backend pick the full available size for the extended
partition, but this should be good enough.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/usr.sbin/sysinst/bsddisklabel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/via

2021-02-13 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Feb 13 15:42:15 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/via: via_pci.c

Log Message:
Add aprint_*() newlines for viadrmums(4) attach

>From Andrius V in kern/55884


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/via/via_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2021-02-13 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Feb 13 16:33:30 UTC 2021

Modified Files:
src/sys/dev/pci: if_bnx.c if_bnxreg.h

Log Message:
Curb aprint_*() abuse in bnx(4)


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/dev/pci/if_bnx.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/if_bnxreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 16:38:02 UTC 2021

Modified Files:
src/tests/lib/libcurses: atf.terminfo

Log Message:
tests/libcurses: split terminfo entry over more lines

This provides space to see each capability on its own, instead of having
to search them in the blob of text.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/atf.terminfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 16:43:12 UTC 2021

Modified Files:
src/tests/lib/libcurses: atf.terminfo

Log Message:
tests/libcurses: use ASCII only in terminfo description


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/atf.terminfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/aarch64/aarch64

2021-02-13 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Feb 13 18:13:54 UTC 2021

Modified Files:
src/sys/arch/aarch64/aarch64: pmap.c

Log Message:
No assignment is needed here.

the loop in pmap_page_remove() always removes the first pv,
and since the list is managed by _pmap_remove_pv(), pp->pp_pv.pv_next always 
points to the first.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/aarch64/aarch64/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 18:24:11 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: lint.lua

Log Message:
tests/libcurses: remove unused code in linter


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/slave/lint.lua

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/slave

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 19:23:11 UTC 2021

Modified Files:
src/tests/lib/libcurses/slave: commands.c

Log Message:
tests/libcurses: protect against short writes

The previous code only errored out if a write failed completely.  If it
was partially written, the program continued without writing the rest of
it.

Extract the common code into a few functions that write raw data to the
parent process.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libcurses/slave/commands.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/tests

2021-02-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Feb 13 22:19:47 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: addbytes

Log Message:
tests/libcurses: note that addbytes is not part of the API

https://mail-index.netbsd.org/source-changes-d/2021/02/13/msg013199.html


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/addbytes

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/usr.bin/nbperf

2021-02-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Feb 14 01:27:33 UTC 2021

Modified Files:
src/tests/usr.bin/nbperf: t_nbperf.sh

Log Message:
Adjust test cases to hit the fudge case after the changes in nbperf
itself.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/nbperf/t_nbperf.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/audio

2021-02-13 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Feb 14 03:41:13 UTC 2021

Modified Files:
src/sys/dev/audio: audio.c

Log Message:
Add missing curlwp_bindx() corresponding to curlwp_bind().
Pointed out by riastradh@.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/audio/audio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.