[elbe-devel] [PATCH 6/8] tests: adding initvm-size-check

Eduard Krein eduard.krein at linutronix.de
Thu Mar 28 14:41:07 CET 2024


Adding an initvm-size-check which contains an ever expanding
file to test the behavior the initvm in an ever expanding condition.

Signed-off-by: Eduard Krein <eduard.krein at linutronix.de>
---
 tests/initvm-size-check.xml | 97 +++++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 tests/initvm-size-check.xml

diff --git a/tests/initvm-size-check.xml b/tests/initvm-size-check.xml
new file mode 100644
index 00000000..92bff38a
--- /dev/null
+++ b/tests/initvm-size-check.xml
@@ -0,0 +1,97 @@
+<!--
+SPDX-License-Identifier: 0BSD
+SPDX-FileCopyrightText: Linutronix GmbH
+-->
+<ns0:RootFileSystem xmlns:ns0="https://www.linutronix.de/projects/Elbe" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" created="2009-05-20T08:50:56" revision="6" xsi:schemaLocation="https://www.linutronix.de/projects/Elbe dbsfed.xsd">
+	<project>
+		<name>aarch64</name>
+		<version>1.0</version>
+		<description>
+			use the following call to boot the image in qemu:
+			$ tar xf sdcard.qcow2.tar.xz
+			$ rm sdcard.qcow2.tar.xz
+			$ qemu-system-aarch64 \
+					-machine virt -cpu cortex-a57 -machine type=virt -nographic \
+					-smp 1 -m 1024 \
+					-netdev user,id=unet -device virtio-net-device,netdev=unet \
+					-redir tcp:2022::22 -redir tcp:2021::21 -redir tcp:2345::2345 \
+					-kernel vmlinuz \
+					-append "console=ttyAMA0 root=/dev/vda2" \
+					sdcard.qcow2
+
+			currently an own kernel is needed, but this shouldn't be necessary,
+			if we found how to use the one stored in mmcblk0p1
+		</description>
+		<buildtype>aarch64</buildtype>
+		<mirror>
+			<primary_host>deb.debian.org</primary_host>
+			<primary_path>/debian</primary_path>
+			<primary_proto>http</primary_proto>
+		</mirror>
+		<suite>bookworm</suite>
+	</project>
+	<target>
+		<hostname>lx64</hostname>
+		<domain>linutronix.de</domain>
+		<passwd>foo</passwd>
+		<console>ttyAMA0,115200</console>
+		<images>
+			<msdoshd>
+				<name>sdcard.img</name>
+				<size>1500MiB</size>
+					<partition>
+						<size>50MiB</size>
+						<label>boot</label>
+						<bootable />
+					</partition>
+					<partition>
+						<size>remain</size>
+						<label>rfs</label>
+					</partition>
+			</msdoshd>
+		</images>
+		<fstab>
+			<bylabel>
+				<label>boot</label>
+				<mountpoint>/boot</mountpoint>
+				<fs>
+					<type>vfat</type>
+				</fs>
+			</bylabel>
+			<bylabel>
+				<label>rfs</label>
+				<mountpoint>/</mountpoint>
+				<fs>
+					<type>ext2</type>
+					<fs-finetuning>
+						<device-command>tune2fs -i 0 {device}</device-command>
+					</fs-finetuning>
+				</fs>
+			</bylabel>
+		</fstab>
+		<install-recommends />
+		<finetuning>
+			<rm>/var/cache/apt/archives/*.deb</rm>
+                        <!-- this command creates an ever expanding file to check how the initvm reacts -->
+                        <command>while :; do echo 'pust und pust und pust und pust und pust und pust und pust und pust und pust und pust und pust und pust und pust und pust und pust' >> /home/Ballon; done</command>
+		</finetuning>
+		<pkg-list>
+			<pkg>linux-image-arm64</pkg>
+			<pkg>openssh-server</pkg>
+			<pkg>less</pkg>
+			<pkg>bash</pkg>
+			<pkg>vim-nox</pkg>
+			<pkg>wget</pkg>
+			<pkg>ntpdate</pkg>
+			<pkg>busybox</pkg>
+		</pkg-list>
+		<project-finetuning>
+			<losetup img="sdcard.img">
+				<!-- globs work, but must make sure, that only a single file is matched -->
+				<copy_from_partition part="1" artifact="vmlinuz">/vmlinuz-*-arm64</copy_from_partition>
+			</losetup>
+			<img_convert fmt="qcow2" dst="sdcard.qcow2">sdcard.img</img_convert>
+			<set_packer packer="tarxz">sdcard.qcow2</set_packer>
+		</project-finetuning>
+	</target>
+</ns0:RootFileSystem>
-- 
2.39.2



More information about the elbe-devel mailing list