Commit Graph

2592 Commits

Author SHA1 Message Date
ozaki-r
095fdb0468 Add a test case for static ARP
It tests receiving an ARP request that has a spa (i.e., IP address) whose
ARP entry already exists in the table as a static ARP entry.
2016-04-18 02:27:34 +00:00
ozaki-r
c73a69e593 Add a new test case for PPPoE using PAP
From s-yamaguchi@IIJ (with some tweaks by me)
2016-04-15 01:38:16 +00:00
riastradh
4f7dd3337d Introduce pserialize-safe linked lists.
These are like LIST_* from queue(3), but issue the appropriate memory
barriers for pserialize readers and writers.

Discussed on tech-kern:

https://mail-index.netbsd.org/tech-kern/2016/04/03/msg020365.html
2016-04-09 04:39:46 +00:00
riastradh
2233768047 Make this list diff- and sort-friendlier.
No functional change.
2016-04-08 21:53:10 +00:00
gson
5973801c0c Add regression tests for some past gdb bugs. 2016-04-08 10:09:16 +00:00
christos
e533605fa6 Use WIFCONTINUED. 2016-04-06 03:52:27 +00:00
christos
bd76bbe652 Fix ATF_REQUIRE(false) 2016-04-06 00:52:45 +00:00
christos
8283334aac Add wait6(2) tests. 2016-04-06 00:45:53 +00:00
christos
a34d3aeabd Add test for PR/49872 2016-04-05 00:48:53 +00:00
christos
2e4e2294f3 Add a test case for here documents positioned outside `` with the
redirect operator inside the ``.   Move the one similar test using
$( ) into its own test case (and expand that test as well.
The `` case was omitted before, as no shells (including NetBSD) were
parsing it correctly,  Now the NetBSD shell does, so ... (from kre@)
2016-04-04 12:40:13 +00:00
joerg
d0d56fdcd8 Replace LDADD with LDSTATIC. 2016-04-04 09:52:02 +00:00
ozaki-r
09973b35ac Separate nexthop caches from the routing table
By this change, nexthop caches (IP-MAC address pair) are not stored
in the routing table anymore. Instead nexthop caches are stored in
each network interface; we already have lltable/llentry data structure
for this purpose. This change also obsoletes the concept of cloning/cloned
routes. Cloned routes no longer exist while cloning routes still exist
with renamed to connected routes.

Noticeable changes are:
- Nexthop caches aren't listed in route show/netstat -r
  - sysctl(NET_RT_DUMP) doesn't return them
  - If RTF_LLDATA is specified, it returns nexthop caches
- Several definitions of routing flags and messages are removed
  - RTF_CLONING, RTF_XRESOLVE, RTF_LLINFO, RTF_CLONED and RTM_RESOLVE
- RTF_CONNECTED is added
  - It has the same value of RTF_CLONING for backward compatibility
- route's -xresolve, -[no]cloned and -llinfo options are removed
  - -[no]cloning remains because it seems there are users
  - -[no]connected is introduced and recommended
    to be used instead of -[no]cloning
- route show/netstat -r drops some flags
  - 'L' and 'c' are not seen anymore
  - 'C' now indicates a connected route
- Gateway value of a route of an interface address is now not
  a L2 address but "link#N" like a connected (cloning) route
- Proxy ARP: "arp -s ... pub" doesn't create a route

You can know details of behavior changes by seeing diffs under tests/.

Proposed on tech-net and tech-kern:
  http://mail-index.netbsd.org/tech-net/2016/03/11/msg005701.html
2016-04-04 07:37:07 +00:00
gson
43ed5fd66c Fix typo 2016-04-03 14:41:30 +00:00
christos
9f1b8a789b Avoid leaving turds in /tmp. (from kre@) 2016-03-31 16:22:54 +00:00
christos
87a25451df When embedding a command in a subshell "( ... )" avoid accidentally
producing (( (when the cmd starts with a '(' as that as a reserved
sequence (according to posix) and some shells do treat it specially.
So, force a space after the enclosing '(' to avoid the problem.
For symmetry, put a space before the concluding ')' as well, though
there is nothing special about )). (from kre@)
2016-03-31 16:22:27 +00:00
christos
de3efde923 Added lots more end delimiter tests (some weird cases...). Also
use printf %s instead of echo, as there are embedded \ chars in
some of the strings, and some other (nameless) shells insist on
treating \ in the args to echo as something special... (from kre@)
2016-03-31 16:21:52 +00:00
christos
3f90444865 PR bin/51027 - tests for shell positional parameters, including
testing that $10 is correctly parsed as ${1}0 and not as ${10}.
More than that though. (from kre@)
2016-03-31 16:21:10 +00:00
christos
54d4333f65 Added tests collected by Sven Mascheck
http://www.in-ulm.de/~mascheck/various/cmd-subst/
which test cases of ')' being embedded in command substitutions.
(from kre@)
2016-03-31 16:20:39 +00:00
christos
8f7ab1d41a Don't confuse more capable shells by writing operator combinations
that could be interpreted as something different. That is, for our
shell +4++3 is just (+4)+(+3) and works fine. But others treat ++
as the increment operator.  Same for --. Sprinkle spaces to taste.
(from kre@)
2016-03-31 16:19:52 +00:00
ozaki-r
84720685bf Make outputs informative on failure 2016-03-28 02:35:43 +00:00
ozaki-r
d0731f8a07 Add tests for "route get" 2016-03-28 01:53:07 +00:00
christos
32b59da6c9 Allow for testing other than /bin/sh using TEST_SH (from kre@) 2016-03-27 14:57:50 +00:00
christos
aa36454cd0 Finish these tests (or at least, fill in the place holder tests
with actual code ... tests are never really finished.)  One of these
new tests was how the bug in PR bin/50993 was discovered. (from kre@)
2016-03-27 14:53:17 +00:00
christos
bb5046e57f PR bin/50993 - lots of new here document tests to validate all of
the changes made to fix that PR.   LOTS more tests...  A few general
improvements to the way the tests work and results are reported
as well. (from kre@)
2016-03-27 14:52:40 +00:00
christos
e0530cd421 More tests, add protection against shells that allow wait N
to wait for the same process over and over again (forever) (???)
This test now takes slightly over 20 seconds to complete (elapsed
time) caused by all the waiting on sleep commands being run in
the background. (from kre@)
2016-03-27 14:50:40 +00:00
christos
c43f84898f Finish TEST_SH - all tests should support it now.
Misc other KNF changes, minor bug fixes, and a few minor
extra tests added. (from kre@)
2016-03-27 14:50:01 +00:00
christos
8130505f80 Avoid relying on the test shell correctly implementing $(( ))
in order for some of the redirect tests to terminate. (from kre@)
2016-03-27 14:49:07 +00:00
christos
bb9d40a374 new command substitution test from kre 2016-03-20 22:57:04 +00:00
christos
e04f666a7e Better tests for redircloexec and add t_shift (from kre) 2016-03-16 21:13:51 +00:00
christos
487f18f8df remove binary test and other cleanups (from kre) 2016-03-16 17:39:12 +00:00
christos
96320c1795 New tests from kre 2016-03-16 15:49:19 +00:00
mrg
3890e54546 rework to avoid new GCC 5.3 errors and improve readability 2016-03-16 07:21:36 +00:00
christos
239c335529 Add some redir-close-on-exec tests 2016-03-13 18:55:12 +00:00
ozaki-r
3a482ca275 Fix test 2016-03-13 17:26:05 +00:00
ozaki-r
c3509e5280 Add more debugging code 2016-03-13 05:46:20 +00:00
christos
796504694c Implement TEST_SH for this test, add a test or two, and also some
commentary to explain some of the weirdness of shell quoting. (from kre@)
2016-03-12 14:58:03 +00:00
martin
820268b0ef Fix masking for the fpsetmask_basic test, pointed out by Timo Buhrmester 2016-03-12 11:55:14 +00:00
joerg
b17f910c4a When no gcc but clang can be found, fallback to the latter instead of
failing the tests.
2016-03-12 08:55:54 +00:00
ozaki-r
3a591e0ce2 Add debugging code and enable it by default
to know what is happening on anita (qemu)
2016-03-12 06:15:31 +00:00
christos
acfb0ca6d6 Set TEST_SH 2016-03-10 22:30:57 +00:00
christos
2c3c3b3c5b Added more test cases, more exhaustive testing. (from kre) 2016-03-08 14:26:54 +00:00
christos
c5b16bb470 remove old test 2016-03-08 14:26:34 +00:00
christos
e4619cdffb Tests for the shift builtin (from kre) 2016-03-08 14:26:26 +00:00
christos
491442e6cd This test tests nothing not tested elsewhere, and doesn't
do a very good job of that. Bang! (from kre)
2016-03-08 14:24:50 +00:00
christos
c74a97456e Complete implementation of TEST_SH, use builting kill (which does
work, now anyway) rather than working around a defect by using
/bin/kill (if the shell is broken, the test should fail, not succeed)
and test more aspects of the wait builtin in the kill test. (from kre)
2016-03-08 14:24:06 +00:00
christos
764b20ba6a Cleanup left over (dead) debugging code (from kre) 2016-03-08 14:21:02 +00:00
christos
e408fa7e5e Correct one test that (while OK for NetBSD) insisted on behaviour
that is not required by the standard. The test now allows either
of the two allowed responses. Also add commentary correcting
erroneous comments about what is correct, and incorrect. (from kre)
2016-03-08 14:20:22 +00:00
christos
dd894f6fca Correct the way that TEST_SH is used so that the tests work as
intended when TEST_SH is specifies a shell that needs options (like
sh -F, or bash -o posix). (from kre)
2016-03-08 14:19:28 +00:00
joerg
1c9e147d7d libc fallback is known to not produce nice alias entries. Avoid spurious
failures when testing in an empty chroot by requiring the services db.
2016-03-08 08:34:17 +00:00
joerg
c632ff2be2 Require the boot block to be used, test can't work otherwise. 2016-03-08 08:04:48 +00:00
christos
ad2951bb03 make it work on linux, be pickier about errors, and correct variable type. 2016-03-04 18:52:01 +00:00
ozaki-r
8ce75dc03a Improve tests of proxy arp
The tests make it clear how it behaves though, I don't know if the current
behavior is what it should be.
2016-03-04 04:18:44 +00:00
ozaki-r
be7deda7eb Add tests for tap(4) 2016-03-04 02:44:45 +00:00
christos
06f9bef68e Improved handling of TEST_SH so that it is possible to define it
to the name of a shell, plus options that shell needs to run it
in the correct mode to be tested: eg: TEST_SH='bash -o posix'
Also finished the implementation of tests of "set -n" now that
the NetBSD shell supports that as it should. (from kre)
2016-03-01 12:39:35 +00:00
christos
1843eb8cb0 more tests from kre 2016-02-29 23:52:53 +00:00
ozaki-r
520486c340 Add tests on activating a new MAC address 2016-02-29 09:35:16 +00:00
ozaki-r
2640ddb67b Add tests deleting active/inactive links 2016-02-29 08:13:41 +00:00
joerg
dda31211fa When building the atomic op test on SPARC64 with Clang, skip the
sub-32bit tests for now. Clang currently doesn't synthesize a CAS
replacement nor does it create a libcall.
2016-02-27 18:50:39 +00:00
nat
449e51467a Fix soft volume audio distortion. OK jmcneil@.
Update atf pad expected output.
2016-02-26 13:08:28 +00:00
ozaki-r
f6036fa401 Add basic tests for Proxy ARP
The tests don't much enough and need more realitic tests, for example
tests for a setup using ppp found in PR 44032.
2016-02-25 03:23:15 +00:00
christos
22e9b677fe uncomment clean up 2016-02-24 14:42:50 +00:00
christos
b189a00530 Test improvements from kre 2016-02-24 14:42:06 +00:00
christos
c1ce7cf3ee Add t_option, from kre (with minor edits from me) 2016-02-23 16:20:42 +00:00
christos
dd10ee88d0 Add new redirection test, from kre 2016-02-23 14:21:37 +00:00
christos
7b91d0e80f PR/43469 has been fixed 2016-02-22 20:02:29 +00:00
christos
449b5d003c Add new test 2016-02-22 19:52:03 +00:00
christos
dd7e4e3700 undo accidental commit 2016-02-19 13:49:01 +00:00
christos
64d8e9d299 Add a test for PR/50827 2016-02-19 13:48:28 +00:00
christos
cfb3849454 This needs _KERNTYPES on some platforms. 2016-02-15 14:59:38 +00:00
ozaki-r
423847a240 Add tests for a gateway not on the local subnet
The tests are derived from the example at
http://www.netbsd.org/docs/network/#nonsubnetgateway ,
which has come up in PR 50717.
2016-01-29 04:15:46 +00:00
martin
c25f345cfe The test for PR 50608 works now, remove the expected failure. 2016-01-28 10:10:09 +00:00
pooka
11f923c4b5 include <stdbool.h> for bool 2016-01-25 12:21:42 +00:00
pooka
d35b86acad Don't include <rump/rumpvnode_if.h> from rump.h. It's not needed
unless you're doing something special, but requires register_t.
Adjust the few places which actually need rumpvnode_if.h.
2016-01-25 11:45:57 +00:00
gson
e9eb083c3b Add some tests of hypot() and hypotf() 2016-01-24 20:26:47 +00:00
christos
bdf1a7c5d1 t_lwp_create needs kernel types. 2016-01-24 15:11:08 +00:00
christos
ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
christos
55808dd15a XXX: use unused variables. 2016-01-23 21:18:27 +00:00
christos
abcb9cb972 bridge with the higher Makefile.inc 2016-01-23 18:54:15 +00:00
gson
79350377d6 Don't use a filename with an embedded newline in the create_many test
case.  Instead, add a separate test case "create_nonalphanum" for
filenames containing non-alphanumeric characters.  The bug of
PR kern/50608 now causes a failure in create_nonalphanum rather than
create_many.
2016-01-14 08:58:02 +00:00
pooka
8b742e7a22 create_many: remove PR kern/50607 xfail
Seems to have been fixed by ext2fs_lookup.c 1.79
(thanks, riastradh)
2016-01-13 12:05:49 +00:00
jakllsch
c38078a218 locate_item() doesn't need to have a flags argument, as the flags
are also in the hid item data structure.
2016-01-09 14:31:19 +00:00
jakllsch
03e19f6583 fix test program for hid item checks 2016-01-08 17:34:57 +00:00
jakllsch
ecbab7a38a rework build of t_hid to be more reliable, while working around ATF cruddyness 2016-01-08 17:27:48 +00:00
jakllsch
f9e98a931a Don't crash when the device's HID Report Descriptor Pops from an empty stack. 2016-01-07 16:10:49 +00:00
jakllsch
4887406fba Add tests for HID Parser Pop-on-empty-stack bug. 2016-01-07 15:58:23 +00:00
christos
2acf28e2e5 Unbreak the sun2 build: Don't use program-specific LDADD options because
those come after the general LDADD options and break static linking.
2016-01-06 15:34:54 +00:00
jakllsch
2ba22c9356 Add some tests for the kernel HID parser. 2016-01-05 17:22:38 +00:00
jakllsch
43fe984867 Move libusbhid tests' Report Descriptors and Report Data to seperate file,
so future tests of the kernel HID functions can use them too.
2016-01-04 22:07:16 +00:00
jakllsch
cf34dae03a reorganize constant test data 2016-01-03 15:26:39 +00:00
jakllsch
25812d50a0 Move MY*_ATF_CHECK_EQ debugging helper macros to before all functions. 2016-01-03 15:16:10 +00:00
pooka
419929ef27 create_many:
* add xfails for ext2 and udf
  * don't try to create a subdirectory for sysvbfs
2016-01-02 12:11:30 +00:00
jakllsch
aaf9a4516d Teach hid_parse_usage_in_page() how to understand hex literals, in
addition to the usual table lookup.
2016-01-02 01:24:44 +00:00
jakllsch
f5863ab3d2 Fix round-trip of hid_usage_in_page(hid_parse_usage_in_page()) when
the usage is a catch-all format string.

This should allow usbhidctl(1) to understand an item argument of
"Button:Button_65535".
2016-01-02 01:04:15 +00:00
jakllsch
f8f5861113 Rework unsigned range test cases.
If the USB HID 1.11 spec is interperted to the letter, there's no such
thing as a unsigned Logical/Physical Minimum/Maximum.  When the (signed)
Minimum is greater than the (signed) Maximum, it's a possibility that
the device is attempting to present unsigned report data.
2016-01-01 23:46:04 +00:00
jakllsch
c8b0c3452c Fix hid_get_data() for negative or 32-bit report data. 2016-01-01 22:59:12 +00:00
jakllsch
bc1f6fc421 value debugging for the Logical/Physical range checks 2016-01-01 22:47:34 +00:00
jakllsch
3a26fec827 tests for libusbhid (many of which fail) 2016-01-01 21:38:53 +00:00
pooka
10c4a4e077 use a shorter filename template in previous (for v7fs) 2016-01-01 15:18:39 +00:00
pooka
596d7c2283 Add a test which creates many directory entries. 2016-01-01 15:13:57 +00:00
dholland
bb7bd59051 Fix REL_CHECK error output; it had "expected" and "obtained" swapped.
While here, improve the general legibility of the printout. Not
actually relevant to PR 50574, but anyone looking at that should be
aware of this change.
2015-12-31 10:56:13 +00:00