Skip to content

Commit

Permalink
Expand gpt partitioning tests to more then 4 partitions
Browse files Browse the repository at this point in the history
The msdos partitioning now handles more then 4 partitions by inserting
an extended partition. To test this doesn't confuse the gpt partitioning
expand that test to more then 4 partitions as well.
  • Loading branch information
sjoerdsimons committed Jan 20, 2024
1 parent 7870756 commit 325c8f7
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 11 deletions.
72 changes: 64 additions & 8 deletions tests/partitioning/expected.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,70 @@
{
"partitiontable": {
"label":"gpt",
"id":"12345678-1234-1234-1234-123456789012",
"device":"test.img",
"unit":"sectors",
"firstlba":34,
"lastlba":7812466,
"sectorsize":512,
"label": "gpt",
"id": "12345678-1234-1234-1234-123456789012",
"device": "test.img",
"unit": "sectors",
"firstlba": 34,
"lastlba": 15624966,
"sectorsize": 512,
"partitions": [
{"node":"test.img1", "start":34, "size":7812433, "type":"0FC63DAF-8483-4772-8E79-3D69D8477DE4", "uuid":"87654321-1234-5678-9012-345678901234", "name":"system"}
{
"node": "test.img1",
"start": 34,
"size": 499967,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "7BA1B99D-7942-450A-921B-F394A0A065AF",
"name": "boot"
},{
"node": "test.img2",
"start": 500001,
"size": 3406250,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "87654321-1234-5678-9012-345678901234",
"name": "system"
},{
"node": "test.img3",
"start": 3906251,
"size": 1953125,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "713CA942-5DB4-41F8-A365-E8F1CA967D7A",
"name": "data0"
},{
"node": "test.img4",
"start": 5859376,
"size": 1953125,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "05D13CA0-7EA3-48D2-9824-8C94263E5692",
"name": "data1"
},{
"node": "test.img5",
"start": 7812501,
"size": 1953125,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "C86924DB-49D2-47D8-BBB7-BB56426A8934",
"name": "data2"
},{
"node": "test.img6",
"start": 9765626,
"size": 1953125,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "B0F4D633-B66A-44B6-933A-E77A0144B275",
"name": "data3"
},{
"node": "test.img7",
"start": 11718751,
"size": 1953125,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "8BDAE85E-E473-4D77-B09D-43E1D6F741DA",
"name": "data4"
},{
"node": "test.img8",
"start": 13671876,
"size": 1953091,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "F9272482-3F7E-44E3-8D99-C24023EB3317",
"name": "data5"
}
]
}
}
34 changes: 31 additions & 3 deletions tests/partitioning/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,46 @@ actions:
- action: image-partition
description: Partition the image
imagename: test.img
imagesize: 4G
imagesize: 8G
partitiontype: gpt
diskid: 12345678-1234-1234-1234-123456789012
mountpoints:
- mounpoint: /
partition: system
partitions:
- name: boot
fs: ext2
start: 0%
end: 256M
- name: system
fs: ext4
start: 256m
end: 2G
partuuid: 87654321-1234-5678-9012-345678901234
- name: data0
fs: ext4
start: 0%
end: 100%
start: 2G
end: 3G
- name: data1
fs: ext4
start: 3G
end: 4G
- name: data2
fs: ext4
start: 4G
end: 5G
- name: data3
fs: ext4
start: 5G
end: 6G
- name: data4
fs: ext4
start: 6G
end: 7G
- name: data5
fs: ext4
start: 7G
end: 8G

- action: run
chroot: false
Expand Down

0 comments on commit 325c8f7

Please sign in to comment.