From: Lubomir Rintel Date: Wed, 26 Jun 2019 14:42:04 +0000 (+0200) Subject: test/TEST-17-LVM-THIN: fail setup if we run out of space in the thin pool X-Git-Tag: 050~209 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91c15babdf0215df59325f3086acfdf0ba247bfa;p=thirdparty%2Fdracut.git test/TEST-17-LVM-THIN: fail setup if we run out of space in the thin pool This condition is rather difficult to detect -- the writes will just remain queued and get lost on shutdown, resulting in a corrupt filesystem. --- diff --git a/test/TEST-17-LVM-THIN/create-root.sh b/test/TEST-17-LVM-THIN/create-root.sh index 117d13415..0e52f879f 100755 --- a/test/TEST-17-LVM-THIN/create-root.sh +++ b/test/TEST-17-LVM-THIN/create-root.sh @@ -27,6 +27,7 @@ cp -a -t /sysroot /source/* && \ umount /sysroot && \ sleep 1 && \ lvm lvchange -a n /dev/dracut/root && \ -sleep 1 && \ -echo "dracut-root-block-created" >/dev/sda1 +sleep 1 +dmsetup status |grep out_of_data_space || \ + echo "dracut-root-block-created" >/dev/sda1 poweroff -f diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh index af3492466..1b36a216d 100755 --- a/test/TEST-17-LVM-THIN/test.sh +++ b/test/TEST-17-LVM-THIN/test.sh @@ -56,7 +56,7 @@ test_setup() { ( export initdir=$TESTDIR/overlay . $basedir/dracut-init.sh - inst_multiple sfdisk mke2fs poweroff cp umount + inst_multiple sfdisk mke2fs poweroff cp umount grep dmsetup inst_hook initqueue 01 ./create-root.sh inst_hook initqueue/finished 01 ./finished-false.sh inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules