Commit Graph

245995 Commits

Author SHA1 Message Date
kamil 2945e8c443 Add new tests: tests/lib/libc/sys/t_wait_noproc and t_wait_noproc_wnohang
The t_wait_noproc test checks whether wait(2)-family of functions return
error and set ECHILD for lack of childs.

The t_wait_noproc_wnohang adds to options (except wait(2), wait3(2)) new
parameter WNOHANG and verifies that error is still signaled and errno set
to ECHILD.

Currently t_wait_noproc_wnohang reports failures, these have been marked as
expected and referenced to PR standards/51606.

The problem report is authored by Robert Elz, and the initial regression
has been notified by Nicolas Joly.

Remove redundant test in tests/lib/libc/sys/t_wait for wait6(2) with no
WNOHANG specified.

Sponsored by <The NetBSD Foundation>.
2016-11-06 15:03:30 +00:00
alnsn 838eb24361 Add tests for not-yet-committed cgd algorithm AES-XTS.
The tests are marked as expected failures.
2016-11-06 10:54:42 +00:00
wiz a1a199794c Fix xref. 2016-11-06 09:16:38 +00:00
msaitoh f124b4c080 Add "10/100" into non-gigabit devices' name. 2016-11-06 02:38:25 +00:00
kamil ed8b0a45b2 All tests in t_wait now pass
Christos Zoulas committed fixes to src/sys/sys/wait.h r.1.32.

Closes PR standards/51603

Sponsored by <The NetBSD Foundation>
2016-11-06 02:28:57 +00:00
msaitoh a9fc64c0c4 Add 82562 and wm(4). 2016-11-06 02:27:34 +00:00
christos a5a0f0a456 Since the stopped bits set is a subset of the continued bits set, check
that we are not continued in WIFSTOPPED.
Make WIFSIGNALED more obvious, it being the remaining state of not exited,
not stopped and not continued.
2016-11-05 23:49:59 +00:00
pgoyette 94bd54f794 Move if_43.c back into the shared Makefile.sysio where it really
belongs.

Update the code to invoke the two routines compat_cvtcmd() and
compat_ifioctl() through indirect pointers.  Initialize those
pointers in sys/net/if.c and update them in the compat module's
initialization code.

Addresses the issue pointed out in PR kern/51598
2016-11-05 23:30:22 +00:00
kre edb49bae9b Actually, this problem won't be reported upstream, their code is
just ...

	ptrdiff_t nitems_max = PTRDIFF_MAX - WORK_AROUND_QTBUG_53071;
	ptrdiff_t amax = nitems_max < SIZE_MAX ? nitems_max : SIZE_MAX;

which is just fine if you think about it a little,   Unfortunately,
in our zealous effort to never leave a ggc warning unused, and to
treat all of the warnings as fatal errors, that code falls foul of the
"you must not compare an unsigned value with a signed value" warning.

nitems_max is a (signed) largish positive integer (obviously, by
inspection).  If it is less than SIZE_MAX then amax is just nitems_max.
In the unlikely case that size_t has less bits than ptrdiff_t so
SIZE_MAX is smaller, amax is limited to SIZE_MAX (which in that case
is known to fit in the ptrdiff_t and to remain positive).

To pacify gcc (and the way the build system uses it), casts are
required.   Unfortunately the cast that was installed here was to
convert SIZE_MAX to a ptrdiff_t.  Unfortunately when ptrdiff_t has
the same number of bits (or less) as size_t (ie: the common case)
but is signed, (ptrdiff_t)SIZE_MAX is just a fancy way of writing -1.

Rearrange the casting in a way that keeps the original intent
of the code for us (it is actyaly now incorrect if size_t has less
bits than a ptrdiff_t) and keeps gcc happy, all at the same time.

What a mess.
2016-11-05 23:09:37 +00:00
kre 752944af9d Revert a couple of lines of code from tzcode2016i to their state in 2016h
SIZE_MAX is the max value of a size_t (and is unsigned) so when converted
to a ptrdiff_t  (int) becomes -1.   That's not what the code was attempting
to achieve.

This will be reported upstream to the tzcode maintainers, and we'll see
what variation appears in tzcode2016j ...

Until then, the older code always worked for us, so it will do for now.

