|
|
d4a4eb |
From bf69beb6f3824b1ebed221c8255d1f5c9efd136a Mon Sep 17 00:00:00 2001
|
|
|
d4a4eb |
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
|
d4a4eb |
Date: Wed, 26 Jun 2019 16:42:04 +0200
|
|
|
d4a4eb |
Subject: [PATCH] test/TEST-17-LVM-THIN: fail setup if we run out of space in
|
|
|
d4a4eb |
the thin pool
|
|
|
d4a4eb |
|
|
|
d4a4eb |
This condition is rather difficult to detect -- the writes will just remain
|
|
|
d4a4eb |
queued and get lost on shutdown, resulting in a corrupt filesystem.
|
|
|
d4a4eb |
|
|
|
d4a4eb |
(cherry picked from commit 91c15babdf0215df59325f3086acfdf0ba247bfa)
|
|
|
d4a4eb |
---
|
|
|
d4a4eb |
test/TEST-17-LVM-THIN/create-root.sh | 5 +++--
|
|
|
d4a4eb |
test/TEST-17-LVM-THIN/test.sh | 2 +-
|
|
|
d4a4eb |
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
d4a4eb |
|
|
|
d4a4eb |
diff --git a/test/TEST-17-LVM-THIN/create-root.sh b/test/TEST-17-LVM-THIN/create-root.sh
|
|
|
d4a4eb |
index 117d1341..0e52f879 100755
|
|
|
d4a4eb |
--- a/test/TEST-17-LVM-THIN/create-root.sh
|
|
|
d4a4eb |
+++ b/test/TEST-17-LVM-THIN/create-root.sh
|
|
|
d4a4eb |
@@ -27,6 +27,7 @@ cp -a -t /sysroot /source/* && \
|
|
|
d4a4eb |
umount /sysroot && \
|
|
|
d4a4eb |
sleep 1 && \
|
|
|
d4a4eb |
lvm lvchange -a n /dev/dracut/root && \
|
|
|
d4a4eb |
-sleep 1 && \
|
|
|
d4a4eb |
-echo "dracut-root-block-created" >/dev/sda1
|
|
|
d4a4eb |
+sleep 1
|
|
|
d4a4eb |
+dmsetup status |grep out_of_data_space || \
|
|
|
d4a4eb |
+ echo "dracut-root-block-created" >/dev/sda1
|
|
|
d4a4eb |
poweroff -f
|
|
|
d4a4eb |
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
|
|
|
d4a4eb |
index af349246..1b36a216 100755
|
|
|
d4a4eb |
--- a/test/TEST-17-LVM-THIN/test.sh
|
|
|
d4a4eb |
+++ b/test/TEST-17-LVM-THIN/test.sh
|
|
|
d4a4eb |
@@ -56,7 +56,7 @@ test_setup() {
|
|
|
d4a4eb |
(
|
|
|
d4a4eb |
export initdir=$TESTDIR/overlay
|
|
|
d4a4eb |
. $basedir/dracut-init.sh
|
|
|
d4a4eb |
- inst_multiple sfdisk mke2fs poweroff cp umount
|
|
|
d4a4eb |
+ inst_multiple sfdisk mke2fs poweroff cp umount grep dmsetup
|
|
|
d4a4eb |
inst_hook initqueue 01 ./create-root.sh
|
|
|
d4a4eb |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
d4a4eb |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
d4a4eb |
|