Commit Graph

463 Commits

Author SHA1 Message Date
christos 2bf6f45a6d fix prototypes. 2011-05-16 21:51:31 +00:00
christos 51c60bdd41 use err instead of printf, fix missing prototypes. 2011-05-16 12:43:59 +00:00
christos b139bf30af Turn on WARNS to 4, so that magically -std=gnu99 gets turned on and fix
the few warnings. Since the kernel uses c99, this makes kernel code that
uses c99 features compile.
2011-05-14 16:26:23 +00:00
joerg 526fbdff1c Kill a redundant lvalue cast in assembler constrained. 2011-03-18 03:06:21 +00:00
joerg 8e2b771d40 Use ${HOST_SH} 2010-12-20 16:13:44 +00:00
rmind f72965d18d Don't overrun the buffer, when writing some payload. 2010-10-03 19:41:25 +00:00
rmind 29dd668442 Add a regression test for IPv4 reassembly. Cases:
- Normal (valid) fragments.
- Fragment with ip_off + hlen lower than IP_MINFRAGSIZE - 1.
- Different ip_tos values in fragments.
- Fragment data length which is not multiple of 8 bytes.
- Duplicate fragments (one covering previous).
- Packet larger than IP_MAXPACKET after reassembly.
- No last non-MF fragment (causing of timeout).
2010-07-13 22:13:18 +00:00
mrg 4c92852a80 remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format.  ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k.  this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
  down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
2010-07-06 05:59:50 +00:00
christos 95aad9cc1b verify hex digits. 2010-05-19 21:59:34 +00:00
christos f65592ae19 regression test for ether_aton_r() 2010-05-19 21:55:35 +00:00
drochner 71380b75fd pull in some more headers to get prototypes into scope, and, more
importantly, the __RENAME of pollts(2)
2010-03-23 20:32:13 +00:00
darrenr 1098c7bfb7 Import IPFilter 4.1.33
4.1.33 - Release 16 August 2009

2837931 wrong mode selected in ipf program for hash-entries
2826168 load_http can make ippool core dump
2825150 IPL_LOGMAX used to index some arrays
2825084 ipv6 fragments should not be allowed past 64k
2824713 ipfstat top output alternates between entries and nothing
2824712 ipfstat top output is shows negative ttl
2820965 a single bad ipv6 extension header should not impact others
2818197 ignored fragment bits defined as being reserved
2817667 IPv6 fragment header verification needs attention
2817098 fr_getrulen() finds the wrong rule
2817096 fr_rulen is unused
2741019 Lingering states (Established/Listen - 5/0) in state table
2702887 use of PBR/fastroute causes panic with ipv6
2671913 regression test in7 fails to execute
2598625 parsing empty config file results in an error
2698656 test parsing empty config files
2597956 not all pointers in a clone are reset
2543934 nat_t gets assigned ifp too early
2535795 No need to always bump fr_ref
2535778 Bad IPv6 packets droped by default
2031730 4.1.31 Nat drops fragmented packets after the first
2214661 ipf does not handle IPv6 fragments
2473273 NAT removed before RST/ICMP sent
2216500 fin_state serves no purpose
2424604 adding random MD5 data causes panic
2304435 Ineffecient lock usage in logging
2216491 fin_nat serves little purpose
2055619 duplicating a free-d packet will fail
2042949 Excessive locking when creating nat_t
2035610 nat_update does not need to get locks
2214658 ipf mostly ignores locking in NetBSD
1979427 Memory leak in user utilities - token never freed (rel br)
* SunOS4 does not have a curproc, but it does have u.
* The fix for 2020447 generated random port numbers but not within the
  range specified in the map rule.  Add in a regression test to verify
  that the "random" part works.
2020447 NAT can undo name server random port selection
1988795 NetBSD does not build with kernel malloc stats
1988782 fr_movequeue can take a short cut
1988669 first nat creation failure prevents further success
1988668 hostmap searching does not work properly
* on some 64bit architectures (such as alpha), the addrfamily_t is packed
  differently, throwing off the calculations for adf_len
* one too many READ_ENTERs in ip_sync code.
* clean up fr_fastroute a little by removing some #ifdefs and pushing the
  code around a bit to use the same variables (NetBSD)
