Commit Graph

30 Commits

Author SHA1 Message Date
Thomas Orozco 540eb7b637 Build musl-based binaries
Also fixed a bug with the signals test, which didn't properly exercise
Tini: rather than check that Tini was properly exiting with 128 +
signal, it raced against Tini and was only successful if Tini didn't get
the change to spawn a subprocess!
2017-06-10 16:47:50 +02:00
Thomas Orozco c88c1f4ea4 Update outer tests to support MINIMAL 2016-11-04 18:06:25 +01:00
Thomas Orozco b67a024460 Rename NO_ARGS to MINIMAL 2016-11-04 18:06:25 +01:00
Thomas Orozco b3a2ba638e NO_ARGS: White labelling
- Don't mention options that don't exist in Usage.
- Don't include a log prefix when NO_ARGS is set.
- Turn up the default verbosity to FATAL when NO_ARGS is set.
- Expose verbosity via an ENV var for debugging.
2016-11-04 13:22:41 +01:00
Thomas Orozco 2484f1a951 Reaping test: remove no sleep assumption
The reaping test assumes that all the `sleep` processes on the system
are created by us, which is an incorrect assumption, and creates
problems now that we run in a more "complete" system in CI (i.e. not in
a minimal container).

This solves the issue by not assuming that random sleep processes are
related to us: instead, we look at whether these processes are in our
process group.

This also includes a little clean up of the reaping stage 1.
2016-11-02 21:55:19 +01:00
Thomas Orozco 480fed14ae Optionally disable arg parsing (-DNO_ARGS=ON) 2016-11-02 18:05:12 +01:00
Thomas Orozco fa597944fa Log reaping test failures 2016-11-02 17:43:03 +01:00
Thomas Orozco 1a8dc6e21c Cleanup internal tests a little bit
No functional changes here.
2015-10-31 15:31:57 +01:00
Thomas Orozco a0bf435d2f Test that Tini restores signal configuration
Tini ignores certain signals, and blocks others, but in both cases
we restore them before executing the child process.

Add tests to ensure that we actually do that!
2015-10-31 15:31:57 +01:00
Thomas Orozco e3ae587f92 Add a tty test for signal handling 2015-10-31 15:31:57 +01:00
Thomas Orozco 40d313000c Add tests for passing tty to child process group 2015-10-31 15:31:57 +01:00
Thomas Orozco e7bae983c6 Add tests for process group support 2015-10-26 21:52:06 +01:00
Thomas Orozco 4b3075a11d Add tests for subreaper-less Tini
If we're going to make subreaper support an option, we should ensure
that running without subreaper support also works.
2015-09-06 15:29:11 +02:00
Thomas Orozco 98e4449b36 Add tests for subreaping (and subreaping failures) 2015-09-01 21:17:10 +02:00
Thomas Orozco 376d186b2e Set default verbosity level to 1
This means warnings always show warnings, which is the right thing to do
considering the 2 warnings we show are actually for important
information.
2015-09-01 21:17:10 +02:00
Thomas Orozco bcb8a4b870 Allow users to enable sub-reaping
This allows users that don't control PID 1 in their container to still
use Tini to reap zombies.
2015-09-01 21:17:10 +02:00
Thomas Orozco 1a863f8366 Run some functional tests in ci/run_build.sh
Using the child subreaper mechanism, we can actually run
tests inside the CI environment without depending on Docker.

While this does not replace the existing tests, it allows
at least some functional coverage within CI.
2015-07-05 14:25:21 +02:00
Thomas Orozco 3577da19cf Adjust tests to support tini-static
Valgrind does like statically-linked binaries due to false positives
coming from libc, which are ignord only if Valgrind can tell they're in
libc (which isn't the case when using static linking).
2015-06-26 21:43:53 +02:00
Tianon Gravi f2229f937e Bring back tini-static! 🎉
This allows the use of `tini` within even more minimal environments (such as images that are `FROM scratch` with a single application binary `COPY`'d in).
2015-06-26 21:43:53 +02:00
Thomas Orozco 12749881e0 Workaround to ensure compatibility with older CMake
Travis uses Ubuntu Precise, which has CMake 3.8. That version does not
have support for excluding /usr and /usr/bin from the %files% list
(which results in a package that conflicts with the filesystem package
and fails to install).

This commit:

+ Builds on Precise instead of Trusty
+ Adds install tests
2015-05-04 22:24:01 +02:00
Thomas Orozco 178f46aa01 Convert to out-of-tree builds 2015-03-15 18:46:13 +01:00
Thomas Orozco 699c3aadf2 Remove the static build for now
The static build doesn't build with clang, and its usefulness is dubious
for the time being considering the only requirement is glibc.
2015-03-15 16:56:12 +01:00
Thomas Orozco ffb171edf7 Add a static version as well 2015-03-01 11:46:29 -05:00
Thomas Orozco 5b7d66bfe3 Add a valgind test 2015-03-01 11:03:48 -05:00
Thomas Orozco 3af90f3ba8 Improve test code usability 2015-03-01 11:02:23 -05:00
Thomas Orozco acbb3e4391 Randomize tests a little 2015-03-01 11:01:49 -05:00
Thomas Orozco 04119b2869 Refactor build process 2015-02-28 19:04:46 -05:00
Thomas Orozco d67289b212 Don't exit from spawn (exit in main instead) 2015-02-28 18:40:58 -05:00
Thomas Orozco fa8200cc1c Refactor further around functions 2015-02-28 18:11:54 -05:00
Thomas Orozco fb689766ca Add basic test harness 2015-02-22 23:45:26 -08:00