Skip to content

Commit

Permalink
debug.bats: deliberately fail the test
Browse files Browse the repository at this point in the history
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Jul 14, 2020
1 parent 526a862 commit 2cf1faa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions signals.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach
return e.status, nil
}
}
case unix.SIGURG:
// ignore as it's used by golang runtime
default:
logrus.Debugf("sending signal to process %s", s)
if err := unix.Kill(pid1, s.(unix.Signal)); err != nil {
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/debug.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ load helpers
function setup() {
teardown_hello
setup_hello
export GODEBUG=asyncpreemptoff=1
}

function teardown() {
Expand Down Expand Up @@ -33,10 +34,12 @@ function teardown() {

# check expected debug output was sent to log.out
run cat log.out
echo "$output" >&2
[ "$status" -eq 0 ]
[[ "${output}" == *"level=debug"* ]]
[[ "${output}" == *"nsexec container setup"* ]]
[[ "${output}" == *"child process in init()"* ]]
#false
}

@test "global --debug to --log --log-format 'text'" {
Expand All @@ -54,6 +57,7 @@ function teardown() {
[[ "${output}" == *"level=debug"* ]]
[[ "${output}" == *"nsexec container setup"* ]]
[[ "${output}" == *"child process in init()"* ]]
#false
}

@test "global --debug to --log --log-format 'json'" {
Expand Down

0 comments on commit 2cf1faa

Please sign in to comment.