Commit Graph

41 Commits

Author SHA1 Message Date
christos c54cb81102 Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
2017-01-13 21:30:39 +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
martin d0ba1a0677 Fix stupid thinko when checking for the availability of options MODULAR
and permission to load modules.
2012-08-20 08:07:52 +00:00
martin f3b7cec914 Be more verbose if we get unexpected error codes from modctl. 2012-08-19 20:54:56 +00:00
martin 66c66d2d86 Make use of the new MODCTL_EXISTS check to query kernel wether (and why
not) we can load modules.
2012-08-13 08:07:03 +00:00
dsl 9ba407934a Fix build - delete extra & 2012-06-03 10:59:44 +00:00
jruoho 84c32e5f2a For now, skip module tests if modctl(8) fails either with EPERM or ENOSYS. 2012-04-20 05:41:25 +00:00
martin ca7d70aa58 While we need an absolute path when loading a module (including the .kmod
extension), we want the shortname w/o extension for the unload.
2012-04-17 21:39:19 +00:00
jruoho ce711fc79d Avoid zero-length format string. 2012-04-17 06:23:52 +00:00
jruoho 681aa38aee Adjust. 2012-04-17 05:18:54 +00:00
pgoyette d2616fb0aa The k_helper3 program does not need to be (and shouldn't be) installed
in its own subdirectory.
2012-04-14 02:46:17 +00:00
pgoyette 84c6871a07 Let's get it right this time. 2012-04-13 15:02:37 +00:00
pgoyette bfea36353b Put k_helper3 in the correct location. 2012-04-13 14:54: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
jruoho a4f8c0aaa1 Skip Xen. XXX: There should be a reliable way to detect MODULAR. 2012-03-20 05:50:11 +00:00
joerg 66dd2755f5 Add __printflike attribution to use vprintf and friends with an argument
as format string.
2012-03-15 02:02:20 +00:00
jruoho 96d2b606cc A modctl(MODCTL_STAT, ...) always succeeds, even in non-modular kernels such
as Xen domUs. Thus, refactor the code to detect non-modular kernels; when the
other operations (MODCTL_LOAD or MODCTL_UNLOAD) fail specifically with ENOSYS,
this is taken as a hint about non-modularity and the test is skipped.
2012-03-13 05:56:46 +00:00
jruoho 21ea49cf59 Skip the tests even if modctl(2) does not fail specifically with ENOSYS. 2012-03-11 19:33:17 +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
jmmv 27486724f4 Prevent failures from cleanup routines. Do so by only attempting to do the
cleanup if the test case did not succeed (as, when it succeeds, the cleanup
has already happened).
2011-03-24 21:52:51 +00:00
jmmv decf2b5e0f Adjusts tests after import of atf-0.12:
- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
  unprivileged-user:_atf setting.  This probably deserves a fix somehow
  but I'm not sure at this point.
2010-11-07 17:51:16 +00:00
christos 0f10aa9dce add Makefile.inc everywhere so that we can set WARNS=4 by default. Amazing
how many bugs this found :-)
2010-11-03 16:10:19 +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
jmmv e834f57d5e Properly mark some test cases as having a cleanup routine. Stupidity of
the API?  Most likely; will revise it.

Fixes atf-run breaking when running t_psshfs.  This does not resolve the
underlying issue though, which is atf-run getting confused trying to
unmount the temporary mount point by itself (I think).  (I'm now wondering
if atf should be bothering about unmounting stuff at all.  Maybe not. It is
a tricky and uncommon thing.)
2010-07-05 16:27:08 +00:00
jmmv 6b84fb92ac atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory.  The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it.  (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
2010-06-04 08:39:40 +00:00
jmmv 454557d79e Adjust tests to work with the new API in ATF 0.6. 2009-01-19 07:15:46 +00:00
jmmv 6725d3eeec Kernel modules (kmod files) are now installed in a subdirectory per module.
Make these tests aware of this so that they work again.
2009-01-04 17:56:57 +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
dyoung eeabda7de2 Fix two bugs to make MKMODULAR=yes builds will work again, for the
first time.

share/mk/bsd.kmodule.mk: only set _INST_DIRS if KMODULEDIR is not
    set.  That we we avoid installing some bogus directories in
    the DESTDIR and in $DESTDIR/METALOG.

tests/modules/k_helper/Makefile: add missing .include <bsd.own.mk>,
    and set the KMODULEDIR that the author seems to have intended.
2008-05-31 19:58:35 +00:00
jmmv 940585f3ea Fix MKMODULAR=yes builds by resolving installation problems of the k_helper
test module after the introduction of bsd.kmodule.mk.  The files list was
inconsistent with the new module structure and the Makefile did not use the
correct variable to specify the installation of the module.  Hi ad@!
2008-05-05 19:33:09 +00:00
ad 3ba209837a - Add a bsd.kmodule.mk to build new style modules.
- Set the file suffix to .kmod
2008-05-02 14:20: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
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +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 6d229870a6 Add more detailed checks for each of the primary modctl commands. 2008-02-10 16:02:24 +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