mirror of
https://github.com/outbackdingo/debos.git
synced 2026-01-27 10:18:47 +00:00
Add test for partitioning with alternate sector size
parted will return an error code if the partition table is not found, and will print the message: "unrecognised disk label" Signed-off-by: Julien Massot <julien.massot@collabora.com>
This commit is contained in:
committed by
Sjoerd Simons
parent
f0b70e0bac
commit
396bf430a1
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
@@ -176,6 +176,10 @@ jobs:
|
||||
test: { name: "arch", case: "arch" }
|
||||
- backend: kvm
|
||||
test: { name: "apertis", case: "apertis" }
|
||||
- backend: kvm
|
||||
test: { name: "512 sector size GPT partition table", case: "partitioning-sector-size", variables: "-t sectorsize:512" }
|
||||
- backend: kvm
|
||||
test: { name: "4096 sector size GPT partition table", case: "partitioning-sector-size", variables: "-t sectorsize:4096" }
|
||||
name: ${{matrix.test.name}} on ${{matrix.backend}}
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
|
||||
23
tests/partitioning-sector-size/test.yaml
Normal file
23
tests/partitioning-sector-size/test.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
{{ $sectorsize := or .sectorsize 512 }}
|
||||
architecture: amd64
|
||||
sectorsize: {{ $sectorsize }}
|
||||
actions:
|
||||
- action: image-partition
|
||||
description: Create a {{ $sectorsize }} sector size image
|
||||
imagename: test.img
|
||||
imagesize: 10M
|
||||
partitiontype: gpt
|
||||
partitions:
|
||||
- name: system
|
||||
fs: ext4
|
||||
start: 2m
|
||||
end: 100%
|
||||
#
|
||||
# Would more elegant to check the sector size with
|
||||
# sfdisk --sector-size {{ $sectorsize }} -J test.img | jq .partitiontable.sectorsize
|
||||
# once we have an updated sfdisk that supports this option see:
|
||||
# https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes
|
||||
- action: run
|
||||
description: Print partition table
|
||||
chroot: false
|
||||
command: bash -c 'PARTED_SECTOR_SIZE={{ $sectorsize }} parted -s ${ARTIFACTDIR}/test.img print'
|
||||
Reference in New Issue
Block a user