* more recent NetBSDs use VOP related macros differently
2009-08-19 08:28:39 +00:00
rmind d193f80bcb Improve mqueue regression test. 2009-07-19 02:31:19 +00:00
rmind 94cea1184f Regression test for POSIX message queue priority handling. 2009-07-13 02:55:42 +00:00
jmmv 92ed1fa069 Remove the kernel and ipf tests that have been converted to atf and now
live in the tests subtree.
2009-02-20 21:45:47 +00:00
ad 24bd77dd94 A threaded benchmark for namei() 2009-01-29 21:24:19 +00:00
ad 5c71c34a14 - If given an arg, don't bind to curcpu.
- Set line buffering on stdout.
2009-01-28 21:52:49 +00:00
christos 466a16a118 fix time_t formats 2008-12-29 05:56:02 +00:00
ad b575edd757 A kernel module to test multithreaded performance of the kernel allocators. 2008-12-20 22:29:05 +00:00
apb ea7b5c7aff Use ${TOOL_AWK}, no ${AWK}. 2008-10-27 20:58:08 +00:00
apb 96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
gmcgarry d818158a22 Avoid tests using nested functions when using PCC. 2008-09-09 00:16:05 +00:00
gmcgarry 3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
christos b7cd7a548a test for write_append from Andy Shevchenko 2008-08-27 06:40:13 +00:00
darrenr 9f0bfbf3da 2020447 IPFilter's NAT can undo name server random port selection 2008-07-24 09:37:57 +00:00
rmind 481ae1556f - Add general cpuset macros.
- Use kcpuset name for kernel-only functions.
- Use cpuid_t to specify CPU ID.
- Unify all cpuset users.

API is expected to be stable now.
2008-06-16 01:41:20 +00:00
rmind 1ce83e28f1 Sync with the latest cpuset changes. 2008-06-16 00:33:24 +00:00
darrenr b002202839 fix a merge error that led to the expected file not being built for i19 2008-06-02 11:48:38 +00:00
ad e74e1f24d8 Another latency test. This one uses realtime threads, _lwp_park, and
measures how long preemption takes (kernel preemption if the arch
implements it).
2008-05-28 11:34:07 +00:00
ad f82d7874c2 A dumb test of how long it takes to send a byte through a pipe, using
timeshared threads and realtime threads.
2008-05-23 22:22:36 +00:00
darrenr 2f5a5e95ad Pullup IPFilter 4.1.29 from the vendor branch to HEAD.
See src/dist/ipf/HISTORY for a list of bug fixes since 4.1.23 (although
a few are already in NetBSD)
2008-05-20 07:08:06 +00:00
darrenr 675eb13106 Import IPFilter 4.1.29 to the vendor branch 2008-05-20 06:43:46 +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
ad 43d8bae932 Give callout_halt() an additional 'kmutex_t *interlock' argument. If there
is a need to block and wait for the callout to complete, and there is an
interlock, it will be dropped while waiting and reacquired before return.
2008-04-22 12:04:22 +00:00
yamt 849fe720d6 test lockf deadlock detection. 2008-04-05 03:34:47 +00:00
apb e6806c2c83 Adapt to changes in m68k/060sp/asm2gas script: pass SED=${TOOL_SED:Q}
instead of TOOL_SED=${TOOL_SED:Q} in the environment.
2008-03-28 22:29:16 +00:00
ad e1fe405771 Add a test for callout_halt (and incidentally, fast softints). 2008-03-28 20:44:57 +00:00
ad 7b5d104e8d Make these compile again. 2008-03-28 20:28:27 +00:00
apb a749c03e28 Use "${TOOL_SED}" instead of just "sed" in sys/arch/m68k/060sp/asm2gas. 2008-03-27 07:15:16 +00:00
ad 0c65d1b648 - Use atomic_inc_uint() to maintain the global count.
- Use a barrier to sync thread start.

