mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
tests/int: remove bogus $status checks
Commands that are not run via "run" helper (cat, mkdir, __runc) do not set $status, so it makes no sense to check it. Fixes:94505a04,ed548376Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -48,12 +48,10 @@ function teardown() {
|
||||
# Use sub-cgroup to ensure that exec process has been killed
|
||||
test_pidfd_cgroup_path=$(get_cgroup_path "pids")
|
||||
mkdir "${test_pidfd_cgroup_path}/exec_pidfd"
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
setup_pidfd_kill "SIGKILL"
|
||||
|
||||
__runc exec -d --cgroup "pids:exec_pidfd" --pid-file "exec_pid.txt" --pidfd-socket "${PIDFD_SOCKET}" test_pidfd sleep 1d
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
exec_pid=$(cat exec_pid.txt)
|
||||
exec_pid_in_cgroup=$(cat "${test_pidfd_cgroup_path}/exec_pidfd/cgroup.procs")
|
||||
@@ -79,12 +77,10 @@ function teardown() {
|
||||
# Use sub-cgroup to ensure that exec process has been killed
|
||||
test_pidfd_cgroup_path=$(get_cgroup_path "pids")
|
||||
mkdir "${test_pidfd_cgroup_path}/exec_pidfd"
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
setup_pidfd_kill "SIGKILL"
|
||||
|
||||
__runc exec -d --cgroup "exec_pidfd" --pid-file "exec_pid.txt" --pidfd-socket "${PIDFD_SOCKET}" test_pidfd sleep 1d
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
exec_pid=$(cat exec_pid.txt)
|
||||
exec_pid_in_cgroup=$(cat "${test_pidfd_cgroup_path}/exec_pidfd/cgroup.procs")
|
||||
|
||||
@@ -320,7 +320,6 @@ EOF
|
||||
}
|
||||
}
|
||||
EOF
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
runc update -r "$BATS_RUN_TMPDIR"/runc-cgroups-integration-test.json test_update
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
Reference in New Issue
Block a user