openafs/tests/opr
Andrew Deason 8cdd8ad840 tests: Skip SIGBUS test on FreeBSD
Currently, 'softsig-helper -buserror' causes a SIGBUS on most
platforms, but can result in SIGSEGV on FreeBSD by default (at least
on 11.3-RELEASE). Skip the test on FreeBSD, until we can provide a
more reliable way to generate SIGBUS.

Note that when the sysctl machdep.prot_fault_translation is set to 1,
'softsig-helper -buserror' generates a SIGBUS instead of SIGSEGV,
suggesting that generating a SIGBUS here is the old 'compat' behavior.
When machdep.prot_fault_translation is 0 (the default), the code path
in the FreeBSD kernel that dictates whether to send a SIGBUS or
SIGSEGV in this situation depends on some autodetection heuristics,
and so may produce different results depending on FreeBSD releases or
even compiler settings (due to detection of ABI based on some ELF
notes in the relevant binary).

For some details on this sysctl, see
<https://www.freebsd.org/news/status/report-2019-07-2019-09.html#Signals-delivered-on-unhandled-Page-Faults>
or the FreeBSD source code. In 11.3-RELEASE, the decision to issue a
SIGBUS or SIGSEGV can be found around sys/amd64/amd64/trap.c:355.

Reviewed-on: https://gerrit.openafs.org/14145
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit df5480057c)

Change-Id: Ifd2c17c52a7a9be7a8a09776cf15500fdc9ca62d
Reviewed-on: https://gerrit.openafs.org/14536
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2021-03-19 16:49:38 -04:00
..
.gitignore opr: Add new softsig implementation 2015-05-26 14:06:18 -04:00
dict-t.c opr: Add dictionary implementation 2012-11-01 12:18:01 -07:00
fmt-t.c tests: Fix fmt-t.c warning 2014-11-05 08:39:25 -05:00
jhash-t.c opr: Make opr_jhash_opaque consistent with opr_jhash 2016-12-22 15:59:31 -05:00
Makefile.in opr: Add new softsig implementation 2015-05-26 14:06:18 -04:00
queues-t.c opr: Don't confuse isLast and isEnd 2012-11-23 06:18:31 -08:00
rbtree-t.c tests: Start using the upstream C TAP harness 2012-05-11 16:36:44 -07:00
softsig-helper.c tests: fix signo to signame lookup in opr/softsig tests 2016-12-16 15:20:39 -05:00
softsig-t tests: Skip SIGBUS test on FreeBSD 2021-03-19 16:49:38 -04:00
time-t.c tests/opr/time-t.c: Use labs instead of abs for long argument 2015-08-01 23:05:26 -04:00
uuid-t.c Make opr_uuid_toString return a status 2013-06-21 11:17:48 -07:00