Ok yamt@.
2008-03-21 16:03:33 +00:00
yamt 9ff0d7c13c test select(2). 2008-03-21 12:27:12 +00:00
ad 2dc7c918f0 A test for the lwpctl preemption counter. 2008-03-12 11:02:21 +00:00
lukem 1f09f2e309 Use mkstemp() instead of mktemp().
Use snprintf() instead of sprintf().
Improve error reporting.
2008-03-02 12:51:59 +00:00
ad e6ac0b80ac Fix uninitialized variable that caused this to fail spuriously. 2008-02-29 16:28:12 +00:00
dholland 936ebf85ff use errno.h, not sys/errno.h 2008-02-24 21:37:47 +00:00
yamt 90306066c9 remove an unused prototype. (rdtsc) 2008-02-05 10:00:17 +00:00
uwe c2b2ccc344 Add -D_LOCORE to AFLAGS. 2008-02-02 18:18:14 +00:00
chris e083edeb16 Force the last loop to always walk all the data in the mbuf chain.
It appears that randomness was against me when I updated the arm version
as it crashes when used for real.  By forcing one full walk of the mbuf
chain the regression tool crashes, hinting that something is wrong.
2008-01-27 16:49:13 +00:00
simonb 2c3f5b99b6 Add some aligned tests for the more "normal" cases. Even though this is
primarily a regression tool, it's still a useful benchmark tool so we
might as well try relatively real-world tests as well.

Ok joerg@.
2008-01-26 04:56:45 +00:00
chris 8184079c4d Fix typo, assum.h -> assym.h 2008-01-26 02:07:13 +00:00
joerg c0e2333a0f Add regression test and benchmark for the upcoming cpu_in_cksum.
This is inspired by an older test case written by Charles Hannum.
cvs: ----------------------------------------------------------------------
2008-01-24 18:12:29 +00:00
dsl 9551b193fd The interval timers (setitimer()) are not inherited by fork (I've checked
the SuS) so start the timer in the correct process otherwise this test
will never timeout.
2008-01-12 11:10:08 +00:00
martin 5d0a5ce934 Use WEXITSTATUS() on wait() results. From David Laight. 2008-01-06 21:53:08 +00:00
yamt 0c9bd4f953 sprinkle sleep(1) to catch more bugs. 2008-01-04 16:18:52 +00:00
yamt 768cff817f iopl. 2008-01-04 15:39:25 +00:00
yamt ca99721f8d test i386_iopl. 2008-01-04 15:37:11 +00:00
yamt 599bbacd07 test i386_get_ioperm/i386_set_ioperm. 2008-01-04 14:23:00 +00:00
ad a33059bb24 A quick-and-dirty test that forces the softclock interrupt to block. 2007-12-04 08:02:24 +00:00
jmmv 9b7401e7cb Convert the regress/sys/fs/tmpfs tests to the atf
This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf.  As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
2007-11-12 15:18:07 +00:00
jmmv 9b435895e8 Fix duplicate year in copyright notice. 2007-07-24 11:29:16 +00:00
jmmv 12f24779d1 Add some more tests to ensure that renaming a file to a directory and a
directory to a file fails with the appropriate error codes.  tmpfs still
fails these tests, but the fix is almost ready to go in.
2007-07-23 15:05:43 +00:00
jmmv e92cf7fb11 Add test cases to ensure that:
1) Renaming a directory to an empty directory works by replacing the target
   directory.
2) Renaming a directory to a non-empty directory fails.
This is all by calling rename(2) directly, not mv(1).

tmpfs currently fails those tests, raising an assertion if DIAGNOSTIC is
enabled.  A fix will hopefully follow soon.

Found by pooka@.
2007-07-23 12:51:35 +00:00
martin c77a3f5aad Upgraded IPFilter to v4.1.23 2007-06-16 10:52:24 +00:00
martin 03f2531d69 Import IPFilter 4.1.23 2007-06-16 10:33:08 +00:00
darrenr fade943a7f The wrong condition was being tested for when deciding which fields to
update in ICMP error messages.  In the test case for this, the wrong
input was actually being used (it should be the headers from the previous
packet output) and therefore the expected results were also wildly wrong.

