opnsense-src/bin/sh/tests/execution
Jilles Tjoelker c1602cfd61 sh/tests: Fix flaky execution/bg12.0
When job control is not enabled, the shell ignores SIGINT while waiting for
a foreground process unless that process exits on SIGINT. In this case, the
foreground process is sleep and it does not exit on SIGINT because the
signal is only sent to the shell. Depending on order of events, this could
cause the SIGINT to be unexpectedly ignored.

On lightly loaded bare metal, the chance of this happening tends to be less
than 0.01% but with higher loads and/or virtualization it becomes more
likely.

Starting the sleep in background and using the wait builtin ensures SIGINT
will not be ignored.

PR:		247559
Reported by:	lwhsu
MFC after:	1 week
2020-06-28 21:15:29 +00:00
..
bg1.0
bg2.0
bg3.0
bg4.0
bg5.0
bg6.0
bg6.0.stdout
bg7.0
bg8.0
bg9.0
bg10.0
bg10.0.stdout
bg11.0 sh/tests: Add tests for SIGINT in non-jobc background commands 2020-06-14 19:41:24 +00:00
bg12.0 sh/tests: Fix flaky execution/bg12.0 2020-06-28 21:15:29 +00:00
env1.0 sh: Add test for exported but unset variables 2019-01-03 20:23:12 +00:00
fork1.0
fork2.0
fork3.0
func1.0
func2.0
func3.0
hash1.0
int-cmd1.0
killed1.0
killed2.0
Makefile sh/tests: Add tests for SIGINT in non-jobc background commands 2020-06-14 19:41:24 +00:00
Makefile.depend DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
not1.0
not2.0
path1.0
pipefail1.0 sh: Add set -o pipefail 2019-02-24 21:05:13 +00:00
pipefail2.42 sh: Add set -o pipefail 2019-02-24 21:05:13 +00:00
pipefail3.42 sh: Add set -o pipefail 2019-02-24 21:05:13 +00:00
pipefail4.42 sh: Add set -o pipefail 2019-02-24 21:05:13 +00:00
pipefail5.42 sh: Add set -o pipefail 2019-02-24 21:05:13 +00:00
pipefail6.42 sh: Add set -o pipefail 2019-02-24 21:05:13 +00:00
pipefail7.0 sh: Add set -o pipefail 2019-02-24 21:05:13 +00:00
redir1.0
redir2.0
redir3.0
redir4.0
redir5.0
redir6.0
redir7.0
set-C1.0 sh: Add simple test for 'set -C' (noclobber). 2016-11-02 22:33:37 +00:00
set-n1.0
set-n2.0
set-n3.0
set-n4.0
set-x1.0
set-x2.0
set-x3.0
set-x4.0 sh: Make sure output suitable as shell input is also printable. 2014-12-14 16:26:19 +00:00
shellproc1.0
shellproc2.0 sh: Test that executing various binary files is rejected 2019-12-30 21:32:55 +00:00
shellproc3.0 sh: Test that executing various binary files is rejected 2019-12-30 21:32:55 +00:00
shellproc4.0 sh: Test that executing various binary files is rejected 2019-12-30 21:32:55 +00:00
shellproc5.0 sh: Test that executing various binary files is rejected 2019-12-30 21:32:55 +00:00
shellproc6.0 sh: Allow more scripts without #! 2020-05-30 16:00:49 +00:00
subshell1.0
subshell1.0.stdout
subshell2.0
subshell3.0
subshell4.0
unknown1.0
unknown2.0 sh: Fix double INTON with vfork 2020-05-16 16:29:23 +00:00
var-assign1.0