The NetBSD Project

CVS log for src/tests/lib/libc/sys/Makefile

[BACK] Up to [cvs.NetBSD.org] / src / tests / lib / libc / sys

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.49.4.4: download - view: text, markup, annotated - select for diffs
Sat Dec 9 12:46:06 2023 UTC (12 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.49.4.3: preferred, colored; branchpoint 1.49: preferred, colored; next MAIN 1.50: preferred, colored
Changes since revision 1.49.4.3: +3 -1 lines
Additionally pull up following revision(s) (requested by riastradh in ticket #1920):

	tests/lib/libc/sys/Makefile: revision 1.75 (via patch)

t_setrlimit uses alloca now

Revision 1.57.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 9 12:43:48 2023 UTC (12 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE
Diff to: previous 1.57: preferred, colored; next MAIN 1.58: preferred, colored
Changes since revision 1.57: +3 -1 lines
Additionally pull up following revision(s) (requested by riastradh in ticket #1769):

	tests/lib/libc/sys/Makefile: revision 1.75 (via patch)

t_setrlimit uses alloca now

Revision 1.72.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 9 12:40:49 2023 UTC (12 months ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2
Diff to: previous 1.72: preferred, colored; next MAIN 1.73: preferred, colored
Changes since revision 1.72: +3 -1 lines
Additionally pull up following revision(s) (requested by riastradh in ticket #477):

	tests/lib/libc/sys/Makefile: revision 1.75 (via patch)

t_setrlimit uses alloca now

Revision 1.76: download - view: text, markup, annotated - select for diffs
Thu Dec 7 16:54:44 2023 UTC (12 months ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +1 -2 lines
t_setrlimit: Narrow the scope of stack-protector warning suppression.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Fri Nov 24 17:19:55 2023 UTC (12 months, 2 weeks ago) by christos
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +2 -1 lines
t_setrlimit uses alloca now

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Aug 8 06:27:32 2023 UTC (16 months ago) by mrg
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +4 -1 lines
introduce new GCC 12 warning disables and use them in a few places

this introduces 4 new warning disable flags:

   CC_WNO_MISSING_TEMPLATE_KEYWORD
   CC_WNO_REGISTER
   CC_WNO_STRINGOP_OVERREAD
   CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings.  of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat Jun 3 08:52:59 2023 UTC (18 months, 1 week ago) by lukem
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +2 -2 lines
bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER

Provide a single variable
	CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
	CLANG_NO_ADDR_OF_PACKED_MEMBER
	CC_NO_ADDR_OF_PACKED_MEMBER
	GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Mon Aug 1 15:48:39 2022 UTC (2 years, 4 months ago) by kre
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-0-RC1
Branch point for: netbsd-10
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +2 -1 lines

Provide _GNU_SOURCE for t_clone now that is required to make clone()
visible.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Wed Apr 6 10:02:55 2022 UTC (2 years, 8 months ago) by gson
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +2 -1 lines
Add a regression test for PR kern/52239, "Changing protections of
already mmap'ed region can fail", based on the test program in the PR.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Mon Nov 1 14:33:41 2021 UTC (3 years, 1 month ago) by hannken
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +3 -1 lines
Test lib/libc/sys/t_timerfd often fails when run on QEMU because
QEMU misses clock interrupts.

Always check values against [ lower, upper ] bounds and use "4 * upper"
when run under QEMU.

Now becomes part of PR kern/43997 "Kernel timer discrepancies".

Revision 1.69: download - view: text, markup, annotated - select for diffs
Sun Sep 19 15:51:28 2021 UTC (3 years, 2 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +6 -2 lines
Add native implementations of eventfd(2) and timerfd(2), compatible with
the Linux interfaces of the same name.

Revision 1.68.2.2: download - view: text, markup, annotated - select for diffs
Mon Dec 14 16:55:51 2020 UTC (3 years, 11 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.68.2.1: preferred, colored; branchpoint 1.68: preferred, colored; next MAIN 1.69: preferred, colored
Changes since revision 1.68.2.1: +3 -1 lines
Unit tests for timerfd.

Revision 1.68.2.1: download - view: text, markup, annotated - select for diffs
Mon Dec 14 16:01:38 2020 UTC (3 years, 11 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +3 -1 lines
Unit tests for eventfd(2).

Revision 1.68: download - view: text, markup, annotated - select for diffs
Sun Sep 6 07:20:31 2020 UTC (4 years, 3 months ago) by mrg
Branches: MAIN
CVS tags: thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-futex
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +4 -1 lines
add support for new GCC 9 warnings that may be too much to fix
right now.  new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.

apply to a bunch of the tree.  mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it.  (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.)  clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Fri Aug 14 00:53:16 2020 UTC (4 years, 3 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -1 lines
New system call getrandom() compatible with Linux and others.

Three ways to call:

getrandom(p, n, 0)              Blocks at boot until full entropy.
                                Returns up to n bytes at p; guarantees
                                up to 256 bytes even if interrupted
                                after blocking.  getrandom(0,0,0)
                                serves as an entropy barrier: return
                                only after system has full entropy.

getrandom(p, n, GRND_INSECURE)  Never blocks.  Guarantees up to 256
                                bytes even if interrupted.  Equivalent
                                to /dev/urandom.  Safe only after
                                successful getrandom(...,0),
                                getrandom(...,GRND_RANDOM), or read
                                from /dev/random.

getrandom(p, n, GRND_RANDOM)    May block at any time.  Returns up to n
                                bytes at p, but no guarantees about how
                                many -- may return as short as 1 byte.
                                Equivalent to /dev/random.  Legacy.
                                Provided only for source compatibility
                                with Linux.

Can also use flags|GRND_NONBLOCK to fail with EWOULDBLOCK/EAGAIN
without producing any output instead of blocking.

- The combination GRND_INSECURE|GRND_NONBLOCK is the same as
  GRND_INSECURE, since GRND_INSECURE never blocks anyway.

- The combinations GRND_INSECURE|GRND_RANDOM and
  GRND_INSECURE|GRND_RANDOM|GRND_NONBLOCK are nonsensical and fail
  with EINVAL.

As proposed on tech-userlevel, tech-crypto, tech-security, and
tech-kern, and subsequently adopted by core (minus the getentropy part
of the proposal, because other operating systems and participants in
the discussion couldn't come to an agreement about getentropy and
blocking semantics):

https://mail-index.netbsd.org/tech-userlevel/2020/05/02/msg012333.html

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Jul 17 15:34:16 2020 UTC (4 years, 4 months ago) by kamil
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +3 -1 lines
Add ppoll() a compatibility wrapper around pollts(2)

Submitted by Apurva Nandan.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Wed Jun 17 22:07:21 2020 UTC (4 years, 5 months ago) by rin
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +2 -1 lines
Fix build for vax; Compile t_ptrace_sigchld.c with -D__TEST_FENV.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Thu Apr 30 11:03:29 2020 UTC (4 years, 7 months ago) by ryo
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +2 -1 lines
Add a test for sigaltstack(2) and SA_ONSTACK

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sun Apr 26 18:53:33 2020 UTC (4 years, 7 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +6 -1 lines
Add a NetBSD native futex implementation, mostly written by riastradh@.
Map the COMPAT_LINUX futex calls to the native ones.

Revision 1.52.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:47 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.52.2.2: preferred, colored; branchpoint 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52.2.2: +1 -1 lines
Sync with HEAD

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat Apr 18 17:44:53 2020 UTC (4 years, 7 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20200421
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +2 -2 lines
PR/55177: Carlo Arenas: mremap(MAP_REMAPDUP) fails after fork()

Revision 1.52.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:27 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.52.2.1: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.1: +20 -8 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri Mar 6 18:32:35 2020 UTC (4 years, 9 months ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-20200411, phil-wifi-20200406
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +4 -1 lines
Add new ptrace(2) test file

t_ptrace_sigchld - for SIGCHLD handler + ptrace(2).

Right now a single test is enabled (raise(SIGKILL)) and marked as failed
as it never finishes as the child is never collected before exiting the
parent uninterested about its child (SA_NOCLDWAIT).

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Mar 1 20:24:07 2020 UTC (4 years, 9 months ago) by christos
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +2 -2 lines
fix variable name

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sun Mar 1 18:08:15 2020 UTC (4 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +2 -2 lines
Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Feb 22 19:44:07 2020 UTC (4 years, 9 months ago) by kamil
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +10 -1 lines
Disable t_ptrace_wait* tests for MKSANITIZER/MKLIBCSANITIZER

A subset of tests is not compatible with the sanitizers.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sun Jun 30 21:20:04 2019 UTC (5 years, 5 months ago) by mgorny
Branches: MAIN
CVS tags: phil-wifi-20191119, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +7 -7 lines
Add a test for verifying procinfo note inside coredumps.

Add a first test for triggering a core dump in the debugged process
(via PT_DUMPCORE) and verifying it.  The test finds procinfo note
and checks its contents.

The core dump is processed through libelf.  However, it only provides
for finding all note segments (or sections?).  I had to implement
finding and processing individual notes myself.  I've added
a core_find_note() function that will be reused in future tests.

Reviewed by kamil.

Revision 1.52.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:10:05 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +16 -7 lines
Sync with HEAD

Revision 1.56: download - view: text, markup, annotated - select for diffs
Fri Apr 26 20:41:10 2019 UTC (5 years, 7 months ago) by maya
Branches: MAIN
CVS tags: phil-wifi-20190609
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +7 -7 lines
Use LDADD, which apparently puts the libraries at the end of the command,
and makes static builds (aka sun2) happier.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Thu Apr 25 19:15:23 2019 UTC (5 years, 7 months ago) by kamil
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +13 -13 lines
Introduce check for the support of FPU exceptions

If FPU exceptions are unsupported, skip the SIGFPE crash tests.

Reuse code from tests/kernel/h_segv.c

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Feb 10 02:13:45 2019 UTC (5 years, 10 months ago) by kamil
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +8 -1 lines
Link t_ptrace_wait* tests with -pthread

While there, bump (c) for ATF ptrace(2) tests.

Add __used in infinite_thread() for consistency with other functions in
the file.

Revision 1.50.2.3: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:56:48 2018 UTC (6 years, 3 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.50.2.2: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.2.2: +3 -1 lines
Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue Aug 21 10:38:09 2018 UTC (6 years, 3 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +3 -1 lines
more tests

Revision 1.50.2.2: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:26:09 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.50.2.1: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.1: +2 -1 lines
Sync with HEAD

Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri May 25 15:42:30 2018 UTC (6 years, 6 months ago) by martin
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -1 lines
Add a test to verify syscall() and/or __syscall() are working.
This used to trigger a panic (see PR kern/53261) on arm.

Revision 1.50.2.1: download - view: text, markup, annotated - select for diffs
Mon May 21 04:36:17 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -1 lines
Sync with HEAD

Revision 1.51: download - view: text, markup, annotated - select for diffs
Fri May 18 06:39:58 2018 UTC (6 years, 6 months ago) by kamil
Branches: MAIN
CVS tags: pgoyette-compat-0521
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -1 lines
Add new ATF tests: t_fork and t_vfork

Test behavior of raise(signal) in either fork(2)ed or vfork(2)ed child.

Tests:
 - raise1 SIGKILL
 - raise2 SIGSTOP
 - raise3 SIGTSTP
 - raise4 SIGTTIN
 - raise5 SIGTTOU
 - raise6 SIGABRT
 - raise7 SIGHUP
 - raise8 SIGCONT

t_vfork:raise2 fails ignoring non-maskable SIGSTOP.

The remaining ones pass.

Sponsored by <The NetBSD Foundation>

Revision 1.49.4.3: download - view: text, markup, annotated - select for diffs
Wed Mar 21 10:08:03 2018 UTC (6 years, 8 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.49.4.2: preferred, colored; branchpoint 1.49: preferred, colored
Changes since revision 1.49.4.2: +2 -1 lines
Pull up the following, requested by kamil in ticket #552:

external/gpl3/gcc{.old}/dist/libsanitizer/asan/asan_linux.cc 1.4
sys/arch/aarch64/include/mcontext.h             1.2
sys/arch/alpha/include/mcontext.h               1.9
sys/arch/amd64/include/mcontext.h               1.19
sys/arch/arm/include/mcontext.h                 1.19
sys/arch/hppa/include/mcontext.h                1.9
sys/arch/i386/include/mcontext.h                1.14
sys/arch/ia64/include/mcontext.h                1.6
sys/arch/m68k/include/mcontext.h                1.10
sys/arch/mips/include/mcontext.h                1.22
sys/arch/or1k/include/mcontext.h                1.2
sys/arch/powerpc/include/mcontext.h             1.18
sys/arch/riscv/include/mcontext.h               1.5
sys/arch/sh3/include/mcontext.h                 1.11
sys/arch/sparc/include/mcontext.h               1.14-1.17
sys/arch/sparc64/include/mcontext.h             1.10
sys/arch/vax/include/mcontext.h                 1.9
tests/lib/libc/sys/Makefile                     1.50
tests/lib/libc/sys/t_ucontext.c                 1.2-1.5
sys/arch/hppa/include/mcontext.h		1.10
sys/arch/ia64/include/mcontext.h		1.7

- Introduce _UC_MACHINE_FP().  _UC_MACHINE_FP() is a helper
  macro to extract from mcontext a frame pointer.
- Add new tests in lib/libc/sys/t_ucontext:
  * ucontext_sp (testing _UC_MACHINE_SP)
  * ucontext_fp (testing _UC_MACHINE_FP)
  * ucontext_pc (testing _UC_MACHINE_PC)
  * ucontext_intrv (testing _UC_MACHINE_INTRV)

Add a dummy implementation of _UC_MACHINE_INTRV() for ia64.

Implement _UC_MACHINE_INTRV() for hppa.

Make the t_ucontext.c test more portable.

We now have _UC_MACHINE_FP.

Revision 1.49.4.2: download - view: text, markup, annotated - select for diffs
Mon Feb 26 04:32:31 2018 UTC (6 years, 9 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.49.4.1: preferred, colored; branchpoint 1.49: preferred, colored
Changes since revision 1.49.4.1: +1 -2 lines
revert ticket 552, which broke the build

Revision 1.49.4.1: download - view: text, markup, annotated - select for diffs
Sun Feb 25 23:50:23 2018 UTC (6 years, 9 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -1 lines
Pull up following revision(s) (requested by kamil in ticket #552):
	sys/arch/aarch64/include/mcontext.h: 1.2
	sys/arch/alpha/include/mcontext.h: 1.9
	sys/arch/amd64/include/mcontext.h: 1.19
	sys/arch/arm/include/mcontext.h: 1.19
	sys/arch/hppa/include/mcontext.h: 1.9
	sys/arch/i386/include/mcontext.h: 1.14
	sys/arch/ia64/include/mcontext.h: 1.6
	sys/arch/m68k/include/mcontext.h: 1.10
	sys/arch/mips/include/mcontext.h: 1.22
	sys/arch/or1k/include/mcontext.h: 1.2
	sys/arch/powerpc/include/mcontext.h: 1.18
	sys/arch/riscv/include/mcontext.h: 1.5
	sys/arch/sh3/include/mcontext.h: 1.11
	sys/arch/sparc/include/mcontext.h: 1.14-1.17
	sys/arch/sparc64/include/mcontext.h: 1.10
	sys/arch/vax/include/mcontext.h: 1.9
	tests/lib/libc/sys/Makefile: 1.50
	tests/lib/libc/sys/t_ucontext.c: 1.2
Introduce _UC_MACHINE_FP() as a macro
_UC_MACHINE_FP() is a helper macro to extract from mcontext a frame pointer.
Don't rely on this interface as a compiler might strip frame pointer or
optimize it making this interface unreliable.
For hppa assume a small frame context, for larger frames FP might be located
in a different register (4 instead of 3).
For ia64 there is no strict frame pointer, and registers might rotate.
Reuse 79 following:
  ./gcc/config/ia64/ia64.h:#define HARD_FRAME_POINTER_REGNUM  LOC_REG (79)
Once ia64 will mature, this should be revisited.
A macro can encapsulate a real function for extracting Frame Pointer on
more complex CPUs / ABIs.
For the remaining CPUs, reuse standard register as defined in appropriate ABI.
The direct users of this macro are LLVM and GCC with Sanitizers.
Proposed on tech-userlevel@.
Sponsored by <The NetBSD Foundation>
--
Improve _UC_MACHINE_FP() for SPARC/SPARC64
Introduce a static inline function _uc_machine_fp() that contains improved
caluclation of a frame pointer.
Algorithm:
  uptr *stk_ptr;
#  if defined (__arch64__)
  stk_ptr = (uptr *) (*sp + 2047);
#  else
  stk_ptr = (uptr *) *sp;
#  endif
  *bp = stk_ptr[15];
Noted by <mrg>
--
Make _UC_MACHINE_FP() compile again and fix it so that it does not add
the offset twice.
--
fix _UC_MACHINE32_FP() -- use 32 bit pointer value so that [15] is
the right offset.  do this by using __greg32_t, which is only in
the sparc64 version, and these are only useful there, so move them.
--
Add new tests in lib/libc/sys/t_ucontext
New tests:
 - ucontext_sp
 - ucontext_fp
 - ucontext_pc
 - ucontext_intrv
They test respectively:
 - _UC_MACHINE_SP
 - _UC_MACHINE_FP
 - _UC_MACHINE_PC
 - _UC_MACHINE_INTRV
These tests attempt to access and print the values from ucontext, without
interpreting the values.
This is a follow up of the _UC_MACHINE_FP() introduction.
These tests use PRIxREGISTER, and require to be built with -D_KERNTYPES.
Sponsored by <The NetBSD Foundation>

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Feb 25 14:27:07 2018 UTC (6 years, 9 months ago) by kamil
Branches: MAIN
CVS tags: pgoyette-compat-base, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -1 lines
Add new tests in lib/libc/sys/t_ucontext

New tests:
 - ucontext_sp
 - ucontext_fp
 - ucontext_pc
 - ucontext_intrv

They test respectively:
 - _UC_MACHINE_SP
 - _UC_MACHINE_FP
 - _UC_MACHINE_PC
 - _UC_MACHINE_INTRV

These tests attempt to access and print the values from ucontext, without
interpreting the values.

This is a follow up of the _UC_MACHINE_FP() introduction.

These tests use PRIxREGISTER, and require to be built with -D_KERNTYPES.

Sponsored by <The NetBSD Foundation>

Revision 1.42.2.4: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:33 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.42.2.3: preferred, colored; branchpoint 1.42: preferred, colored; next MAIN 1.43: preferred, colored
Changes since revision 1.42.2.3: +15 -2 lines
Sync with HEAD

Revision 1.47.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:11 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.47: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47: +19 -6 lines
Sync with HEAD

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Apr 2 21:44:00 2017 UTC (7 years, 8 months ago) by kamil
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: netbsd-8
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +15 -2 lines
Import ptrace(2) tests into appropriate directory tests/lib/libc/sys/

This is the correct directory documented in tests/README for such tests.

Discussed with <martin>

Sponsored by <The NetBSD Foundation>

Revision 1.42.2.3: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:59 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.42.2.2: preferred, colored; branchpoint 1.42: preferred, colored
Changes since revision 1.42.2.2: +12 -1 lines
Sync with HEAD

Revision 1.48: download - view: text, markup, annotated - select for diffs
Wed Feb 1 10:18:27 2017 UTC (7 years, 10 months ago) by martin
Branches: MAIN
CVS tags: pgoyette-localcount-20170320
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +5 -5 lines
Restrict special mode/owner settings to truncate_test.root_owned;
otherwise the Atffile will be generated unreadable for group/others
as well.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sat Jan 14 03:59:58 2017 UTC (7 years, 10 months ago) by pgoyette
Branches: MAIN
CVS tags: bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -1 lines
Set FILESBUILD=yes to actually run the creation script for the file.

Should fix the build by creating a file which install can then find.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Fri Jan 13 20:03:51 2017 UTC (7 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +11 -1 lines
PR/51844: Ngie Cooper: use root-owned file created during build instead of
/usr/bin/fpr

Revision 1.42.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:55 2017 UTC (7 years, 11 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.42.2.1: preferred, colored; branchpoint 1.42: preferred, colored
Changes since revision 1.42.2.1: +4 -1 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.45: download - view: text, markup, annotated - select for diffs
Fri Nov 11 15:30:44 2016 UTC (8 years, 1 month ago) by njoly
Branches: MAIN
CVS tags: pgoyette-localcount-20170107
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -1 lines
New clock_nanosleep(2) testcase.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sun Nov 6 15:04:14 2016 UTC (8 years, 1 month ago) by kamil
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +3 -1 lines
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>.

Revision 1.42.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 6 00:19:12 2016 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -1 lines
Sync with HEAD

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Jul 30 11:03:54 2016 UTC (8 years, 4 months ago) by njoly
Branches: MAIN
CVS tags: pgoyette-localcount-20161104, pgoyette-localcount-20160806, localcount-20160914
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -1 lines
New getsockname(2) testcase for UNIX domain sockets.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Apr 6 00:45:53 2016 UTC (8 years, 8 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20160726
Branch point for: pgoyette-localcount
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -1 lines
Add wait6(2) tests.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sun Jan 24 15:11:08 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -2 lines
t_lwp_create needs kernel types.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sat Jan 23 21:22:49 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -1 lines
Define _KERNTYPES for things that need it.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Jun 22 00:05:23 2015 UTC (9 years, 5 months ago) by matt
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +2 -2 lines
Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun Apr 5 06:36:52 2015 UTC (9 years, 8 months ago) by martin
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +2 -1 lines
New test program for bind(2), with a single (currently eroneously failing)
test case from Tyler Retzlaff.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sat Jan 31 23:06:57 2015 UTC (9 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -1 lines
PR/49617: Kirk Russell: posix_fallocate() should be returning an error on
failure, without setting errno.

Revision 1.28.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:50 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.28.2.1: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.1: +2 -1 lines
Rebase to HEAD as of a few days ago.

Revision 1.34.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:57:21 2014 UTC (10 years, 4 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34: +3 -2 lines
Rebase.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Jul 18 12:34:52 2014 UTC (10 years, 4 months ago) by christos
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -1 lines
Add new minherit test.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue Jun 10 04:28:39 2014 UTC (10 years, 6 months ago) by he
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -2 lines
Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser.  Fixes build for sun2.

Revision 1.17.2.5: download - view: text, markup, annotated - select for diffs
Thu May 22 11:42:21 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.17.2.4: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.2.4: +2 -1 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.34: download - view: text, markup, annotated - select for diffs
Wed Jul 24 11:45:48 2013 UTC (11 years, 4 months ago) by skrll
Branches: MAIN
CVS tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +1 -5 lines
There wasn't a codegen bug - the test program itself was buggy.

Nothing to see hear... move along.

Revision 1.32.4.1: download - view: text, markup, annotated - select for diffs
Tue Jul 23 21:07:38 2013 UTC (11 years, 4 months ago) by riastradh
Branches: riastradh-drm2
Diff to: previous 1.32: preferred, colored; next MAIN 1.33: preferred, colored
Changes since revision 1.32: +5 -1 lines
sync with HEAD

Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue Jul 23 07:04:18 2013 UTC (11 years, 4 months ago) by skrll
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +5 -1 lines
Compile tests/lib/libc/sys/t_msgrcv with -O0 on hppa to avoid compiler
bug.

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:28:56 2013 UTC (11 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -1 lines
resync from head

Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri Mar 8 17:01:54 2013 UTC (11 years, 9 months ago) by martin
Branches: MAIN
CVS tags: riastradh-drm2-base, agc-symver-base, agc-symver
Branch point for: riastradh-drm2
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -2 lines
Rename testprogram and make it more general by adding other testcases.
One commented out, I didn't manage to get all signal handling correct
for now.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Mar 8 10:33:51 2013 UTC (11 years, 9 months ago) by martin
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -1 lines
Add a test program for PR kern/47625, based on the sample code provided
by anthony mallet.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Dec 4 06:57:44 2012 UTC (12 years ago) by jruoho
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +1 -2 lines
Move the bitmap(3) test to the "right" place. Note it in bitops(3). Xrefs.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Dec 1 16:27:27 2012 UTC (12 years ago) by christos
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -1 lines
Add a bitops test

Revision 1.17.2.4: download - view: text, markup, annotated - select for diffs
Tue Oct 30 19:00:01 2012 UTC (12 years, 1 month ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.17.2.3: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.3: +7 -2 lines
sync with head

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Sep 12 02:00:55 2012 UTC (12 years, 3 months ago) by manu
Branches: MAIN
CVS tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -1 lines
setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
  (powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
  setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
  (hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
  powerpc, sh3, sparc and sparc64 is left to portmasters
  sparc64

Approved by core@

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Aug 8 13:57:06 2012 UTC (12 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +5 -2 lines
Exclude tests that use rump

Revision 1.26: download - view: text, markup, annotated - select for diffs
Fri Jun 22 18:45:23 2012 UTC (12 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -1 lines
tests for recvmmsg

Revision 1.25: download - view: text, markup, annotated - select for diffs
Thu Jun 7 09:59:51 2012 UTC (12 years, 6 months ago) by martin
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +1 -2 lines
Revert previous - instead of guessing the amount of needed memory locked
limits (often way too high) and skipping the test case if in doubt,
raise the limits as far as we can, and fix a few places in the test where
we could run into the limits and either skip or fail with a reasonable
message.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Jun 5 08:44:21 2012 UTC (12 years, 6 months ago) by martin
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -1 lines
Try to estimate the number of locked pages the mincore() test will need and
check it against resource limits, skipping the tests if it probably is too
low.

Revision 1.17.2.3: download - view: text, markup, annotated - select for diffs
Wed May 23 10:08:21 2012 UTC (12 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.17.2.2: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.2: +3 -1 lines
sync with head.

Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Mon May 21 15:25:58 2012 UTC (12 years, 6 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Diff to: previous 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20: +2 -1 lines
Pull up following revision(s) (requested by martin in ticket #274):
	sys/arch/amd64/amd64/process_machdep.c: revision 1.20
	sys/kern/sys_lwp.c: revision 1.54
	sys/arch/sparc64/sparc64/machdep.c: revision 1.267
	sys/arch/mips/mips/cpu_subr.c: revision 1.16
	sys/arch/vax/vax/machdep.c: revision 1.188
	sys/sys/lwp.h: revision 1.161
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.98
	sys/arch/alpha/alpha/machdep.c: revision 1.339
	sys/compat/sys/ucontext.h: revision 1.6
	sys/arch/hppa/hppa/hppa_machdep.c: revision 1.28
	distrib/sets/lists/tests/mi: revision 1.469
	sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.42
	tests/lib/libc/sys/t_lwp_create.c: revision 1.1
	tests/lib/libc/sys/Makefile: revision 1.23
	sys/arch/arm/arm/sig_machdep.c: revision 1.42
	sys/arch/amd64/include/mcontext.h: revision 1.15
	sys/arch/amd64/amd64/machdep.c: revision 1.183
	sys/arch/sh3/sh3/sh3_machdep.c: revision 1.99
	sys/arch/i386/i386/machdep.c: revision 1.727
	sys/compat/netbsd32/netbsd32_lwp.c: revision 1.13
	sys/arch/sparc/sparc/machdep.c: revision 1.319
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.76
	sys/arch/m68k/m68k/sig_machdep.c: revision 1.49
	sys/sys/ucontext.h: revision 1.16
	sys/arch/mips/mips/netbsd32_machdep.c: revision 1.9
	lib/libc/sys/_lwp_create.2: revision 1.5
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.
To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.
Add an exhaustive atf test case, based partly on code from Joel Sing.
Should finally fix the remaining open part of PR kern/43903.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon May 21 14:15:19 2012 UTC (12 years, 6 months ago) by martin
Branches: MAIN
CVS tags: yamt-pagecache-base5
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -1 lines
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Apr 20 12:11:29 2012 UTC (12 years, 7 months ago) by jruoho
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -1 lines
Add few unit tests for mlock(2), including a case for PR kern/44788.

Revision 1.17.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:09:12 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.17.2.1: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.1: +3 -1 lines
sync with head

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Mar 17 17:23:34 2012 UTC (12 years, 8 months ago) by jruoho
Branches: MAIN
CVS tags: yamt-pagecache-base4
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -1 lines
Move the _lwp_ctl(2) preemption counter check to the right place.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Nov 17 01:14:12 2011 UTC (13 years ago) by christos
Branches: MAIN
CVS tags: netbsd-6-base
Branch point for: netbsd-6
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -1 lines
Add a test for PR/45618: Motoyuki OHMORI: kqueue EVFILT_TIMER with smaller
timeout value makes kernel busy or panic

Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:31:52 2011 UTC (13 years, 1 month ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +8 -1 lines
sync with head

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Nov 5 18:19:01 2011 UTC (13 years, 1 month ago) by jruoho
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +4 -1 lines
Move connect(2), listen(2) and socketpair(2) tests to the right place.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Nov 5 07:45:41 2011 UTC (13 years, 1 month ago) by jruoho
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +5 -1 lines
Add 21 unit tests for the XSI message queues.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Oct 31 15:41:31 2011 UTC (13 years, 1 month ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base
Branch point for: yamt-pagecache
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -1 lines
Move all pipe2 tests to a separate file.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Oct 15 07:00:48 2011 UTC (13 years, 1 month ago) by jruoho
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -1 lines
Move the sigaction(2) test to the right place.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Oct 15 06:54:52 2011 UTC (13 years, 1 month ago) by jruoho
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -1 lines
Move the ucontext(2) test to the right place.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Oct 15 06:50:52 2011 UTC (13 years, 1 month ago) by jruoho
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -1 lines
Move the writev(2) test to the right place.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Oct 15 06:42:16 2011 UTC (13 years, 1 month ago) by jruoho
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -1 lines
Move the clock_gettime(2) timer test to the right place.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Oct 15 06:26:34 2011 UTC (13 years, 1 month ago) by jruoho
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -1 lines
Move the mkdir(2) test to the right place.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Oct 15 06:17:02 2011 UTC (13 years, 1 month ago) by jruoho
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -1 lines
Move the pipe(2) test to the right place.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Oct 15 06:10:26 2011 UTC (13 years, 1 month ago) by jruoho
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -1 lines
Move the posix_fadvise(2) test to the right place.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Sep 17 18:53:31 2011 UTC (13 years, 2 months ago) by jruoho
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -2 lines
Remove ptrace(2) tests that are not yet ready but were accidentally
committed.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Sep 17 18:52:21 2011 UTC (13 years, 2 months ago) by jruoho
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
Simplify.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Jul 18 23:16:11 2011 UTC (13 years, 4 months ago) by jym
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -1 lines
Add a simple test case to check executable mapping rights for mprotect(2).

- provide an exec_prot_support() routine so $ARCH can indicate whether
it supports execution protection or not, and skip test accordingly.

- have a trivial 'return_one' shellcode to copy anywhere in a page, and
call it. The decision to keep the assembly solution is mine, reasons are
twofold:

   - all pure-C implementations cannot be controlled easily:
     bounds detection (beginning/end) of return_one is unpredictable,
     or requires the use of overkill solutions like libelf. Using
     dlsym(3) was a good proposal, however I can't use it to know the
     end address of the payload. It makes copying of the shellcode a bit
     more difficult: using a constant may be too small (code has not been
     entirely copied, and can lead to errors that can be erroneously
     detected as "test passed"), or too big (depending on where it is mapped
     in memory, copying past the end of the function may trigger SIGSEGV).

   - I have to ensure that the resulting assembly is the most compact
     possible, especially as it will be reused to test other parts of
     memory (stack, data, rodata, etc.).

Only i386 and amd64 are implemented so far. Others will come in due time.
FWIW, writing the exec_prot_support() callback and the return_one payload
should be enough. Writing callback requires good knowledge of the platform,
depending on chip revision, CPU, board, MMU... the protection level may vary.

Current files are put under lib/libc/arch/* and lib/libc/common/. Feel free to
move them around the tests/ tree. Keep in mind that the common/ and arch/ code
will be used outside of libc, so please do not hide them too deep in the tree.

I checked a few architectures via build.sh cross-compile, and will keep an
eye on buildbot for potential build breakage. Feel free to contact me in
case you see any, of course.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Jul 7 19:29:58 2011 UTC (13 years, 5 months ago) by jruoho
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
Fix previous.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Jul 7 07:06:21 2011 UTC (13 years, 5 months ago) by jruoho
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -3 lines
Remove 't_cerror' (this is tested by numerous individual tests).
Rename 't_context' to 't_getcontext' for consistency.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Jul 7 06:57:53 2011 UTC (13 years, 5 months ago) by jruoho
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +37 -1 lines
Add the syscall tests back. Couple of files and tests were also renamed for
consistency. All of these now mimic the libc structure.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Jan 13 03:09:54 2011 UTC (13 years, 11 months ago) by pgoyette
Branches: MAIN
CVS tags: cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -2 lines
Make sure we build all of thests, not just the last one (use += vs =)

Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Jan 13 02:40:44 2011 UTC (13 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -1 lines
Continuing the (re)organization of the lib/libc atf regression tests

Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon Jan 10 04:57:56 2011 UTC (13 years, 11 months ago) by christos
Branches: MAIN
test for sigqueue

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>