]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test/TEST-17-LVM-THIN: fail setup if we run out of space in the thin pool
authorLubomir Rintel <lkundrak@v3.sk>
Wed, 26 Jun 2019 14:42:04 +0000 (16:42 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 19 Jul 2019 14:02:25 +0000 (16:02 +0200)
This condition is rather difficult to detect -- the writes will just remain
queued and get lost on shutdown, resulting in a corrupt filesystem.

test/TEST-17-LVM-THIN/create-root.sh
test/TEST-17-LVM-THIN/test.sh

index 117d134157a33dd5b7d59c994ac9826c1815ec00..0e52f879f118cb1a97f281949c85d0dcee43ae73 100755 (executable)
@@ -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
index af3492466558895580199a9185fffd754131a6a9..1b36a216d08a47c5e60799334141ee082d66a168 100755 (executable)
@@ -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