This should fix the broken i386 build.
2016-11-05 22:21:48 +00:00
kamil 04949b4194 Add new test wait6_stopgo_loop in t_wait
This test verifies that it is possible to emit multiple times SIGSTOP and
SIGCONT for a child.

Add checks that status does not return more than one valid state from the
following list: STOPPED, CONTINUED, EXITED and SIGNALED. This check fails
for WIFCONTINUED()==true as it currently and wrongly returns true for
WIFSTOPPED().

This verification is added to wait6_stopgo_loop and wait6_stop_and_go and
marked as expected failure and linked with PR standards/51603.

Remove trailing whitespace.

Sponsored by <The NetBSD Foundation>
2016-11-05 21:49:28 +00:00
riastradh 9fe68096f1 Set *endptr in all paths out of strtoul and family.
XXX pullup-6
XXX pullup-7
2016-11-05 21:11:30 +00:00
riastradh 2d9978a06e Update strtoul(3) example to reflect clarifications in strtol(3). 2016-11-05 20:57:31 +00:00
roy 7681c3aec3 Don't handle ARP duplication for the unspecified address. 2016-11-05 20:03:15 +00:00
kamil 41d2cf1b30 attach1 in t_ptrace no longer fails
Christos Zoulas fixed the issue that a parent sees termination of its child
before a tracer observing it for its tracee.

Many thanks to Christs for his help, he makes progress with tests so quick.

Closes PR kern/51600

Sponsored by <The NetBSD Foundation>.
2016-11-05 15:52:35 +00:00
skrll f5a4f1812f Also return early from _bus_dmamap_sync if we're not bouncing and there
are no {pre,post} ops

Now the KASSERT doesn't fire on cats
2016-11-05 14:26:23 +00:00
christos 678541356f Return 0 if WNOHANG and no kids. 2016-11-05 02:59:22 +00:00
kamil b057fe9bfd Add new test attach1 in t_ptrace
This test asserts that tracer sees process termination before the parent

Currently this is not true for NetBSD.

The problem has been reported in gnats as kern/51600.

Originally an early version of this test triggered kernel panic, that
was fixed by Christos Zoulas -- thanks! Appropriate fixes are as follows:
http://mail-index.netbsd.org/source-changes/2016/11/04/msg078868.html
http://mail-index.netbsd.org/source-changes/2016/11/04/msg078869.html

Mark this test as expected failure and linked with proper PR.

As an interesting note, this test uses pipe(2) to perform IPC. Use for
messages uint8_t message to be sure that it will never by transmitted
partially from a caller to a callee, this assumption simplifies the code.

Add local function await_zombie() that takes process identifier (pid).
This function uses the sysctl(7) interface to probe p_stat of a requested
process and compares it with LSZOMB.

Try to keep closing all unneeded file descriptors for pipes in order to not
run out of fds later.

Sponsored by <The NetBSD Foundation>.
2016-11-05 01:49:53 +00:00
christos b3ba15e2be Add _Generic C11 support. 2016-11-05 01:09:30 +00:00
christos 375cff8702 lint knows about _Generic 2016-11-05 01:08:58 +00:00
mlelstv 2610f5dfb8 match RTL8188EU device from vendor ABOCOM. 2016-11-04 20:44:57 +00:00
mlelstv a63f79cc7e regen 2016-11-04 20:40:11 +00:00
mlelstv 06f1a43972 add id for RTL8188EU from vendor ABOCOM 2016-11-04 20:39:33 +00:00
riastradh 02eab895ae Bump date for previous. 2016-11-04 20:19:58 +00:00
riastradh 59495a850c Tidy up the second example too. 2016-11-04 20:18:23 +00:00
riastradh 105424da40 Simplify error condition case.
Add assertions to reflect its implications.
2016-11-04 20:16:18 +00:00
riastradh e465e7c45b Distinguish invalid syntax from trailing garbage cases. Clarify. 2016-11-04 20:14:31 +00:00
riastradh 3a33a135da Distinguish altogether invalid syntax from trailing garbage. 2016-11-04 20:06:09 +00:00
macallan 2ee28d152e fix remaining *_TSB_DATA() uses 2016-11-04 20:04:11 +00:00
riastradh 95993320dc EXIT_FAILURE police 2016-11-04 20:04:04 +00:00
christos aafaa3c48f tzcode2016i 2016-11-04 19:41:53 +00:00
riastradh fd26083f95 Fix infinity detection with isinf(d), not d == HUGE_VAL.
Negative infinity counts as overflow too.