kern/36309
2007-05-31 10:33:54 +00:00
martin 29fd0d9db1 Import IPFilter 4.1.22 2007-05-15 22:26:02 +00:00
martti 1a4bf0c822 Better dependency handling for the ip2 test. 2007-05-07 07:06:30 +00:00
martti 159aa98c97 Better handling of ip2 test. 2007-05-02 14:30:08 +00:00
martti 26008496a4 Make this work with object directories as well. 2007-05-02 11:35:28 +00:00
martti 2c5f81ca65 Activate ni23 2007-05-01 19:26:45 +00:00
martti 872147fef7 Upgraded IPFilter to 4.1.20 2007-05-01 19:08:03 +00:00
martti 68eb121d73 Import IPFilter 4.1.20 2007-05-01 19:00:58 +00:00
martin 6b0c4dc5ed Disable test ni23 - the expected output contains the hash bucket number,
which, at least, is endian dependend.
2007-04-14 20:50:48 +00:00
martin 8ebafcc992 Update IPFilter to version 4.1.19 2007-04-14 20:34:18 +00:00
martin 993d757ec6 Import IPFilter 4.1.19 2007-04-14 20:17:19 +00:00
scw 5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
pooka 69011e122a test that write to middle of file doesn't modify size 2007-03-11 10:09:17 +00:00
yamt 38b7dcdca4 a test for priority inheritance. 2007-02-25 09:52:47 +00:00
yamt ad0768d11e - fix "make obj && make".
- add "NOMAN=".
2007-02-24 15:25:23 +00:00
ad c1d4b532de Allow the number of loops to specified on the command line, still
defaults to 1.
2007-02-06 15:08:17 +00:00
ad 8d344bc387 Oops, for uniprocessor systems these need to yield more often because
the threads don't get forced off the CPU.
2007-02-05 22:48:01 +00:00
ad 002869bdb7 Drop priority to MAXPRI before starting the tests. 2007-02-05 20:20:48 +00:00
ad 8c24327068 Pass in the correct LKM entry point. Noted by mhitch. 2007-02-05 20:18:43 +00:00
ad d21838fa67 Randomise the calls to yield(). 2007-01-17 21:00:50 +00:00
ad 5606d9f962 Add basic tests for kernel mutexes & rwlocks. 2007-01-17 20:56:49 +00:00
pooka 3161077c75 test unlink of "." is not succesful
jmmv ok
2007-01-02 11:04:10 +00:00
yamt 36706cd001 add #ifdef'ed out code to search valid directory cookies
for ufs-like filesystems.
2006-12-30 23:19:11 +00:00
pooka 6980d416b8 test the pipe: mknod pipe p creates a pipe named "pipe", not "p" 2006-12-07 10:00:39 +00:00
jmmv 2947e73b43 Move lfs_cleanerd from /usr/libexec to /libexec. This is to allow putting
the root file system on a LFS volume.

Addresses PR bin/30407.  No objections in tech-userlevel@.
2006-11-11 14:47:27 +00:00
jmmv cff91bd8fc Add 2006 to the copyright notice; should have done this when touching the
files before.
2006-11-09 16:20:06 +00:00
jmmv d1d4964327 Move the "Removal of current directory" test to t_rmdir from t_remove
because that's the operation we are issuing.  Adjust it to expect a
failure on further accesses to the removed directory.
2006-11-09 15:38:12 +00:00
jmmv 1befc83712 Add tests for vnd over tmpfs files. 2006-11-09 15:25:37 +00:00
jmmv e8467243ef Add several checks to see if tmpfs raises the proper kqueue events during
operation.  These all match the behavior exposed by MFS (except for a
corner case that is described in t_link).

Fixes to tmpfs itself to make these tests pass will come soon.
2006-11-09 13:51:49 +00:00
jmmv bd6b5f5dfe Catch an assertion failure that happens when accessing the current directory
after it has been deleted.
2006-11-07 14:07:12 +00:00
jmmv 346849f443 As pooka@ says, a rename has to change the file's ctime; make that explicit. 2006-10-30 15:22:54 +00:00
jmmv 286dc06fc6 Check that renaming a file does not change its times but does change the
ones of the directory holding it.
2006-10-30 15:08:09 +00:00
bjh21 cb9637bcff Make regress target depend on the test program so as to ensure it gets
compiled.
2006-10-14 21:23:01 +00:00
bjh21 c08721e416 Make regress target depend on the test program so as to ensure it gets
compiled.
2006-10-14 20:57:10 +00:00
bjh21 00fc4b5639 This doesn't panic any more, so run it automatically. 2006-10-14 20:42:47 +00:00