sandboxed-api/sandboxed_api/sandbox2/testcases
Christian Blichmann befdb09597 Link more complex test cases dynamically
Linking glibc in fully static mode is mostly unsupported. While such binaries
can easily be produced, conflicting symbols will often make them crash at
runtime. This happens because glibc will always (try to) load some dynamically
linked libraries, even when statically linked. This includes things like the
resolver, unicode/locale handling and others.

Internally at Google, this is not a concern due to the way glibc is being built
there. But in order to make all of our tests run in the open-source version of
this code, we need to change strategy a bit.

As a rule of thumb, glibc can safely be linked statically if a program is
resonably simple and does not use any networking of locale dependent
facilities. Calling syscalls directly instead of the corresponding libc
wrappers works as well, of course.

This change adjusts linker flags and sandbox policies to be more compatible
with regular Linux distributions.

Tested:
- `ctest -R '[A-Z].*'` (all SAPI/Sandbox2 tests)
PiperOrigin-RevId: 429025901
Change-Id: I46b677d9eb61080a8fe868002a34a77de287bf2d
2022-02-16 05:59:13 -08:00
..
abort.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
add_policy_on_syscalls.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
buffer.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
BUILD.bazel Link more complex test cases dynamically 2022-02-16 05:59:13 -08:00
close_fds.cc Add CloseAllFDsExcept test. 2021-12-07 02:23:23 -08:00
CMakeLists.txt Link more complex test cases dynamically 2022-02-16 05:59:13 -08:00
hostname.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
ipc.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
limits.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
malloc.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
minimal.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
namespace.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
personality.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
pidcomms.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
policy.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
print_fds.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
sanitizer.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
sleep.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
starve.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
symbolize.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
tsync.cc Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00