Simplify.
2016-11-04 19:18:53 +00:00
flxd 9ff8fe6273 Add new USB-enabled kernel config(s) based upon GENERIC for pmax, include it as kernel set in the build and make it a choice in sysinst.
OK simonb@
2016-11-04 19:18:50 +00:00
riastradh e7962ffd1d Add example for strtod.
This illustrates all the cases you might be interested in and asserts
theorems in those cases.
2016-11-04 19:10:04 +00:00
riastradh 7f81880412 Fix description of ERANGE cases again.
Do use the technical terms `overflow' and `underflow', because strtod
sets ERANGE precisely to indicate either of these two conditions, and
they are the right keywords that one might be looking for.

Note that strtod may set ERANGE even if it returns noninfinity and
nonzero -- specifically, if the result is subnormal.  This part was
wrong before I `fixed' it and remained wrong after I `fixed' it
earlier this year.
2016-11-04 18:46:15 +00:00
christos 9b5ab01589 deduplicate the complex lock reparent dance. 2016-11-04 18:14:04 +00:00
christos e8fde31e58 Cleanup old parent from zombies too. Fixes repeatable panic when we try
to signal the already freed zombie parent after the child exits.
2016-11-04 18:12:06 +00:00
macallan acc190f453 set BUS_SPACE_MAP_PREFETCHABLE when mapping the SFB32 range
now using alpha fonts is actually faster than using bitmap fonts
2016-11-04 18:11:15 +00:00
macallan e3dc2ffce8 allow BUS_SPACE_MAP_PREFETCHABLE with bus_space_map() as well 2016-11-04 18:09:14 +00:00
phx 90e94125ec wscons and Xorg support for Tseng ET4000/W32 based boards (grf6). 2016-11-04 18:06:08 +00:00
macallan 877740fe55 mmap() memory-ish regions with BUS_SPACE_MAP_PREFETCHABLE 2016-11-04 16:35:32 +00:00
christos 096c8b23c8 follow suit (add missing d) 2016-11-04 15:31:45 +00:00
martin ed3eda7194 Add NODEBUGLIB here as well (sync with binutils directory) 2016-11-04 13:29:38 +00:00
kamil e70724aaaf The problem with WIFCONTINUED() and WIFSTOPPED() in traceme4 is resolved
Fixed by Christos Zoulas in:
cvs rdiff -u -r1.260 -r1.261 src/sys/kern/kern_exit.c
http://mail-index.netbsd.org/source-changes/2016/11/03/msg078852.html

This has been verified to work on NetBSD releng machines.

Closes PR kern/51596

Sponsored by <The NetBSD Foundation>.
2016-11-04 09:08:11 +00:00
skrll 958325a389 Cmoment formatting. No functional change. 2016-11-04 08:24:36 +00:00
macallan 7a874cfdc6 add plumbing to support bus_space_mmap() with:
- write combining allowed via BUS_SPACE_MAP_PREFETCHABLE
- byte order translation via BUS_SPACE_MAP_LITTLE
2016-11-04 05:41:01 +00:00
joerg 374e459041 Tail calls can use the PLT without a nop after the branch. Since the
callee won't return to the next instruction anyway, it wouldn't work
anyway.
2016-11-04 00:19:32 +00:00
pgoyette d671bf9bca Move if_43.c out of Makefile.sysio and into the main Makefile.
The former location gets included in both libcompat and the compat
module, leading to redefined symbols when the module is loaded.  By
moving it to the main Makefile, it gets included only in libcompat.

XXX This still isn't an ideal solution, but it will suffice until
XXX PR kern/51598 is addressed.
2016-11-03 22:23:03 +00:00
joerg e887dd50b2 Mark the new SPARCv9-in-32bit-mode modules as needing V9. 2016-11-03 22:18:29 +00:00
kamil f26cf4cb48 Prefer modern simple past tense and past participle of catch
The "catched" form is obsolete and nonstandard, prefer "caught".
2016-11-03 22:08:30 +00:00