Commit Graph

19 Commits

Author SHA1 Message Date
maxv e497fc86e6 Add tests on the x86 PTEs. We scan the MMU page tables directly and verify
certain properties.
2020-04-26 09:08:40 +00:00
christos 0dc8cda9a3 Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
2020-03-01 18:08:12 +00:00
christos 6851d4c465 Re-arrange the ufetchstore tests to look like the other ones. 2019-04-15 23:41:23 +00:00
thorpej 91bfaeb675 Overhaul the API used to fetch and store individual memory cells in
userspace.  The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms.  The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
2019-04-06 03:06:23 +00:00
kamil 0fe7e51662 Add KCOV - kernel code coverage tracing device
The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.
2019-02-23 03:10:05 +00:00
christos 78928445f5 PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.
2019-01-25 18:33:58 +00:00
martin edea8a3220 PR 52864: add a test for this bug, from sevan@ 2018-01-08 14:17:15 +00:00
christos ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
he f693807fd8 Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser.  Fixes build for sun2.
2014-06-10 04:28:39 +00:00
jruoho e49dc377ca Add a helper program that loads a module and returns the errno from modctl(8).
XXX: As noted on tech-kern@, the syscall should be modified to fail
     consistently with a given predefined errno on non-MODULAR kernels.
2012-04-13 07:05:32 +00:00
jmmv 1cf12d0216 Add a test to ensure that PAGE_SIZE is available in kernel modules.
This test reproduces the error condition in PR port-macppc/46041 and
therefore it is an xfail in this particular platform.
2012-02-17 22:36:50 +00:00
pooka faf9d0caed tests for builtin modules 2010-08-27 09:56:40 +00:00
pgoyette bb793fe2e6 Fix botched update. 2010-08-21 13:57:41 +00:00
pgoyette 60bf661b9d Add a new atf test-case to check that recursive module calls actually work. 2010-08-21 13:21:48 +00:00
jmmv 9d0b4b5bb8 Get rid of static Atffiles and let bsd.test.mk generate them on the fly. 2010-07-13 21:13:21 +00:00
ad 0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
jmmv 5a5601438b Convert NetBSD-specific tests that were previously written in C++ to C now
that ATF provides a C-only binding (comes with 0.5).
2008-05-01 15:38:17 +00:00
jmmv 256b5bd1a9 Add tests for load-time parameter passing to modules, both at the syscall
level through modctl(2) and at the user level through the modload(8)
utility.
2008-03-02 11:22:10 +00:00
jmmv 42d50c9507 Add preliminary tests (basically a placeholder for now) for the new modules
framework.  At the moment, this just tests for plain load (i.e. no arguments
passed to load) and later unload of the module through the modctl(2) system
call.  The tools are not tested yet.
2008-02-10 12:40:10 +00:00