christos
74e389883f
fix helper program installation
2015-01-06 03:41:42 +00:00
christos
0900ce68ab
fix directory
2015-01-06 03:20:24 +00:00
christos
2568fa481f
assym.h moved.
2015-01-06 02:49:21 +00:00
christos
003f1382bf
Form the sources in a better way.
2015-01-05 23:48:46 +00:00
christos
82329ad88d
Too hard to cross-build mkassym.c correctly, use a standard assym.h
2015-01-05 23:46:49 +00:00
christos
6d5379c9ea
add a dummy mkassym
...
look in more places for cpu_in_cksum
2015-01-05 23:25:10 +00:00
christos
fca19cad2d
Port the in_cksum test from regress.
2015-01-05 22:38:36 +00:00
ozaki-r
ba54e088ff
Fix LDADD.t_compat
...
This unbreaks the build.
2014-12-08 07:34:31 +00:00
ozaki-r
b5aa5c8930
Add basic tests for ifconf (SIOCGIFCONF)
2014-12-08 04:23:03 +00:00
alnsn
215bab86a5
Add BPF_MOD tests. Plus one tiny change.
2014-11-20 11:36:13 +00:00
alnsn
b61069b6e9
Add BPF_XOR tests.
2014-11-19 22:56:35 +00:00
christos
0e3249fea3
fix typo, use different address
2014-10-27 21:28:58 +00:00
christos
c57b8469e4
- deal with MacOS/X not having clock_*()
...
- change multicast address
- set the interface
XXX: Now the ipv6 code works on MacOS/X but does not work for us still.
2014-10-26 18:33:43 +00:00
martin
cb0ae2ce0b
timespec.tv_nsec is long, so use %ld instead of %jd as printf format.
2014-10-13 06:57:08 +00:00
christos
793de535ef
typo
2014-10-13 04:57:11 +00:00
christos
35954f72d1
Oops need to bind, also make the message more interesting and check that
...
it arrives correctly.
2014-10-13 04:56:26 +00:00
christos
76ec08071f
Explain what works, what does not and why.
...
Provide compatible code so that it compiles on Linux and MacOS/X with -DTEST.
We should check more OS's and see if they are broken too.
2014-10-12 19:49:01 +00:00
christos
0de04e721e
now we support the v6 ioctls for mapped addresses too.
2014-10-12 18:56:57 +00:00
christos
3242dd1614
Explain a bit more what's going on with the multicast setsockopts.
2014-10-12 14:53:46 +00:00
christos
dce98dc1a7
Add the simple unconnected tests too.
2014-10-12 13:48:25 +00:00
christos
dec90ca99d
add a multicast test (what to do with v6?)
2014-10-11 23:04:42 +00:00
ozaki-r
5937935b47
Add net/if_bridge test
2014-09-18 15:13:27 +00:00
gson
09436ed198
The t_ldp_regen test frequently fails under qemu, but reliably passes
...
on real hardware. The failures are hardly surprising given that qemu
timing is off by a is off by a factor of two as reported in
PR kern/43997. Disabling the test on qemu for now; it should be
re-enabled once 43997 has been fixed to see if it still fails then.
2014-09-01 06:38:35 +00:00
alnsn
2b2f4a0ebe
Add bpfjit_cop_copx and bpfjit_copx_cop tests.
2014-07-13 21:35:33 +00:00
alnsn
674ca560ce
Fix copy/paste error: s/rump_unschedule/rump_schedule/.
2014-07-09 15:56:12 +00:00
alnsn
467461f7c4
Add t_cop and t_extmem kernel bpfjit tests to the build.
2014-07-09 13:50:48 +00:00
alnsn
f80c8c7700
Add t_cop and t_extmem kernel bpfjit tests.
2014-07-09 13:49:49 +00:00
alnsn
0240ba3c8b
Add t_mbuf tests to the build.
2014-07-08 21:47:21 +00:00
alnsn
f2b7757e98
Move bpfjit mbuf tests to t_mbuf.c.
2014-07-08 21:45:55 +00:00
alnsn
e1f7888b18
Clone libbpfjit tests to check kernel implementation of bpfjit.
...
Old content of t_bpfjit.c will be moved to t_mbuf.c shortly.
Change packet buffers to unsigned char[] type.
2014-07-08 21:44:26 +00:00
alnsn
6cabebfe85
Add bpf/t_mbuf test to the build.
2014-07-07 19:41:22 +00:00
alnsn
c129c2d504
Add rump tests for checking how bpf_validate() works with mbuf chains.
2014-07-07 19:40:28 +00:00
alnsn
a8013faa06
Add some helper functions for bpf/bpfjit rump tests.
2014-07-07 19:34:32 +00:00
alnsn
66c2729de9
Fix test directory.
2014-06-30 21:34:22 +00:00
alnsn
d32d6008b1
Add bpfjit kernel tests for loading from mbuf chain.
2014-06-30 21:30:51 +00:00
alnsn
65b8637bc0
Zap trailing spaces.
2014-06-24 11:32:36 +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
riastradh
6cb10275d0
Merge riastradh-drm2 to HEAD.
2014-03-18 18:20:35 +00:00
pooka
7e5de72e53
ldpd wants inet6
2014-01-03 13:14:50 +00:00
alnsn
202116b0b6
Add bpfilterbadmem, bpfilternoinitA and bpfilternoinitX tests.
2013-12-18 22:39:16 +00:00
christos
fa1e6d6374
CID 1107543, 230676, 1107543, 976795, 230676, 976795, 1125885, etc.
2013-11-13 21:41:23 +00:00
kefren
f7c77f192b
Retire t_ldp_static. It's too heavy weighted for releng's anita and mostly
...
unsuited for atf.
2013-11-12 12:22:33 +00:00
christos
f59006a79a
write fail as a proper macro
2013-10-20 17:36:36 +00:00
christos
d56fcfc956
fix unused variable warnings
2013-10-19 17:45:00 +00:00
christos
11fdff5426
CID 1107548: resource leak
2013-10-17 12:53:28 +00:00
christos
73a690f0f7
CID 1107550: resource leak
2013-10-17 12:52:09 +00:00
christos
0703489a8c
more tests
2013-10-12 17:26:32 +00:00
christos
ee07b6a10b
new test to check if non-blocking sockets are reset to blocking on the
...
accepted file descriptor.
2013-10-12 15:29:16 +00:00
christos
4b23c29b39
make this work on linux
2013-10-10 16:01:55 +00:00
christos
dc8626c22e
Improve tests so that they check the sockaddr's returned by accept(2) and
...
getsockname(2). Test for accept success after closed client socket.
2013-10-08 18:05:31 +00:00
kefren
6ca68e7c50
Disable ip forwarding at penultimate hop
...
Raise the ping wait time a little bit in order for changes to propagate
over ldp
2013-07-27 14:39:24 +00:00
kefren
6ea87284a2
don't expect failure anymore
2013-07-27 14:36:39 +00:00
kefren
2276864e5a
add a couple of tests for dynamic MPLS routes generation using ldpd
2013-07-25 14:28:29 +00:00
kefren
f9bf6846c4
Use . for shm bus path and rump_server url instead of /tmp
...
Exit after first reply in mpls_fw
2013-07-23 12:41:01 +00:00
martin
4ddc14a004
Move all shm files from /tmp into . so ATF can automatically do cleanup
...
for us. Ok: kefren
2013-07-23 12:14:49 +00:00
kefren
96e1b99106
Add a test for RFC4182
2013-07-23 11:26:33 +00:00
kefren
ff6f2bd928
Add a couple of basic IP/MPLS forwarding tests
2013-07-19 04:00:40 +00:00
pooka
528e47fc44
Remove makevirtif(), it's not likely to be used in testing.
...
(and this file should go away anyway in favor of using ifconfig etc.)
2013-07-03 19:13:33 +00:00
nakayama
f7f884f97e
Enable tests which does not require rump if MKRUMP=no.
...
Pointed out by christos on source-changes-d.
2013-07-03 14:01:29 +00:00
christos
9e823bd0f7
add a pktinfo test
2013-06-27 20:01:24 +00:00
pooka
f467be3ba1
Rump kernel hypercalls are not necessary here.
2013-03-01 13:49:42 +00:00
joerg
94bcefa490
Check for RUMP programs before using them.
2013-02-19 21:08:24 +00:00
christos
353430cc63
fix messages.
2013-01-06 02:22:50 +00:00
christos
436fdc82bd
new udp test
2013-01-06 00:35:22 +00:00
martin
c7ba7e0c07
Try to make this test gracefully fail when npftest is not available
2012-09-18 08:28:15 +00:00
joerg
69d9b49983
Workaround infrastructure bug where additional rpath flags are added for
...
/lib, resulting in linker warnings for the compat case.
2012-09-13 21:13:34 +00:00
martin
001611b06f
ATF wrapping of the npf tests
2012-09-12 14:06:31 +00:00
adam
af67173111
Fix building with MKCOMPAT=no
2012-09-10 11:29:06 +00:00
alnsn
b8a85c6989
Replace usleep(500000) with a synchronization over a pipe.
2012-09-04 22:31:58 +00:00
alnsn
db95257927
Fix test timeout.
2012-09-03 21:27:14 +00:00
pgoyette
af44ca577f
There's a known-but-unresolved race condition in here somewhere that
...
causes these tests to sometimes deadlock. Since they run really fast
when they are successful, it doesn't do any good to wait for the
default 5-minute timeout. So explicitly set timeout for these tests
to just 30 seconds.
2012-08-31 04:02:21 +00:00
alnsn
d52ebd2ff5
Close pipes on exit.
2012-08-16 20:16:06 +00:00
alnsn
16465504ed
Wait for a child to initialise its network stack before sending a ping.
...
Decrease BIOCSRTIMEOUT to 500ms.
2012-08-16 19:42:23 +00:00
martin
6d924f6074
Slightly reaarange, so that the 32bit version actually gets compiled
...
and linked with -m32.
2012-08-16 10:14:03 +00:00
martin
324d0ec850
Do not disturb the atf output with debugging echos
2012-08-16 08:39:43 +00:00
alnsn
196af63e15
Test contiguous buffer as well.
2012-08-15 21:36:00 +00:00
alnsn
a5a1874fdf
Add __RCSID and and make a couple of stylistic changes.
2012-08-14 19:40:30 +00:00
alnsn
e7e64dcaa1
Build and install t_bpfilter.
2012-08-14 19:13:54 +00:00
alnsn
a385466d91
Add t_bpfilter test. At the moment, it only checks
...
that bpf program can read bytes from mbuf chain.
2012-08-14 19:09:15 +00:00
christos
e3b23739ec
add fdpass tests
2012-08-13 11:15:05 +00:00
christos
cb461c6808
Exclude tests that use rump
2012-08-08 13:57:05 +00:00
christos
40114b997c
PR/46602: Move the rfc6056 port randomization to the IP layer.
2012-06-22 14:54:34 +00:00
jruoho
543143cf18
Move more PR references from comments to ATF's "descr".
2012-03-18 09:46:50 +00:00
christos
3b23191359
PR/44196 is now fixed, so don't expect a failure.
2012-01-13 16:28:44 +00:00
joerg
d1de422af2
Remove unused variable
2011-12-18 22:51:00 +00:00
jruoho
48e7c88486
Add missing copyright ((c) @christos).
2011-11-05 19:01:42 +00:00
jruoho
56b331c000
Move connect(2), listen(2) and socketpair(2) tests to the right place.
2011-11-05 18:19:01 +00:00
christos
94a17dd165
socketpair test.
2011-11-04 02:23:39 +00:00
christos
5d5cd00fc9
Fixed reversed/child parent and check the right variable for failure from
...
gson@
2011-10-04 16:28:26 +00:00
christos
3608a76ca2
Fix the exceed test.
2011-10-03 14:55:23 +00:00
christos
4bea49e915
use ATF_CHECK_MSG instead of err() in atf.
2011-09-30 19:12:35 +00:00
christos
216c13827a
add back the raw test and fix typo in the libraries.
2011-09-28 23:11:12 +00:00
christos
2a89e8adcf
revert part of previous that was wrong.
2011-09-28 22:19:52 +00:00
christos
e244cf19e9
fix error message
2011-09-28 22:08:12 +00:00
christos
9d31325887
Add a unix socket pathname size limit test.
2011-09-28 16:13:03 +00:00
christos
b0aa149fb2
Add an rfc6056 test.
2011-09-24 18:34:18 +00:00
christos
60e8629a5d
fix fallout from including signal.h from rump_syscallargs.h
2011-06-26 13:15:22 +00:00
christos
5c85f3b56b
fix fallout from including signal.h in rump_syscallargs.h
2011-06-26 13:13:31 +00:00
jmmv
9b4c1721f3
Instead of doing 'atf_check ... sh -c foo', just do 'atf_check ... -x foo'.
2011-05-14 17:42:28 +00:00
martin
29b0298b15
Minor simplification
2011-04-26 18:42:08 +00:00
martin
ed194e826a
Repeat the fragmentation on lo0 test, but with checksum on IFF_LOOPBACK
...
interfaces enabled.
2011-04-10 11:31:48 +00:00
martin
3d772d583a
Remove expected failure, PR has been fixed.
2011-04-09 20:42:12 +00:00
pooka
c87fb89aa0
make netcfg produce sensible results in a non-atf env
2011-02-28 21:21:14 +00:00
kefren
233a38c913
Problem was fixed, don't expect to fail anymore
2011-02-10 07:47:50 +00:00
pooka
5e6b266d97
Time to start adding tests for the routing code to make that part
...
of the kernel more approachable.
Begin the task with an xfail test for PR kern/40455.
2011-02-08 10:11:28 +00:00
pooka
68e1e43ec7
add test for PR kern/44369
2011-01-11 10:51:45 +00:00
martin
7e35902cb8
Use raw buffer size (not aligned value) to limit packet size
2011-01-05 14:43:40 +00:00
martin
db69e273a2
Fix alignment of sndbuf (sparc64 got a SIGBUS in this test)
2011-01-05 14:08:12 +00:00
christos
00a6054507
PR/44310: Alexander Nasonov: write to /dev/bpf truncates size_t to int
2011-01-03 02:53:15 +00:00
pooka
bc1c80f7e8
Substitute a surgical rump_server configuration for rump_allserver
...
now that it's possible. With warm fs cache, the startup time of
the former is 0.01s and the latter 0.1s. With cold caches it's
0.2s vs 2s.
2010-12-30 16:58:07 +00:00
pooka
5a30a389c0
atf-check => atf_check
2010-12-18 08:35:53 +00:00
pooka
91ed45ab3f
use ping -n, since technically we don't have dns
2010-12-14 19:08:22 +00:00
pooka
756d5b62e3
Add another version of the simple ping test, this time written as a
...
shell script and using rump_server, rump.ifconfig and rump.ping.
XXX: uses rump_allserver for now, though, since i noticed a problem
where the rump kernel syscall vector does not get updated for
dlopen()'d libraries (and hence if you dlopen librumpnet.so, socket()
still gives ENOSYS). Me be fixink it later.
2010-12-14 11:03:17 +00:00
pooka
1a21107ad9
Add an xfail test for the mbuf leak described in PR kern/44196.
...
This is yet another example of a simple test which would be much
trickier to execute against the host kernel. You would either need
to put networking in a complete lockdown, or do some "statistical"
methods where you trigger the bug many many times and attempt to
ascertain a rising trend in mbuf count. And, of course, the leaked
mbufs don't go away from the host kernel once the test ends. In
contrast, we *know* that there is no other networking activity in
a rump kernel, so we can execute the operation exactly once, plus
the leaked mbuf "disappears" when the test is done.
2010-12-06 11:32:01 +00:00
pooka
7119e5be14
convert program in PR kern/44054 to an atf test case
2010-11-07 19:53:42 +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
fb0d4bcc11
make that u_int, because it is passed as a socket option.
2010-11-03 21:44:46 +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
cf1237d3ad
setsockopt() wants int instead of size_t. Should fix this on LP64.
2010-08-26 17:24:14 +00:00
pooka
b846a386dc
Add a delay between startup of pinger and pingee here too.
...
XXX: there's apparently some race condition which appears to trigger
if a broadcast arp arrives around the same time as the arpwhohas
is sent. This causes original packet to never be sent by the
arpwhohas requestor. If this rings a bell to someone, please let
me know.
2010-08-23 10:49:27 +00:00
pooka
217080730a
.. put a timeout here just in case the receive does not increase
...
the counter.
2010-08-18 21:23:48 +00:00
pooka
b3495ecc48
Add a test for the "ping of death". Declare the test a success
...
when the receiver increases the "ip toolong" stat counter.
2010-08-18 21:22:34 +00:00
pooka
cfe11fb280
send pings in ascending order
2010-08-18 17:49:03 +00:00
pooka
9a3c295ef2
Add a two-way floodping test and a test which sends icmp echos with
...
various sizes.
2010-08-18 16:39:22 +00:00
pooka
75487b056b
add a test which floodpings another host
2010-08-17 15:51:11 +00:00
pooka
5b778e8098
* add interface for virtif creation (in addition to the already present shmif)
...
* don't leak sockets
2010-08-17 12:04:34 +00:00
pooka
7c8855f1e2
Put some sleeps between forking the hosts. Otherwise a race may
...
be triggered which appears to cause one host to go berzerk with
sending carp advertisements and ignore ping requests.
I'll get to the bottom of this eventually, but this is a stopgap
to prevent the test from failing, hopefully -- the race doesn't
appear to trigger for me even with 0.1s on a loaded machine, so
0.5s should be better than fine.
(hi jmmv ;)
2010-08-11 13:10:03 +00:00
pooka
1a6a53bd1a
Add a most elementary carp test: it forks off two processes,
...
configures carp in each of them, and after verifying that the shared
address responds to ping it brutally kills the master like a proper
carnivore (none of that ifconfig down sissy vegan nonsense). Then
the test checks if the backup got its act together by pinging the
shared address and passes verdict.
2010-08-10 21:55:28 +00:00
pooka
a2530e0bfd
may be __unused
2010-08-09 15:39:41 +00:00
pooka
96f76684bb
test that kernel reponds to ping
2010-08-09 15:08:43 +00:00
pooka
576ad32eba
add a simple pingtest
2010-08-09 15:07:51 +00:00
pooka
3c23c993d0
Remove stuff handled by common code now.
2010-07-26 14:10:31 +00:00
pooka
6b62441252
Calculate broadcast IP instead of requiring it as a config parameter.
2010-07-26 14:07:04 +00:00
pooka
e8fbc2f15e
necessary headers
2010-07-25 22:28:48 +00:00
pooka
3185d2a443
Add xfail test for kernel diagnostic panic described in PR kern/43664
2010-07-25 21:42:08 +00:00
pooka
772871ea1c
make interface/routing configuration a bit more generic
2010-07-25 21:39:20 +00:00
pooka
1d14124dd5
fix routine name in error message
2010-07-18 12:43:22 +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
pooka
369e70628a
descend into icmp
2010-07-04 19:31:30 +00:00
pooka
3665ca1dbf
Add test case for PR kern/43548
...
Due to the nature of the feature under test, this one is a little
different, so let me explain how it works.
The test program forks and bootstraps a rump kernel in both processes.
It then configures shared memory interfaces in both. shmif is nice
in that it uses a mmaped file as the bus and does not require root
privileges for communication between two (or more) processes. The
child process then proceeds to increase icmp.returndatabytes as
indicated by the PR, while the parent process sets the global TTL
of the rump kernel to 1 (note: both values only affect the respective
rump kernels, not each other or more importantly the host kernel).
The parent then sends the bad packet which is supposed to be routed
by the child. If ip_icmp.c was too old, *boom* + fail; otherwise
nothing bad happens and the test exists with success after one
second.
Eventually this test can be extended into a framework for automated
testing of any networking code which requires (arbitrarily complex)
routing setups.
2010-07-04 19:30:59 +00:00
wiz
8506af6473
Fix typo in comment.
2010-06-12 15:01:04 +00:00
pooka
ab4e506810
Connect to localhost instead of www.netbsd.org to a) make this work
...
in non-routed setups b) avoid the dubious security implications.
Also, to make the test actually do what it claims to do, call
getsockname() and verify we got a low port.
2010-06-12 14:31:29 +00:00
pooka
f896df40fc
tp-glob t_* instead of * (so that atf-run works in the source directory)
2010-06-12 14:18:21 +00:00
pooka
2f75110c81
Add bpf program source in a comment.
2010-04-21 11:19:44 +00:00
pooka
513ca2875b
Check that bpf doesn't accept programs with divide-by-zero in them.
...
Example filter from Guy Harris via PR kern/43185.
2010-04-21 11:07:34 +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
jmmv
91374a77e7
Fix headers: add NetBSD CVS id tag and drop ATF title.
2008-01-04 18:37:15 +00:00
jmmv
5166760e85
Re-add the NetBSD CVS Id tag to the header. It just had to be quoted to
...
be accepted by the parser; i.e. no bug in the code :-)
Note to self: do not try to "fix" stuff the last minute before going to
sleep.
2007-12-30 09:13:32 +00:00
jmmv
24b05c38e9
Back out the change to introduce the X-NetBSD-Id header entry. For some
...
reason the parser does not accept its contents... You know, one should
always test even trivial changes!
Will review this in more depth tomorrow to find the real root cause of the
problem and rule out a fix for ATF.
2007-12-29 23:02:51 +00:00