]> git.ipfire.org Git - thirdparty/krb5.git/commit
Work around macOS SIP in the test suite 1020/head
authorGreg Hudson <ghudson@mit.edu>
Thu, 19 Dec 2019 18:52:32 +0000 (13:52 -0500)
committerGreg Hudson <ghudson@mit.edu>
Tue, 7 Jan 2020 20:41:50 +0000 (15:41 -0500)
commitc423f13cc2f3fbdbf48390535cb1629b99b0eb27
tree10020d4bf9c09dcd284096adf050572884b7517d
parente76d1ee90f2b15639cc1d9c420d3b82080895214
Work around macOS SIP in the test suite

In macOS 10.11 and later with System Integrity Protection enabled,
system programs (including the shell) purge DYLD_LIBRARY_PATH from the
environment at startup.  As a result, any part of "make check" which
runs via a shell script must explicitly restore the runtime
environment.  Add a common rule for runenv.sh, and create and source
it where shell scripts are run.  Dejagnu's runtest is a shell script,
so create a tcl file for the kadmin and RPC unit tests and source it
from unix.exp.  Avoid using the shell to run commands in several
places.  Use return_trace=True for tests that previously indirected
through /usr/bin/env.

Do not include <malloc.h> in t_parse_host_string.c, as it does not
exist on macOS and is not needed.

Skip the iprop tests on macOS when SIP is enabled, as signal
restrictions appear to prevent the kpropd child process from informing
the parent process that a full resync has completed.

In net-server.c, set SO_REUSEPORT as well as SO_REUSEADDR on listener
sockets.  Otherwise the krb5kdc processes run by the test suite
sometimes fail to start with "address in use" errors.

In configure.ac, only generate po/Makefile if we will descend into it.
24 files changed:
src/config/post.in
src/configure.ac
src/kadmin/testing/scripts/Makefile.in
src/kadmin/testing/scripts/init_db
src/kadmin/testing/scripts/start_servers_local
src/kdc/Makefile.in
src/kdc/rtscript
src/lib/apputils/net-server.c
src/lib/kadm5/unit-test/Makefile.in
src/lib/kadm5/unit-test/config/unix.exp
src/lib/kadm5/unit-test/lib/lib.t
src/lib/krb5/krb/Makefile.in
src/lib/krb5/krb/t_parse_host_string.c
src/lib/krb5/krb/transit-tests
src/lib/krb5/krb/walktree-tests
src/lib/rpc/unit-test/Makefile.in
src/lib/rpc/unit-test/config/unix.exp
src/plugins/kdb/db2/libdb2/test/Makefile.in
src/plugins/kdb/db2/libdb2/test/run.test
src/tests/dejagnu/config/default.exp
src/tests/t_changepw.py
src/tests/t_iprop.py
src/tests/t_keydata.py
src/tests/t_referral.py