Commit Graph

17053 Commits

Author SHA1 Message Date
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