Commit Graph

4171 Commits

Author SHA1 Message Date
lukem a11399dd2d fix build of h_thread_local_dtor.cpp 2020-06-21 07:06:05 +00:00
lukem a41884d4ca fix build of t_cabsl from t_cabsl.cxx
t_cabsl source is in t_cabsl.cxx not t_cabsl.cc - the latter
is what bsd.tests.mk defaults to.

This only broke after my commit of share/mk/bsd.dep.mk rev 1.85
but I don't know why it didn't cause a problem previously.
2020-06-21 06:58:16 +00:00
rin 669f5e8178 Fix false positive for mvscanw tests on big endian machines.
When conversion specifier is not a derivative form of "%s", retrieve
input as 32bit integer, and then convert to string literal. Then we
can avoid interpretation from ASCII code to integer, which is
apparently byte-order depended.
2020-06-20 07:50:16 +00:00
rin 4562851ebb Skip sigbus_adraln for powerpc.
SIGBUS for unaligned accesses is not mandatory for powerpc;
most processors (not all, e.g., 403) can deal with that.
2020-06-20 07:30:09 +00:00
rin 81e0508055 Fix build for vax; Compile t_ptrace_sigchld.c with -D__TEST_FENV. 2020-06-17 22:07:21 +00:00
rin f68301ec40 Let trigger_fpe() cause floating-point divide by zero exception, instead of
integer one, which is not trapped for powerpc and aarch64.

Note that it is checked in lib/libc/gen/t_siginfo whether integer divide by
zero is interpreted as SIGFPE or not.

Now, all *_crash_fpe tests pass for powerpc, and nothing changes for amd64
at least.
2020-06-17 08:42:16 +00:00
rin 2d089d6a31 Regardless of __HAVE_FENV, include <fenv.h>, which itself defines __HAVE_FENV. 2020-06-17 08:23:18 +00:00
kamil aa97815be0 Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
2020-06-17 00:16:21 +00:00
sevan 5996c744ca Improve sentence 2020-06-16 09:47:11 +00:00
martin ac717ccabf PR kern/55272: skip this test on uniprocessor machines, it is too dangerous
and can kill the host kernel if a userland watchdog is running
2020-06-16 07:59:07 +00:00
christos 1f33802f79 language sensitivity 2020-06-15 13:57:45 +00:00
roy b05648aa26 Remove in-kernel handling of Router Advertisements
This is much better handled by a user-land tool.
Proposed on tech-net here:
https://mail-index.netbsd.org/tech-net/2020/04/22/msg007766.html

Note that the ioctl SIOCGIFINFO_IN6 no longer sets flags. That now
needs to be done using the pre-existing SIOCSIFINFO_FLAGS ioctl.

Compat is fully provided where it makes sense, but trying to turn on
RA handling will obviously throw an error as it no longer exists.

Note that if you use IPv6 temporary addresses, this now needs to be
turned on in dhcpcd.conf(5) rather than in sysctl.conf(5).
2020-06-12 11:04:44 +00:00
martin b7244a59d8 Do not destroy mutices that failed to init - fixes a run with
PTHREAD_DIAGASSERT set to "a". Pointed out by joerg.
2020-06-11 11:40:54 +00:00
ad a1d54d8ee2 Adjust cond_timedwait_race to take account of spurious wakeups (which are
completely legit).
2020-06-10 21:46:50 +00:00
kamil db4bf4da47 Add fork/vfork/posix_spawn tests for processes within pgrp
New tests:
 - fork_setpgid
 - vfork_setpgid
 - posix_spawn_setpgid
 - unrelated_tracer_fork_setpgid
 - unrelated_tracer_vfork_setpgid
 - unrelated_tracer_posix_spawn_setpgid

These tests trigger a kernel assert for pg_jobc going negative.

The tests are temporarily skipped.
2020-06-09 00:28:57 +00:00
thorpej 9a0cd196e4 Ensure copy_data_create_copy() is tolerant of creating empty data objects. 2020-06-08 21:31:17 +00:00
rillig c32d14bd2e usr.bin/make: fix test failure
The two files include-sub.mk and include-subsub.mk were never intended to
be test cases on their own.  They belong to include-main.mk.

