summaryrefslogtreecommitdiffstats
path: root/test/units
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2022-11-11 14:26:45 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2022-11-15 13:45:28 +0100
commit56bb434e9b33d74bdd445ac0e7d263254ad93e5e (patch)
tree6c535efe9d102cca96b84094a2bc2fd69ac635f8 /test/units
parentrepart: Add --include/--exclude-partitions (diff)
downloadsystemd-56bb434e9b33d74bdd445ac0e7d263254ad93e5e.tar.xz
systemd-56bb434e9b33d74bdd445ac0e7d263254ad93e5e.zip
repart: Add integration test for --include/--exclude-partitions
Diffstat (limited to 'test/units')
-rwxr-xr-xtest/units/testsuite-58.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh
index f726dd548b..121fabc0af 100755
--- a/test/units/testsuite-58.sh
+++ b/test/units/testsuite-58.sh
@@ -136,6 +136,40 @@ EOF
systemd-repart --definitions="$defs" \
--dry-run=no \
--seed="$seed" \
+ --include-partitions=home,swap \
+ "$imgs/zzz"
+
+ output=$(sfdisk -d "$imgs/zzz" | grep -v -e 'sector-size' -e '^$')
+
+ assert_eq "$output" "label: gpt
+label-id: 1D2CE291-7CCE-4F7D-BC83-FDB49AD74EBD
+device: $imgs/zzz
+unit: sectors
+first-lba: 2048
+last-lba: 2097118
+$imgs/zzz1 : start= 2048, size= 591856, type=933AC7E1-2EB4-4F13-B844-0E14E2AEF915, uuid=4980595D-D74A-483A-AA9E-9903879A0EE5, name=\"home-first\", attrs=\"GUID:59\"
+$imgs/zzz4 : start= 1777624, size= 131072, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=78C92DB8-3D2B-4823-B0DC-792B78F66F1E, name=\"swap\""
+
+ systemd-repart --definitions="$defs" \
+ --dry-run=no \
+ --seed="$seed" \
+ --exclude-partitions=root \
+ "$imgs/zzz"
+
+ output=$(sfdisk -d "$imgs/zzz" | grep -v -e 'sector-size' -e '^$')
+
+ assert_eq "$output" "label: gpt
+label-id: 1D2CE291-7CCE-4F7D-BC83-FDB49AD74EBD
+device: $imgs/zzz
+unit: sectors
+first-lba: 2048
+last-lba: 2097118
+$imgs/zzz1 : start= 2048, size= 591856, type=933AC7E1-2EB4-4F13-B844-0E14E2AEF915, uuid=4980595D-D74A-483A-AA9E-9903879A0EE5, name=\"home-first\", attrs=\"GUID:59\"
+$imgs/zzz4 : start= 1777624, size= 131072, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=78C92DB8-3D2B-4823-B0DC-792B78F66F1E, name=\"swap\""
+
+ systemd-repart --definitions="$defs" \
+ --dry-run=no \
+ --seed="$seed" \
"$imgs/zzz"
output=$(sfdisk -d "$imgs/zzz" | grep -v -e 'sector-size' -e '^$')