Commit Graph

3911 Commits

Author SHA1 Message Date
christos 38a0431bfa Restore binary compatibility by using the statvfs90 structure internally. 2019-09-23 12:00:57 +00:00
kre f77bb6aeed Initialise the sometvs array of struct timeval that is to be used to
validate that utimes() cannot update the times of a file on a read only
filesystem.   The values are never actually used, but since
	src/sys/kern/vfs_syscalls.c 1.535
they are validated for sanity, and the syscall returns EINVAL if the
values passed are invalid (tv_usec <0 or >= 1000000).  If that happens
we don't get as far as the test which produces the EROFS that is expected
from this test (these tests - one for each filesystem type).

So, init the timeval structs (just to 0, the values will still not be
used) so that the EINVAL doesn't bite us before we're eaten by the EROFS
which is the way we're supposed to die.

If the syscall API args were labelled as "const" the compiler probably
would have caught the use of uninit'd vars and complained much sooner.
2019-09-21 14:25:42 +00:00
blymn e275f7f7db Rototill to add complex character support:
- Add cchar command to director test language to allow a complex character
  to be defined and passed to the slave.
- Removed the distinction between args and returns internally to prevent
  confusing the two which leads to errors and/or crashes.
- Converted mutt_test to use the new cchar definition and fixed the
  check files for the test.
2019-09-19 11:31:57 +00:00
christos 3f24065918 Remove the incomplete define. 2019-09-15 23:39:13 +00:00
christos 7d2cda35f1 Add tests for fexecve(2) 2019-09-15 16:53:58 +00:00
christos 0a76d2ed5a Add F_GETPATH, presented to tech-kern. 2019-09-15 16:25:57 +00:00
roy 801b070c3c t_arp: Wait for 10 seconds for RTM_MISS
Let's try increasing the ping timeout to try and fix PR misc/54525.
2019-09-09 10:29:04 +00:00
roy 07f3df8b72 tests: fix ARP and NDP tests for RTM_* messages
While here add tests for RTM_MISS.
2019-09-03 19:07:50 +00:00
brad 01424baa92 The cleaner is compiled into the ATF test harness for the LFS
filesystem tests.  Use the new -J option to pass the raw device into
the cleaner.  This avoids the not rump safe getdiskrawname call and
makes sure we use an internal rump device name for cleaning.  This
should fix bin/54488.
2019-08-30 23:45:13 +00:00
kamil 1a5f018b01 Enhance the support of LLVM sanitizers
Define _REENTRANT for MKSANITIZER build. This is needed for at least stdio
code. This caused new build issued with duplicated symbols in few places
and rump kernel code picking different code paths borrowed from libc.
Handle all this in one go.

Add bsd.sanitizer.mk to share common code used by programs and libraries.

Switch from realall to beforeinstall target in .syms files. This is more
reliable in MKSANITIZER.
2019-08-27 22:48:53 +00:00
ozaki-r b5415e57cd tests: add tests for IPv6 link-local addresses with a scope ID
Setting an address with a scope ID doesn't work for rump.ifconfig for some
reasons and needs $HIJACKING for now.  The bug should be fixed someday.
2019-08-26 07:41:50 +00:00
ozaki-r c6ad1822be tests: explain how rump_server_check_memleaks works 2019-08-26 04:50:32 +00:00
ozaki-r 06b680af2f tests: restore rump_server_check_poolleaks for llentpl
It didn't work correctly because rumphijack for vmstat didn't work expectedly;
vmstat has the sgid bit for kvm(3) and that prevents rumphijack from working.

Address the issue by cloning a vmstat binary without the sgid bit temporarily
and using it for rumphijack.  Note that it's a workaround.  vmstat should stop
using kvm(3) for /dev/kmem and drop the sgid bit eventually.
2019-08-26 04:50:03 +00:00
kamil 5612f2cac8 Define target_not_supported_body() in TSan, MSan and libFuzzer tests 2019-08-23 06:39:54 +00:00
ozaki-r 571560e45c Disable rump_server_check_memleaks for now
It doesn't work in some cases.
2019-08-20 09:53:45 +00:00
ozaki-r 7c447e107e tests: check pool object leaks
Currently only llentpl leaks can be detected.
2019-08-19 03:22:47 +00:00
ozaki-r ce0ae1dfed tests: use rump_server_add_iface to create interfaces 2019-08-19 03:22:05 +00:00
ozaki-r b271a6e258 tests: enable to create interfaces other than shmif with rump_server_add_iface
For this change interfaces are destroyed in the reverse order of their
creations in case there are dependencies between interfaces.
2019-08-19 03:21:13 +00:00
ozaki-r 3a470f73b4 tests: fix test header name 2019-08-19 03:20:27 +00:00
kamil f0720e6929 Add ATF c and c++ tests for TSan, MSan, libFuzzer
These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
2019-08-18 20:15:58 +00:00
gson 40aea22397 The udf_renamerace test case no longer fails due to PR kern/49046, but
it does fail due to PR kern/53865 on real hardware.
2019-08-17 09:44:01 +00:00
kamil d383d9b590 Avoid symbol clashes in test/rump/modautoload/t_modautoload with sanitizers
Set SANITIZER_RENAME_SYMBOL.t_modautoload to:

 * sysctlbyname
 * sysctlgetmibinfo
