Commit Graph

3273 Commits

Author SHA1 Message Date
joerg
e78cfb8eb8 Add IRELATIVE support for ARM, X86 and PowerPC. 2017-08-10 19:03:25 +00:00
ryo
1581658c21 Add support IP_PKTINFO for sendmsg(2).
The source address or output interface can be specified by adding IP_PKTINFO
to the control part of the message on a SOCK_DGRAM or SOCK_RAW socket.

Reviewed by ozaki-r@ and christos@. thanks.
2017-08-10 04:31:58 +00:00
knakahara
5e20be26d9 Add counter check to vlan(4) ATF. Implemented by s-yamaguchi@IIJ, thanks. 2017-08-09 06:19:56 +00:00
ozaki-r
708290e277 Fix setkey -D -P outputs
The outputs were tweaked (by me), but I forgot updating libipsec
in my local ATF environment...
2017-08-08 02:27:03 +00:00
ozaki-r
3f30ca4e9f Clean up clunky eval strings
- Remove unnecessary \ at EOL
  - This allows to omit ; too
- Remove unnecessary quotes for arguments of atf_set
- Don't expand $DEBUG in eval
  - We expect it's expanded on execution

Suggested by kre@
2017-08-03 03:16:26 +00:00
ozaki-r
5084329750 Add test cases that there are SPs but no relevant SAs 2017-08-02 06:30:00 +00:00
ozaki-r
548d2e187c Add test cases for setsockopt(IP_IPSEC_POLICY) 2017-08-02 02:19:56 +00:00
kre
21aab71556 PR bin/48498 PR bin/52426
Add two new sh syntax test cases to check for bug fixes for the parser
problems (syntax errors unidentified) reported in the two PRs.

In the latter case, also include some tests that test similar
looking, valid, syntax - to make sure the fix for the PR does not
break code that should not fail.  This is not needed for the earlier
PR as other tests, and just normal parsing, is sufficient.

These tests have been verified to fail with a current /bin/sh and to
pass with the sh updates that are to be committed soon -- and because that
fix is expected within hours, the tests are not marked as expected to
fail, just let them actually fail for now.
2017-07-26 17:50:20 +00:00
kre
79eedfcd84 Do the previous test a better way - for a file, test is generally
adequate, but for a device, we really need to actually try opening
it to determine that it is possible - so do the test that way, then
if the open succeeds once, assume it will the second time (which then
holds it open.)
2017-07-25 22:28:22 +00:00
uwe
9b1c19fc0a Revert previous as it breaks at least sparc and hpcsh builds.
nearbyint() is not included in libm on all platforms.
2017-07-25 21:26:56 +00:00
kre
ddab1f6e3b Correct oversight in previous ... redirecting into a compound statement
causes the shell to exit if the redirect fails (posix says "may exit"
and /bin/sh does - maybe should give that more thought) - which will
happen if /dev/pad0 does not exist, causing a very messy test abort
(the shell running the test is not supposed to just go away).  So
check tha the device exista and is readable before attempting to open it.

Problem brought to my attention by nat@ - thanks...
2017-07-25 21:25:03 +00:00
he
6fb4c3a397 Add a test checking nearbyint(), using the same table as used by
the existing lrint() test.
2017-07-24 18:14:46 +00:00
he
4624b40e19 Swap around the two last args to the check for expected fegetround(),
so the error message makes sense.
2017-07-24 18:13:36 +00:00
ozaki-r
b0de75e145 Skip ipsec_spi_*_*_preferred_new_timeout when running on qemu
Probably due to PR 43997
2017-07-24 02:07:43 +00:00
perseant
508bf0d1f1 Add missing files from last commit:
Move Unicode <-> ku/ten mapping into the individual codec modules.
Mapping is based on existing iconv data for single-byte encodings,
and included for several, but not all, multibyte encodings.
2017-07-23 18:51:21 +00:00
joerg
df826237c7 Avoid a race condition between dlclose and thread termination. 2017-07-21 16:39:20 +00:00
ozaki-r
6ff108ffbe Stop setting isr->sav on looking up sav in key_checkrequest 2017-07-21 04:43:42 +00:00
uwe
0188ee35ae Don't execute random garbage. Fixes mprotect_mremap_exec test. 2017-07-20 01:13:47 +00:00
ozaki-r
a9fb96bdfe Don't make SAs expired on tests that delete SAs explicitly 2017-07-20 01:10:57 +00:00
ozaki-r
38d6ad3a8b Add tests that explicitly delete SAs instead of waiting for expirations 2017-07-19 02:06:47 +00:00
ozaki-r
80503e641a Make tests more stable
sleep command seems to wait longer than expected on anita so
use polling to wait for a state change.
2017-07-19 02:06:11 +00:00
kre
ae98bc7d08 NFC: Typo in a comment corrected. 2017-07-18 13:17:37 +00:00
kre
a94bbc243b Make sure that the open of /dev/pad0 has succeeded (or at the very
least been attempted) before attempting to open /dev/mixer to determine
if the system being tested has audio or not.  Leaving this for the background
cat command to do causes a race between that command and the parent sh.
Move this code to a helper function to avoid duplicating it.

