Commit graph

64 commits

Author SHA1 Message Date
Chris Kuehl
ba46e1be81 Fix pre-commit 2021-10-07 13:17:36 -07:00
Rasmus Villemoes
f6b6492a55 add test for chdir("/") behaviour 2020-12-10 09:01:32 +01:00
Chris Kuehl
46774f6068 Only run tests under Python 3, fix random bitrot 2019-07-15 13:23:51 -07:00
Chris Kuehl
9374f3e664 Fix flake8 failures 2019-02-20 13:00:02 -08:00
Shengjing Zhu
0708f2779c Fix test on slow machines, increasing the sleep time
The original sleep time is too short, the tests failed on
architectures like mips*, armhf. I think it's because the
python interpreter can't start in 0.1s.

After increasing the sleep time, it passed on most architectures
which Debian supports.

The result can be found at:
https://buildd.debian.org/status/logs.php?pkg=dumb-init
(compare the build result of 1.2.2-1.1 and 1.2.2-1)

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2019-02-19 00:08:34 +08:00
Chris Kuehl
7d3aa2fc2b Fix SIGHUP/SIGCONT race condition 2018-08-01 16:20:16 -07:00
Anthony Sottile
341d998eaa Minor updates 2018-05-15 20:40:27 -07:00
Chris Kuehl
3321350d7e tty_test: execvpe => execvp 2016-10-11 12:24:10 -07:00
Chris Kuehl
5b269aa9f8 Fix path to dumb-init in tty_test 2016-10-11 12:16:02 -07:00
Chris Kuehl
fff4226b17 Hand controlling TTY to child, if we have one 2016-10-10 11:17:31 -07:00
Chris Kuehl
9398a4d0d0 Have Python kill itself instead of using /bin/kill
This is probably less fragile
2016-08-26 13:24:51 -07:00
Chris Kuehl
5b0c387023 Make sure to use /bin/bash for exit_status_test 2016-08-26 13:10:57 -07:00
Chris Kuehl
f854583872 Fixes for FreeBSD kernel 2016-08-01 10:32:31 -07:00
Chris Kuehl
4349c629f8 Fix more flaky tests 2016-08-01 09:16:28 -07:00
Chris Kuehl
9d862c8a2b Fix signal number assertions on non-amd64 2016-08-01 08:40:48 -07:00
Chris Kuehl
23dbc512c2 Fix two flakey tests 2016-07-25 09:54:39 -07:00
Chris Kuehl
8269e190f1 Be more generous with sleeps, add more test output on fail 2016-07-19 14:40:26 -07:00
Chris Kuehl
169727ba43 Clean up tests a bit 2016-06-17 12:47:34 -07:00
Chris Kuehl
4ce5ec42d2 Loosen assertion a bit for musl 2016-06-17 11:06:24 -07:00
Chris Kuehl
b678dbf4b3 Fix segfault on invalid arguments 2016-06-17 10:20:05 -07:00
Chris Kuehl
1a7c635071 Add ability to ignore signals 2016-06-14 11:34:52 -07:00
Chris Kuehl
554760fda6 Use signal rewriting for TTY signal special cases 2016-06-14 11:08:33 -07:00
Chris Kuehl
9e456addb7 Add signal translation tests 2016-06-13 14:33:51 -07:00
Mike McClurg
6f6b51f869 Rewrite arbitrary signals, and update tests
We've decided to allow arbitrary signal rewriting, not just SIGTERM
rewriting. To use, call dumb-init with the '-r s:r' option, which will
rewrite signum s to signum r. Only signals 1-31 are allowed to be
rewritten, which should cover all the signals we need to cover.

Note that this commit does not add new tests, it only fixes the existing
broken test.
2016-06-09 16:05:27 -06:00
Chris Kuehl
b7aee39721 Fix incorrect error on bad exec when passing args 2016-05-28 02:03:19 -04:00
Chris Kuehl
256edaef74 Simplify dumb-init behavior using sigwait 2016-04-29 17:13:52 -07:00
Chris Kuehl
223da04e22 Fix flaky job control tests 2016-04-29 15:15:02 -07:00
Chris Kuehl
b579371582 Fix bit rot due to newer flake8 2016-03-11 13:42:56 -08:00
Chris Kuehl
d626878a0c Fix exit status when process exits via signal
This fixes https://github.com/Yelp/dumb-init/issues/59
2016-03-11 13:42:00 -08:00
Buck Evan
87545be699 Merge pull request #50 from chriskuehl/pipefail-zombies
Fix stretch itest missing "ps" command, use pipefail to catch it earlier in the future
2016-01-07 14:58:02 -08:00
Chris Kuehl
4b37e64a1a Set pipefail for test-zombies to not mask errors 2016-01-07 14:56:53 -08:00
Chris Kuehl
01f6064164 Fix typo in help message 2015-10-26 10:20:18 -07:00
Chris Kuehl
cd8f4bccf1 cli_test: update help message 2015-10-03 00:36:35 -07:00
Chris Kuehl
958c6420a5 Add command-line option sanity check tests 2015-10-02 17:54:06 -07:00
Chris Kuehl
6b7f0ce3fa Add standard command-line flags 2015-10-02 15:53:07 -07:00
Chris Kuehl
316f6b0d93 Prefix output with [dumb-init] 2015-10-02 10:51:09 -07:00
Chris Kuehl
2aa56d6aab Merge pull request #25 from chriskuehl/background-support
Properly respond to job control signals
2015-09-29 13:44:28 -07:00
Chris Kuehl
dd361496d1 tests/child_processes_test: fix py34 2015-09-29 10:54:20 -07:00
Chris Kuehl
d178fbaf52 Print better error message when exec fails 2015-09-29 10:49:08 -07:00
Chris Kuehl
a78ac8fe23 Exit nonzero if exec fails 2015-09-29 10:43:45 -07:00
Chris Kuehl
b42f376351 Add tests for background process support 2015-09-25 18:19:24 -07:00
Chris Kuehl
4b9d6927de Use mock.patch.dict to patch environment 2015-09-22 15:19:44 -07:00
Kent Wills
7825fda346 Merge pull request #24 from chriskuehl/ci-run-tox
Run tox in CI
2015-09-22 13:43:35 -07:00
Chris Kuehl
8b66e27897 Ensure tests don't pollute each others' environment
As much as possible, anyway...
2015-09-22 01:20:48 -07:00
Chris Kuehl
2ae2aceb28 Run tox in CI to better catch regressions 2015-09-18 11:06:08 -07:00
Chris Kuehl
d59a190a5d Send TERM to all children when the main child exists in setsid mode 2015-09-16 20:00:15 -07:00
Chris Kuehl
e6fd9233cb Python test fixes for lucid 2015-09-11 17:24:18 -07:00
Chris Kuehl
e3d9f84d6f Rewrite tests in Python using pytest 2015-09-11 16:50:05 -07:00
Kent Wills
7a648c54d1 python test-tty hotfix 2015-09-10 18:05:11 -07:00
Chris Kuehl
5b47ea8f34 Add basic test for zombies 2015-09-10 17:28:39 -07:00