From 7c218f9557487eb4575638a3f10e368215e1d1f4 Mon Sep 17 00:00:00 2001 From: jashook Date: Wed, 20 Jul 2016 15:04:38 -0700 Subject: [PATCH] More verbose logging for arm32 umount Umount fails occasionaly in the arm32 ci script. Add some logging information using lsof before calling umount to diagnose which files are open. --- tests/scripts/arm32_ci_script.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/scripts/arm32_ci_script.sh b/tests/scripts/arm32_ci_script.sh index 223da2e26c..e3881274f0 100755 --- a/tests/scripts/arm32_ci_script.sh +++ b/tests/scripts/arm32_ci_script.sh @@ -102,7 +102,15 @@ function check_git_head { function unmount_rootfs { local rootfsFolder="$1" - if grep -qs "$rootfsFolder" /proc/mounts; then + #Check if there are any open files in this directory. + if [ -d $rootfsFolder ]; then + #If we find information about the file + if sudo lsof +D $rootfsFolder; then + (set +x; echo 'See above for lsof information. Continuing with the build.') + fi + fi + + if mountpoint -q -- "$rootfsFolder"; then sudo umount "$rootfsFolder" fi } -- 2.34.1