From 81f495ad0085ae474c49646a7778476e0a34abae Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Fri, 11 Aug 2017 16:28:14 +0200 Subject: [PATCH] Increase timeout for removal Under certain environments, this timeout was causing failures because it was too short. Increasing to 10, to give time to perform the specified tasks. Change-Id: I01dd3553f38e1137b2fcb04b4ee12202be3ad1a8 --- diskimage_builder/lib/common-functions | 2 +- diskimage_builder/lib/img-functions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/diskimage_builder/lib/common-functions b/diskimage_builder/lib/common-functions index 77cdd185..31a21046 100644 --- a/diskimage_builder/lib/common-functions +++ b/diskimage_builder/lib/common-functions @@ -193,7 +193,7 @@ function kill_chroot_processes () { } function cleanup_build_dir () { - if ! timeout 5 sh -c " while ! sudo rm -rf $TMP_BUILD_DIR/built; do sleep 1; done"; then + if ! timeout 10 sh -c " while ! sudo rm -rf $TMP_BUILD_DIR/built; do sleep 1; done"; then echo "ERROR: unable to cleanly remove $TMP_BUILD_DIR/built" exit 1 fi diff --git a/diskimage_builder/lib/img-functions b/diskimage_builder/lib/img-functions index d22c0d41..e08d4a4d 100644 --- a/diskimage_builder/lib/img-functions +++ b/diskimage_builder/lib/img-functions @@ -95,7 +95,7 @@ function run_d_in_target () { trap - ERR check_break after-$1 run_in_target bash sudo umount -f $TMP_MOUNT_PATH/tmp/in_target.d - if ! timeout 5 sh -c " while ! sudo rmdir $TMP_MOUNT_PATH/tmp/in_target.d; do sleep 1; done"; then + if ! timeout 10 sh -c " while ! sudo rmdir $TMP_MOUNT_PATH/tmp/in_target.d; do sleep 1; done"; then echo "ERROR: unable to cleanly remove $TMP_MOUNT_PATH/tmp/in_target.d" exit 1 fi