Skip to content

Commit

Permalink
Re-introduce PID 1 test
Browse files Browse the repository at this point in the history
Re-introduce the check for ps not running as PID 1.
  • Loading branch information
grisu48 committed Mar 11, 2024
1 parent 21b4a94 commit d461e24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/containers/container_engine.pm
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ sub basic_container_tests {
## Test `--init` option, i.e. the container process won't be PID 1 (to avoid zombie processes)
# Ensure PID 1 has either the $runtime-init (e.g. podman-init) OR /init (e.g. `/dev/init) suffix
validate_script_output("$runtime run --rm --init $image ps --no-headers -xo 'pid args'", sub { $_ =~ m/\s*1 .*(${runtime}-|\/)init .*/ });
# Ensure the `ps` command is not running as PID 1. either
validate_script_output("$runtime run --rm --init $image ps --no-headers -xo 'pid args'", sub { $_ =~ m/[02-9][0-9]* .*ps.*/ });

## Test prune
assert_script_run("$runtime container commit basic_test_container example.com/prune-test");
Expand Down

0 comments on commit d461e24

Please sign in to comment.