Skip to contentSkip to conversation

Fstests: btrfs/011 fix device mounted when tests aborts

PATCH In review Liu Bo 2 participants 2 messages Jan 16, 2018 – Jan 18, 2018

lore
Share & tools
lore

Liu Bo

author
#0 lore raw

PATCH 1/1 Fstests: btrfs/011 fix device mounted when tests aborts

One of btrfs tests, btrfs/011, uses SCRATCH_DEV_POOL and puts a non-SCRATCH_DEV device as the first one when doing mkfs, and this makes _require_scratch{_nocheck} confused since it checks mount point with SCRATCH_DEV only.

This adds _scratch_umount to cleanup() to umount SCRATCH_MNT by 011 itself.

---
 tests/btrfs/011 | 1 +
 1 file changed, 1 insertion(+)
tests/btrfs/011 +1 -0
index 28f1388..f4c5309 100755
@@ -51,6 +51,7 @@ _cleanup()
 	fi
 	wait
 	rm -f $tmp.tmp
+	_scratch_unmount > /dev/null 2>&1
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
Signature · 1 line
2.5.0
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Liu Bo

One of btrfs tests, btrfs/011, uses SCRATCH_DEV_POOL and puts a non-SCRATCH_DEV device as the first one when doing mkfs, and this makes _require_scratch{_nocheck} confused since it checks mount point with SCRATCH_DEV only.

This adds _scratch_umount to cleanup() to umount SCRATCH_MNT by 011 itself.

Thanks, Anand

Quoted 17 lines
---
  tests/btrfs/011 | 1 +
  1 file changed, 1 insertion(+)
tests/btrfs/011 +1 -0
index 28f1388..f4c5309 100755
@@ -51,6 +51,7 @@ _cleanup()
  	fi
  	wait
  	rm -f $tmp.tmp
+	_scratch_unmount > /dev/null 2>&1
  }
  trap "_cleanup; exit \$status" 0 1 2 3 15