summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index a166d3f614..13b6a0cc72 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -739,6 +739,30 @@ class Wic2(WicTestCase):
739 ]) 739 ])
740 740
741 with NamedTemporaryFile("w", suffix=".wks") as tempf: 741 with NamedTemporaryFile("w", suffix=".wks") as tempf:
742 # Test that partitions can be placed on a 512 byte sector boundary
743 tempf.write("bootloader --ptable gpt\n" \
744 "part / --source rootfs --ondisk hda --offset 65s --fixed-size 99M --fstype=ext4\n" \
745 "part /bar --ondisk hda --offset 102432 --fixed-size 100M --fstype=ext4\n")
746 tempf.flush()
747
748 _, partlns = self._get_wic_partitions(tempf.name, native_sysroot)
749 self.assertEqual(partlns, [
750 "1:32.5kiB:101408kiB:101376kiB:ext4:primary:;",
751 "2:102432kiB:204832kiB:102400kiB:ext4:primary:;",
752 ])
753
754 with NamedTemporaryFile("w", suffix=".wks") as tempf:
755 # Test that a partition can be placed immediately after a MSDOS partition table
756 tempf.write("bootloader --ptable msdos\n" \
757 "part / --source rootfs --ondisk hda --offset 1s --fixed-size 100M --fstype=ext4\n")
758 tempf.flush()
759
760 _, partlns = self._get_wic_partitions(tempf.name, native_sysroot)
761 self.assertEqual(partlns, [
762 "1:0.50kiB:102400kiB:102400kiB:ext4::;",
763 ])
764
765 with NamedTemporaryFile("w", suffix=".wks") as tempf:
742 # Test that image creation fails if the partitions would overlap 766 # Test that image creation fails if the partitions would overlap
743 tempf.write("bootloader --ptable gpt\n" \ 767 tempf.write("bootloader --ptable gpt\n" \
744 "part / --source rootfs --ondisk hda --offset 32 --fixed-size 100M --fstype=ext4\n" \ 768 "part / --source rootfs --ondisk hda --offset 32 --fixed-size 100M --fstype=ext4\n" \