diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2022-11-11 14:26:45 +0100 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2022-11-15 13:45:28 +0100 |
commit | 56bb434e9b33d74bdd445ac0e7d263254ad93e5e (patch) | |
tree | 6c535efe9d102cca96b84094a2bc2fd69ac635f8 /test/units | |
parent | repart: Add --include/--exclude-partitions (diff) | |
download | systemd-56bb434e9b33d74bdd445ac0e7d263254ad93e5e.tar.xz systemd-56bb434e9b33d74bdd445ac0e7d263254ad93e5e.zip |
repart: Add integration test for --include/--exclude-partitions
Diffstat (limited to 'test/units')
-rwxr-xr-x | test/units/testsuite-58.sh | 34 |
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 '^$') |