2019-08-17 04:04:28 +00:00
kamil 8d8be769a2 Adapt tests/kernel/t_subr_prf for MKSANITIZER
Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.
2019-08-15 08:46:09 +00:00
kamil fab4b3f46f Avoid symbol clashes in bin/df under MKSANITIZER
Remove symbol conflicts for: __getmntinfo13
2019-08-15 08:24:11 +00:00
kamil 5d3c833b7d Avoid symbol clashes in fs/nfs/nfsservice under MKSANITIZER
Remove symbol conflicts for: __getmntinfo13
2019-08-15 08:23:45 +00:00
kamil 825c3698b4 Avoid symbol clashes in tests/usr.bin/id under MKSANITIZER
Remove symbol conflicts for:

 - __getpwnam50
 - __getpwuid50
 - getgrgid
 - getgrouplist
 - getgroups
2019-08-15 08:22:52 +00:00
kamil 1101023c0c Fix build of t_ubsan/t_ubsanxx under MKSANITIZER
Do not link micro-ubsan runtime for disabled tests.

This avoids double symbols linked into a single binary.
2019-08-15 08:17:32 +00:00
ozaki-r bce11250f5 tests: check if ifconfig (ioctl) works after a failure of ifconfig destroy
This is a test for PR kern/54434.
2019-08-15 04:21:33 +00:00
ozaki-r caa310059a Make a permanet neighbor cache to avoid sending an NS packet disturbing the test
A receiver of an ICMPv6 request packet creates a stale cache entry and it turns
into the delay state on replying the packet.  After 5 second, the receiver sends
an NS packet as a reachability confirmation, which disturbs the test and causes
a unexpected result.

Should fix PR misc/54451
2019-08-13 07:20:43 +00:00
martin 7f7ec27799 Re-enable the QEMU specific timing limits, but only an increased upper
limit for now - let's see if that works on the test-bed.
2019-08-11 11:42:23 +00:00
martin 98d251c113 PR lib/54440: adapt the FreeBSD change to this test and calculate time
differences more exact, allowing between 0 and 1 s delay between the
expected wakeup and the actual event happening.
Also convert the QEMU special case code to the same scheme, but for now
disable it (with XXX mark) and see if the proper timing limits fix that
case too.
If not, we will re-enable the QEMU special case.
2019-08-10 07:36:15 +00:00
christos 92bbbea0b3 PR/54414: Valery Ushakov: add a test for wcsrtombs(3) doesn't update the
source argument on conversion error
2019-07-28 13:46:45 +00:00
ozaki-r ac002ee323 tests: add tests for getspi and udpate 2019-07-23 04:31:25 +00:00
kre 311f349816 Stop assuming that printf handles options in any way at all
(it doesn't - that is, shouldn't) which includes processing -- as an
"end of options".  The first arg is (always) the format string.

Remove/fix tests that assumed the contrary.

Problem (with printf) pointed out on tech-userlevel by Thierry Laronde.
2019-07-21 15:25:59 +00:00
kre da8bc57f2b Correct a typo. It is atf_require_prog not atf_require_pfog ... 2019-07-21 15:00:18 +00:00
ozaki-r 2f33341a03 tests: extract all kernel logs, not just a panic message, from rump_server.core 2019-07-18 04:22:22 +00:00
ozaki-r bc1d718ff0 tests: shorten the expire time of neighbor caches to reduce the runtime of the tests 2019-07-18 04:00:09 +00:00
christos fbf9c51ff3 fix misplaced paren 2019-07-16 21:13:28 +00:00
martin 653f037ebe PR misc/54382: whenever open(2) is called with O_CREAT, make sure to
pass an open mode argument.
2019-07-16 17:29:17 +00:00
gson b9a5a0bbdb In the setitimer_old test case, allow for time passing between the two
setitimer() calls.  Should fix PR kern/54370.
2019-07-13 12:44:02 +00:00
msaitoh 03e9d50adf Fix typo (s/supress/suppress/). 2019-07-11 03:49:51 +00:00
martin 0509bcf964 Gracefully skip test if not enough space in temporary directory. 2019-07-10 06:21:40 +00:00
martin 33a5a5b239 Reduce disk image size for tests (PR 44239 has been fixed) 2019-07-10 06:10:54 +00:00
martin d903b87a2d Make sure we have enough free inodes before running the filename_expansion
test.
2019-07-10 05:57:43 +00:00
maya 36592171e1 return return atf_no_error() instead of 0 for consistency.
suggested by moritzbuhl in https://github.com/NetBSD/src/pull/11/
2019-07-09 16:24:01 +00:00
gson 7753bf0b70 Update require.memory to match the increased rlimit. 2019-07-09 13:59:25 +00:00
ozaki-r a96cce565c tests: check that a new cache is not created over the limit 2019-07-09 02:50:24 +00:00
ozaki-r 24bc91d9f1 Add ATF test for a description.
From t-kusaba@IIJ
2019-07-04 02:46:40 +00:00
kamil c4f0499ad5 Avoid GCC warning on NetBSD/i386
Cast note_hdr.n_namesz to ssize_t through size_t to avoid potential
signedness bit shifts.
2019-07-01 02:04:37 +00:00
blymn f3430e9b6f Fix test for pad and enable it. 2019-06-30 22:37:11 +00:00