Also avoid attempting to kill the background cat if it was never created.
The kill is likely unnecessary anyway, ATF seems to clean up processes
like that one without assistance.   Which is a good thing, as the kill
does not happen if the test is skipped, or fails.
2017-07-18 12:40:57 +00:00
ozaki-r
6ed91e62d5 Separate test files 2017-07-18 02:16:07 +00:00
kre
56aa5062b1 Add some tests for the (likely forthcoming) pipefail option (modelled
after than in ksh and bash, and the similar thing in zsh) for which a
request has been made for support in the NetBSD sh.

Until the support is committed, the test will be skipped.
2017-07-15 18:52:21 +00:00
kre
8d48762db3 Add basic tests for the forthcoming ',' '++' and '--' operators.
Until the support for those is committed to /bin/sh (and when testing
any other sh that does not support them) the new tests will be skipped.
2017-07-15 18:50:42 +00:00
ozaki-r
8534aec06b Fix wrong argument handling 2017-07-15 07:26:02 +00:00
perseant
4a641438c8 Add a simple collation test. This test is expected to fail on HEAD since
we do not yet have a working implementation of wcscoll.
2017-07-14 14:57:43 +00:00
joerg
3d39ee5ed6 VAX doesn't have the test cases, so stub the body as well. 2017-07-14 14:09:53 +00:00
ozaki-r
dfda6b6abe Add test cases for SAs with different SPIs 2017-07-14 11:54:52 +00:00
perseant
adbde1f900 Add ISO10646 versions of these tests, conditional on __STDC_ISO_10646__ .
Also make the tests a bit more verbose, to aid debugging when they fail.
2017-07-12 17:32:51 +00:00
joerg
e5678be828 Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.
2017-07-11 15:21:31 +00:00
joerg
8f5d6573ba Reference correct binary in error messages. 2017-07-10 21:43:33 +00:00
christos
f5fb881beb add another missing munmap (Kamil) 2017-07-09 22:18:43 +00:00
christos
2a9ed5d125 add munmap
#define for const.
2017-07-09 22:13:48 +00:00
christos
1ddb98e77f check for EFAULT on reads and writes to memory with not permission. 2017-07-09 22:04:04 +00:00
joerg
d88dcd0fdc Fix ISO C compliance: strtol of "0xX" should give the largest valid
numeric prefix, which is 0.
2017-07-06 21:08:44 +00:00
ozaki-r
9f04f77dde Add test cases for updating SA/SP
The tests require newly-added udpate command of setkey.
2017-07-05 01:25:03 +00:00
nat
27ecfe9c27 As pad devices are now created on demand - pad has to be open for a
corresponding mixer to be available.
2017-07-03 09:08:35 +00:00
ozaki-r
b95a267001 Add test cases for IPComp 2017-07-03 06:01:16 +00:00
joerg
5f391f4ae2 Export the guard size of the main thread via vm.guard_size. Add a
complementary writable sysctl for the initial guard size of threads
created via pthread_create. Let the existing attribut accessors do the
right thing. Raise the default guard size for threads to 64KB.
2017-07-02 16:41:32 +00:00
ozaki-r
3cd9889005 Check if ARP/NDP entries are purged when a related route is deleted 2017-06-30 07:57:12 +00:00
ozaki-r
3f42983046 Enable to remove multiple ARP/NDP entries for one destination
The kernel can have multiple ARP/NDP entries which have an indentical
destination on different interfaces. This is normal and can be
reproduce easily by ping -I or ping6 -S. We should be able to remove
such entries.

arp -d <ip> and ndp -d <ip> are changed to fetch all ARP/NDP entries
and remove matched entries. So we can remove multiple entries
described above. This fetch all and selective removal behavior is
the same as arp <ip> and ndp <ip>; they also do fetch all entries
and show only matched entries.

Related to PR 51179
2017-06-28 08:17:50 +00:00
ozaki-r
da803ed70d Restore ARP/NDP entries to route show and netstat -r
Requested by dyoung@ some time ago
2017-06-28 04:14:53 +00:00
ozaki-r
fcbd6bf4fa Drop RTF_LLINFO flag (now it's RTF_LLDATA) from local routes
They don't have llinfo anymore. And also the change fixes unexpected
behavior of ARP proxy.
2017-06-28 04:10:47 +00:00
ozaki-r
d15c5ed0e5 Fix wrong comment 2017-06-27 04:56:13 +00:00
ozaki-r
7eee4dba21 Check existence of ARP/NDP entries
Checking ARP/NDP entries is valid rather than checking routes.
2017-06-27 04:52:45 +00:00
ozaki-r
59bb97369e Drop RTF_UP from a routing message of a deleted ARP/NDP entry 2017-06-26 06:59:56 +00:00
ozaki-r
057fd82362 Improve backward compatibility of (fake) routing messages on adding an ARP/NDP entry
A message originally included only DST and GATEWAY. Restore it.
2017-06-26 03:16:28 +00:00
ozaki-r
60f1157fbd Fix usage of routing messages on arp -d and ndp -d
It didn't work as we expected; we should set RTA_GATEWAY not
RTA_IFP on RTM_GET to return an if_index and the kernel should
use it on RTM_DELETE.
2017-06-26 03:13:40 +00:00