Support macOS build with SIP by using posix_spawn in tests/random
Needs ReviewPublic

Authored by gniibe on Dec 2 2020, 2:17 AM.
This revision needs review, but there are no reviewers specified.



tests/random spawns itself to test running the program with various options.

The test/random is built by libtool (with -no-install option) and it uses DYLD_LIBRARY_PATH to allow running a program without installing libgcrypt library.

Unfortunately, with SIP (System Integrity Protection) interferes this running tests/random.
tests/random uses system(3) to spawn processes; But because it uses /bin/sh, the environment variable DYLD_LIBRARY_PATH is purged.

Test Plan

make check under macOS.

Diff Detail

rC libgcrypt
Lint Skipped
Unit Tests Skipped
gniibe created this revision.Dec 2 2020, 2:17 AM
werner added a subscriber: werner.Dec 2 2020, 9:04 AM

Given that this is limited to macOS I have neither objections for 1.8 nor for master