Merge pull request #6106 from dmcgowan/test-cri-teardown-check-pid
Check the pid in cri test teardown
This commit is contained in:
commit
3f033aeff3
@ -46,8 +46,6 @@ ${sudo} bin/cri-integration.test --test.run="${FOCUS}" --test.v \
|
||||
--containerd-bin="${CONTAINERD_BIN}" \
|
||||
--image-list="${TEST_IMAGE_LIST:-}" && test_exit_code=$? || test_exit_code=$?
|
||||
|
||||
test_teardown
|
||||
|
||||
test $test_exit_code -ne 0 && \
|
||||
cat "$REPORT_DIR/containerd.log"
|
||||
|
||||
|
@ -131,7 +131,12 @@ test_teardown() {
|
||||
nssm stop containerd-test
|
||||
nssm remove containerd-test confirm
|
||||
else
|
||||
${sudo} pkill -g $(ps -o pgid= -p "${pid}")
|
||||
pgid=$(ps -o pgid= -p "${pid}" || true)
|
||||
if [ ! -z "${pgid}" ]; then
|
||||
${sudo} pkill -g ${pgid}
|
||||
else
|
||||
echo "pid(${pid}) not found, skipping pkill"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user