Page MenuHome GnuPG

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

Authored by gniibe on Dec 2 2020, 2:17 AM.

Details

Summary

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

Repository
rC libgcrypt
Lint
Lint Skipped
Unit
Unit Tests Skipped