Fixes PR bin/55360.
2020-06-08 19:50:10 +00:00
fox bf982b61a2 tests/lib/libarchive: Suppress -Werror=stringop-truncation error
This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures
NUL-termination on the next line as other users of the field expect.

Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes.

Error was reported when build.sh was run with MKSANITIZER=yes flag.

Reviewed by: kamil@
2020-06-07 23:20:52 +00:00
thorpej 9bc38ca6a6 Don't use deprecated proplib APIs (in the old "basic" test case). 2020-06-06 21:45:07 +00:00
thorpej a792b8435e Improvements to the problib(3) API:
==> Provide a much more complete set of setters and getters for different
    value types in the prop_array_util(3) and prop_dictionary_util(3)
    functions.

==> Overhaul the prop_data(3), prop_number(3), and prop_string(3) APIs
    to be easier to use and less awkwardly named,  Deprecate the old
    awkward names, and produce link-time warnings when they are referenced.

==> Deprecate mutable prop_data(3) and prop_string(3) objects.  The old
    APIs that support them still exist, but will now produce link-time
    warnings when used.

==> When the new prop_string(3) API is used, strings are internally
    de-duplicated as a memory footprint optimization.

==> Provide a rich set of bounds-checked gettter functions in and a
    corresponding set of convenience setters in the prop_number(3) API.

==> Add a new prop_bool_value(3) function that is equivalent to
    prop_bool_true(3), but aligned with the new "value" routines in
    prop_data(3), prop_string(3), and prop_number(3).
2020-06-06 21:25:59 +00:00
thorpej 9dd0cf5370 Add a test case to ensure that _lwp_create() fails with the
expected error code when a bad new-lwp-id pointer is passed.
2020-06-06 18:11:21 +00:00
knakahara f26b5d9d11 Refactor a little and follow new format of "npfctl list".
Fix the below ATF failures.
    - net/if_ipsec/t_ipsec_natt:ipsecif_natt_transport_null
    - net/if_ipsec/t_ipsec_natt:ipsecif_natt_transport_rijndaelcbc
    - net/ipsec/t_ipsec_natt:ipsec_natt_transport_ipv4_null
    - net/ipsec/t_ipsec_natt:ipsec_natt_transport_ipv4_rijndaelcbc

ok'ed by ozaki-r@n.o, thanks.
2020-06-05 03:24:58 +00:00
martin 305e2e0fef Skip this test on machines where it would cause serious swapping. 2020-06-03 18:07:26 +00:00
christos e81cd2ea14 LIBISPRIVATE=yes 2020-06-01 14:42:03 +00:00
christos 2e98ca8c7c Set LIBISPRIVATE=yes 2020-06-01 14:41:25 +00:00
martin 112112a823 Adjust to "npfctl debug" command line changes, from rmind@. 2020-06-01 11:08:57 +00:00
martin c9e294b294 Typo in error message 2020-06-01 04:38:37 +00:00
kamil f222e3cc8d Avoid redefining _REENTRANT under sanitizers
Switch away from -Wno-macro-redefined which was Clang specific.
2020-06-01 01:03:21 +00:00
kamil 47ead56b15 Mask NULL + 0 LLVM UBSan reports in the ATF test: t_pslist.c
Pass -fno-delete-null-pointer-checks for Clang for the
MKSANITIZER/MKLIBCSANITIZER build
2020-05-31 16:36:07 +00:00
christos d37743e0ff Fix alpha build (relocation truncated to fit: GPREL16 against symbol ...)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47230
2020-05-26 18:52:29 +00:00
ad 0eaaa024ea Move proc_lock into the data segment. It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.
2020-05-23 23:42:41 +00:00
christos 627b2779c6 Fix sun2 build. Still there are some duplicate symbols in the rump libraries
that make this awkward.
2020-05-17 18:52:43 +00:00
christos ab0d77c491 put librumpvfs_nofifofs after librumpvfs for the benefit of sun2 2020-05-17 18:25:11 +00:00
kamil 2affbc81a5 Ignore interception of SIGCHLD signals in the debugger
Set SIGPASS for SIGCHLD for the traced child in the following tests:
 - unrelated_tracer_fork*
 - unrelated_tracer_vfork*
 - unrelated_tracer_posix_spawn*

There is a race that SIGCHLD might be blocked during forking and dropped.

