mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
scripts: fix warning in test util
CI reports:
In scripts/test-util.sh line 216:
cleanup() {
^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly).
The shellcheck can't trace calling in trap, so we need add hint
to make it happy.
Signed-off-by: Yi Wang <foxywang@tencent.com>
This commit is contained in:
@@ -212,7 +212,7 @@ mount_and_exec() {
|
|||||||
local COMMAND_STATUS=0
|
local COMMAND_STATUS=0
|
||||||
|
|
||||||
# Cleanup function to unmount and detach loop device
|
# Cleanup function to unmount and detach loop device
|
||||||
# shellcheck disable=SC2317
|
# shellcheck disable=SC2317,SC2329
|
||||||
cleanup() {
|
cleanup() {
|
||||||
if [ -n "$MOUNT_DIR" ]; then
|
if [ -n "$MOUNT_DIR" ]; then
|
||||||
echo "Cleanup: Unmounting $MOUNT_DIR..." >&2
|
echo "Cleanup: Unmounting $MOUNT_DIR..." >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user