]> arthur.barton.de Git - bup.git/commit
test-index-check-device: unmount "lazily" to avoid potential crash
authorRob Browning <rlb@defaultvalue.org>
Fri, 17 Sep 2021 17:56:38 +0000 (12:56 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 17 Sep 2021 18:05:59 +0000 (13:05 -0500)
commitaa604c9ade233fc40e221fb0ad8ee2ab70133447
treeb09f63f1c5ce3d3ea56b620d2a51dc1c12b8b160
parentd9842e91527e6de427e92cd9a40a7b8fc58d7815
test-index-check-device: unmount "lazily" to avoid potential crash

Apparently the umount was failing on some systems, and since we're
already using loop, mke2fs, etc. which aren't really portable, and we
use "umount -l" in cleanup-mounts-under, just use it here too for now.

Thanks to Abdel Said for reporting the problem:

  ! t/test-index-check-device.sh:38 mke2fs -F -j -m 0 testfs.img ok
  ! t/test-index-check-device.sh:39 mount -o loop testfs.img /opt/bup/t/mnt/test-index-check-device.sh-YuNQZtU ok
  ! t/test-index-check-device.sh:41 chown root:root /opt/bup/t/mnt/test-index-check-device.sh-YuNQZtU ok
  ! t/test-index-check-device.sh:42 chmod 0700 /opt/bup/t/mnt/test-index-check-device.sh-YuNQZtU ok
  ! t/test-index-check-device.sh:45 date ok
  umount: /opt/bup/t/mnt/test-index-check-device.sh-YuNQZtU: device is busy.
  (In some cases useful info about processes that use
  the device is found by lsof(8) or fuser(1))
  ! t/test-index-check-device.sh:46 umount /opt/bup/t/mnt/test-index-check-device.sh-YuNQZtU FAILED

Additional discussion: https://groups.google.com/d/msg/bup-list/GhVonW0XGVE/8kIkJEOwCQAJ

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
test/ext/test-index-check-device