PR/55241 by Andreas Gustafsson
2020-05-16 23:10:26 +00:00
kamil 3fadaf7f87 Fix typo in test names
Noted by <joerg>
2020-05-16 22:07:06 +00:00
kamil 985ba7a358 Ignore interception of SIGCHLD signals in the debugger
Set SIGPASS for SIGCHLD for the traced child in the following tests:

 - posix_spawn_singalmasked
 - posix_spawn_singalignored
 - fork_singalmasked
 - fork_singalignored
 - vfork_singalmasked
 - vfork_singalignored
 - vforkdone_singalmasked
 - vforkdone_singalignored

There is a race that SIGCHLD might be blocked during forking and dropped.

PR/55241 by Andreas Gustafsson
2020-05-16 19:08:20 +00:00
christos fe491c4f65 Do the same thing with linker flags instead of directly specifying the archives. 2020-05-16 12:54:27 +00:00
christos 9df67dbe77 more nofifofs 2020-05-16 12:44:42 +00:00
christos 6d46df7548 PR/55102: Kamil Rytarowski: Duplicate fifo_vnodeop_entries,
fifo_vnodeop_opv_desc symbols.

Many filesystems ffs, lfs, ulfs, chfs, ext2fs etc. use fifofs
internally for their fifo vnops. NFS does too, but it also needs
networking anyway.  Unfortunately fifofs brings in a lot of the
networking code so that the rumpkernel is not well partition. In
addition the fifo code is rarely used.

The existing hack depended on duplicating the above symbols and
adding minimal functionality for the majority of the the tests
(except the ffs and the puffs one). In these two cases both symbols
were loaded and the symbol sizes clashed which broke the sanitizers.
While this can be fixed with weak symbols and other kinds of
indirection, it is more straight forward to select between the
minimal and the full fifofs implementation by introducing a new
shared library librumpvfs_nofifofs.
2020-05-15 23:32:27 +00:00
kamil 1cb4f56df8 Ignore interception of the SIGCHLD signals.
SIGCHLD once blocked is discarded by the kernel as it has the
SA_IGNORE property. During the fork(2) operation all signals can be
shortly blocked and missed (unless there is a registered signal
handler in the traced child). This leads to a race in this test if
there would be an intention to catch SIGCHLD.

Fixes PR lib/55241 by Andreas Gustafsson
2020-05-14 19:21:35 +00:00
msaitoh 8012ca3f0e Remove extra semicolon. 2020-05-14 08:34:17 +00:00
yhardy dd377fc593 Fix the build for MKCOMPAT=no.
The t_user_ldt test needs the i386 compat library which is only built
when MKCOMPAT=yes.
2020-05-11 21:51:25 +00:00
kamil 907d0e8035 Fix potential race in ptrace(2) clone(2) tests
Instead of comparing old and new signal mask, just after the cloning
operation, check whether the expected signal is still masked and in
another test whether it is still ignored.

Catch up after t_ptrace_fork_wait.h r. 1.2.
2020-05-11 21:18:11 +00:00
kamil 9400a778fb Fix race in fork_singalmasked
ELF RTLD after rtld.c r. 1.204 introduced locking that wraps the fork
syscall. This locking changes signal mask of the calling process during
the forking process.

Instead of comparing old and new signal mask, just after the forking
operation, check whether the expected signal is still masked and in
another test whether it is still ignored.
2020-05-11 20:58:48 +00:00
kamil 2b6df1dd1e Simplify previous
Emit SIGKILL without a loop and without checking for exact process status
once it is collected.
2020-05-11 12:17:57 +00:00
kamil d9604583e2 Do not fail when trying to kill a dying process
A dying process can disappear for a while. Rather than aborting, retry
sending SIGKILL to it.
2020-05-11 11:03:15 +00:00
maxv d6eec10312 A kernel without USER_LDT returns ENOSYS, not ENOTSUP. 2020-05-09 09:08:41 +00:00
thorpej d1852f1c12 Fix a bug in the futex_wake_highest_pri test case. Still fails as
expected.
2020-05-06 05:14:27 +00:00
skrll bda3cfd2fc Disable attempt to use ifunc on hppa. It doesn't work and new binutils
throws a build error.
2020-05-05 20:47:14 +00:00
kamil 43b8951996 Skip traceme_raise* tests rather than failing upfront
This avoid reporting the tests as unexpected failure.
2020-05-05 18:12:20 +00:00