From: Daan De Meyer Date: Fri, 11 Nov 2022 13:26:45 +0000 (+0100) Subject: repart: Add integration test for --include/--exclude-partitions X-Git-Tag: v253-rc1~525^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56bb434e9b33d74bdd445ac0e7d263254ad93e5e;p=thirdparty%2Fsystemd.git repart: Add integration test for --include/--exclude-partitions --- diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh index f726dd548bd..121fabc0afe 100755 --- a/test/units/testsuite-58.sh +++ b/test/units/testsuite-58.sh @@ -133,6 +133,40 @@ SizeMaxBytes=64M PaddingMinBytes=92M 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" \