mirror of
https://github.com/ceph/ceph
synced 2025-01-21 02:31:19 +00:00
qa/standalone: deduplicate cleanup code
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
This commit is contained in:
parent
5ba6286834
commit
f501458967
@ -44,10 +44,14 @@ else
|
||||
COREPATTERN="core.%e.%p.%t"
|
||||
fi
|
||||
|
||||
function finish() {
|
||||
function cleanup() {
|
||||
if [ -n "$precore" ]; then
|
||||
sudo sysctl -w ${KERNCORE}=${precore}
|
||||
fi
|
||||
}
|
||||
|
||||
function finish() {
|
||||
cleanup
|
||||
exit 0
|
||||
}
|
||||
|
||||
@ -135,9 +139,7 @@ do
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ -n "$precore" ]; then
|
||||
sudo sysctl -w ${KERNCORE}="${precore}"
|
||||
fi
|
||||
cleanup
|
||||
|
||||
if [ "$errors" != "0" ]; then
|
||||
echo "$errors TESTS FAILED, $count TOTAL TESTS"
|
||||
|
Loading…
Reference in New Issue
Block a user