ARM-CI : Check a device is already mounted while mounting a device. (dotnet/coreclr#6377)
Now ARM-CI makes building failure frequently with below messages.(dotnet/coreclr#6329)
http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/arm_emulator_cross_debug_ubuntu_prtest/559/console
00:01:27.252 + sudo umount /opt/linux-arm-emulator-root/dev
00:01:27.260 umount: /opt/linux-arm-emulator-root/dev: device is busy.
00:01:27.260 (In some cases useful info about processes that use
00:01:27.260 the device is found by lsof(8) or fuser(1))
00:01:27.265 Build step 'Execute shell' marked build as failure
I think ARM CI jobs have tried to unmount the same rootfs by an 'arm32_ci_script.sh' at the same time. (At this time, other jobs still are on running...)
So I suggest though the script is exited by any cases, the script would not run un-mounting.
But whenever CI is running and mounting a device, It will check the device is already mounted.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3f5a70b404386c538053cb0fe1746338ac4d342