Merge pull request #1138 from kernelkit/test-sanity

This commit is contained in:
Mattias Walström
2025-09-05 18:55:18 +02:00
committed by GitHub
47 changed files with 213 additions and 62 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.44"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.45"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/linux_defconfig"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
+1 -1
View File
@@ -27,7 +27,7 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.44"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.45"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/linux_defconfig"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
+1 -1
View File
@@ -29,7 +29,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image
BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/r2s/genimage.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.44"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.45"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/r2s/rk3328-nanopi-r2s-dts.patch"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/r2s/linux_defconfig"
+1 -1
View File
@@ -26,7 +26,7 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INF
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.44"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.45"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/linux_defconfig"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
+1 -1
View File
@@ -27,7 +27,7 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INF
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.44"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.45"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/linux_defconfig"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
+8
View File
@@ -3,6 +3,14 @@ Change Log
All notable changes to the project are documented in this file.
[v25.09.0][UNRELEASED] -
-------------------------
### Changes
- Upgrade Linux kernel to 6.12.45 (LTS)
### Fixes
[v25.08.0][] - 2025-09-01
-------------------------
@@ -1,4 +1,4 @@
From b4f8d056cfbf3af9116952f5f03ed2bfba13fcbb Mon Sep 17 00:00:00 2001
From b17d0b24ef5119f5a5d6c1c4f0f64a7fd40eb9c3 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Tue, 12 Mar 2024 10:27:24 +0100
Subject: [PATCH 01/30] [FIX] net: dsa: mv88e6xxx: Fix timeout on waiting for
@@ -1,4 +1,4 @@
From b9bf83b003601dc306d3a2cd7dd51f2795bbb451 Mon Sep 17 00:00:00 2001
From b860638f4b4beb87e594489fbfb853733055f511 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Wed, 27 Mar 2024 15:52:43 +0100
Subject: [PATCH 02/30] net: dsa: mv88e6xxx: Improve indirect register access
@@ -1,4 +1,4 @@
From c6171e8b4f0a7acb1a8d57e9fe8900e132917e82 Mon Sep 17 00:00:00 2001
From 2a2a0c493171231effe779e90674cf0b0781aca8 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Mon, 22 Apr 2024 23:18:01 +0200
Subject: [PATCH 03/30] net: dsa: mv88e6xxx: Honor ports being managed via
@@ -1,4 +1,4 @@
From 8138197f76730926e96d94b532d0215de20470af Mon Sep 17 00:00:00 2001
From 739504c5079ce8bef32f74a60a3d64658820afb0 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Wed, 24 Apr 2024 22:41:04 +0200
Subject: [PATCH 04/30] net: dsa: mv88e6xxx: Limit rsvd2cpu policy to user
@@ -1,4 +1,4 @@
From a02245c2aa6783aae016266ef3f226f85bf402da Mon Sep 17 00:00:00 2001
From 120982bf4321ef9a0aca86a58de41b3889820218 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Thu, 16 Nov 2023 19:44:32 +0100
Subject: [PATCH 05/30] net: dsa: mv88e6xxx: Add LED infrastructure
@@ -1,4 +1,4 @@
From cf091bc712f67eaa733194de9b84003d27221053 Mon Sep 17 00:00:00 2001
From aaced18de42d22b092fcfdf06b408e580340e53a Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Thu, 16 Nov 2023 21:59:35 +0100
Subject: [PATCH 06/30] net: dsa: mv88e6xxx: Add LED support for 6393X
@@ -1,4 +1,4 @@
From 630151bff3fa0f6ef64c326ca874ef9858bdcb8a Mon Sep 17 00:00:00 2001
From c9899deafacca21badc0f69650c15240cf16affa Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Tue, 28 May 2024 10:38:42 +0200
Subject: [PATCH 07/30] net: dsa: tag_dsa: Use tag priority as initial
@@ -1,4 +1,4 @@
From a87bfa946479faea1dce4d9ee1034922263dc758 Mon Sep 17 00:00:00 2001
From 15221467565f0f282c4f992d0577a45874cc07dd Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Tue, 16 Jan 2024 16:00:55 +0100
Subject: [PATCH 08/30] net: dsa: Support MDB memberships whose L2 addresses
@@ -1,4 +1,4 @@
From 8465eec4cbeccb7eb683820e8e4f4601ce05509f Mon Sep 17 00:00:00 2001
From 2cba1d99ca6f51a04f67efc27c9c46b3ed14d796 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Thu, 21 Mar 2024 19:12:15 +0100
Subject: [PATCH 09/30] net: dsa: Support EtherType based priority overrides
@@ -1,4 +1,4 @@
From 6809a220eb75ef2ac5eed033028cd0a98948cca3 Mon Sep 17 00:00:00 2001
From 491d425be06d272c35cb46548e2b6ea54c043956 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Fri, 22 Mar 2024 16:15:43 +0100
Subject: [PATCH 10/30] net: dsa: mv88e6xxx: Support EtherType based priority
@@ -1,4 +1,4 @@
From ecc33c81e71000a7db4abf1fd769783528883c0a Mon Sep 17 00:00:00 2001
From b415909d2a9a1645926ce09542d9c84719db15d7 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Tue, 28 May 2024 11:04:22 +0200
Subject: [PATCH 11/30] net: dsa: mv88e6xxx: Add mqprio qdisc support
@@ -1,4 +1,4 @@
From 446ee49b7ecef20c17fa7fd8c2d196236fdbeb0f Mon Sep 17 00:00:00 2001
From e15ee1e8f94f033b4f34279294b13b48a3d2c648 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Wed, 29 May 2024 13:20:41 +0200
Subject: [PATCH 12/30] net: dsa: mv88e6xxx: Use VLAN prio over IP when both
@@ -1,4 +1,4 @@
From 379d6362066d1e3944f2610b6769bcb170f5cfb5 Mon Sep 17 00:00:00 2001
From 09590ee1dcb17adee292add407cfcb1d1647685a Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Tue, 26 Nov 2024 19:45:59 +0100
Subject: [PATCH 13/30] [FIX] net: dsa: mv88e6xxx: Trap locally terminated
@@ -1,4 +1,4 @@
From c1c803aae5530c6ad8cba5e1b690309343d70581 Mon Sep 17 00:00:00 2001
From d3cedfa6405e8e855bd034a51597584b004dc833 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Tue, 19 Sep 2023 18:38:10 +0200
Subject: [PATCH 14/30] net: phy: marvell10g: Support firmware loading on
@@ -1,4 +1,4 @@
From f78961c99e9027e093d5fc4b16b890acb0f4c906 Mon Sep 17 00:00:00 2001
From 20c76093cab636da669779bf12e2726daa839ff9 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Tue, 21 Nov 2023 20:15:24 +0100
Subject: [PATCH 15/30] net: phy: marvell10g: Fix power-up when strapped to
@@ -1,4 +1,4 @@
From f91ec427a88888262de0e670ec1d6d5a2dd1ea19 Mon Sep 17 00:00:00 2001
From cf1d957921a498300441320ce15d18382a94fae4 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Wed, 15 Nov 2023 20:58:42 +0100
Subject: [PATCH 16/30] net: phy: marvell10g: Add LED support for 88X3310
@@ -1,4 +1,4 @@
From 4bd8aa58f2cf82d8df62624a030ca822d1991e3f Mon Sep 17 00:00:00 2001
From 468f8f10888e8ab41975088e68a1a291f4ac0d58 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Tue, 12 Dec 2023 09:51:05 +0100
Subject: [PATCH 17/30] net: phy: marvell10g: Support LEDs tied to a single
@@ -1,4 +1,4 @@
From 462548c531a48ea97f16fe02f8214304bf5717eb Mon Sep 17 00:00:00 2001
From a5255b6fcd938722071c6f39ff2d23fd97376b6e Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Wed, 27 Mar 2024 10:10:19 +0100
Subject: [PATCH 18/30] net: phy: Do not resume PHY when attaching
@@ -1,4 +1,4 @@
From 550d6f5a0463f39f2959415495b86c79816d4055 Mon Sep 17 00:00:00 2001
From 42c7c014fe63c98fc81757ae0df53699d08d3ea7 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <troglobit@gmail.com>
Date: Mon, 4 Mar 2024 16:47:28 +0100
Subject: [PATCH 19/30] net: bridge: avoid classifying unknown multicast as
@@ -1,4 +1,4 @@
From b1e6fb8acc320967fa2435dda641ec2031fd55cc Mon Sep 17 00:00:00 2001
From b6b8cef52cef59809f585a48e3272bc13f178d82 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <troglobit@gmail.com>
Date: Tue, 5 Mar 2024 06:44:41 +0100
Subject: [PATCH 20/30] net: bridge: Ignore router ports when forwarding L2
@@ -1,4 +1,4 @@
From c0de0c952b98eea283925a7f15255a7501c7343c Mon Sep 17 00:00:00 2001
From 96749ad0bc548f3add2d131809de6f80be7d69c2 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <troglobit@gmail.com>
Date: Thu, 4 Apr 2024 16:36:30 +0200
Subject: [PATCH 21/30] net: bridge: drop delay for applying strict multicast
@@ -1,4 +1,4 @@
From 778143529c0df2eeada5e2c682156d62103b92bc Mon Sep 17 00:00:00 2001
From a1f922b3646af126da825a2dd0ba32d73abefd1c Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Thu, 16 May 2024 14:51:54 +0200
Subject: [PATCH 22/30] net: bridge: Differentiate MDB additions from
@@ -1,4 +1,4 @@
From adc96c55eaea59edd98026c209f435238ceeac09 Mon Sep 17 00:00:00 2001
From 54454a98875cdc439dd2d7c546a4e555ae46caed Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Fri, 24 Nov 2023 23:29:55 +0100
Subject: [PATCH 23/30] nvmem: layouts: onie-tlv: Let device probe even when
@@ -1,4 +1,4 @@
From fecf7749e91bd1d2d54e2003daefe97ae449b04c Mon Sep 17 00:00:00 2001
From adc984529922b8ead7e393f133e81c4aba8a8d9f Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <troglobit@gmail.com>
Date: Mon, 29 Apr 2024 15:14:51 +0200
Subject: [PATCH 24/30] usb: core: adjust log level for unauthorized devices
@@ -1,4 +1,4 @@
From c89e3e44747f2cddfaf47e0a55027a14579ca4ce Mon Sep 17 00:00:00 2001
From ffa0d98802a2445e47122b8c6fb3b37592dfbd1e Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <troglobit@gmail.com>
Date: Thu, 16 Jan 2025 12:35:12 +0100
Subject: [PATCH 25/30] net: dsa: mv88e6xxx: collapse disabled state into
@@ -1,4 +1,4 @@
From 34de4ecc90144fb98aae12cbc22c847eb0e1f92f Mon Sep 17 00:00:00 2001
From 44c483f21c129b8e4ef8892192e31dbe2761be34 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Wed, 12 Feb 2025 22:03:14 +0100
Subject: [PATCH 26/30] net: dsa: mv88e6xxx: Only activate LAG offloading when
@@ -1,4 +1,4 @@
From 10df1d67f996439e1f4dd41ec761c94631383930 Mon Sep 17 00:00:00 2001
From 1e8f38520f4189fc18aa68aa0ec2daebc8ccba20 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <troglobit@gmail.com>
Date: Sun, 11 Aug 2024 11:27:35 +0200
Subject: [PATCH 27/30] net: usb: r8152: add r8153b support for link/activity
@@ -1,4 +1,4 @@
From cd45846aea45d8a51d40472ee5993de43a98d4a6 Mon Sep 17 00:00:00 2001
From 6ff60fec79ca075406d2631ca1f8a514561adbd0 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <troglobit@gmail.com>
Date: Sun, 10 Aug 2025 18:52:54 +0200
Subject: [PATCH 28/30] arm64: dts: mediatek: mt7986a: rename BPi R3 ports to
@@ -1,4 +1,4 @@
From b978886aa20a68f9d5be378797fa45054c249905 Mon Sep 17 00:00:00 2001
From 64a98c298358ca9332f6073ec9d52489075c9e65 Mon Sep 17 00:00:00 2001
From: Mattias Walström <lazzer@gmail.com>
Date: Wed, 20 Aug 2025 21:38:24 +0200
Subject: [PATCH 29/30] drm/panel-simple: Add a timing for the Raspberry Pi 7"
@@ -1,4 +1,4 @@
From b6b066a94032f06e669685208969cf00172a361e Mon Sep 17 00:00:00 2001
From 177a00df238e615a5aaea9a4ecdd01e7f747f8f4 Mon Sep 17 00:00:00 2001
From: Mattias Walström <lazzer@gmail.com>
Date: Thu, 21 Aug 2025 11:20:23 +0200
Subject: [PATCH 30/30] input:touchscreen:edt-ft5x06: Add polled mode
+1 -1
View File
@@ -1,2 +1,2 @@
# Calculated with ../utils/kernel-refresh.sh
sha256 b650210ed3027b224969d148aa377452a9aad3ae7f2851abedd31adfef16bdae linux-6.12.44.tar.xz
sha256 8f95a8549cfbdfb89c1181a1f55a971f04dfcd629508a2ed70b777ab92f9db3e linux-6.12.45.tar.xz
+14
View File
@@ -6,12 +6,26 @@
infamy:
specification: False
- case: meta/bootorder.py
infamy:
specification: False
- case: meta/check-version.py
infamy:
specification: False
- name: Misc tests
suite: misc/misc.yaml
- name: ietf-system
suite: ietf_system/ietf_system.yaml
# Upgrade may leave wrong boot order
- case: meta/bootorder.py
infamy:
specification: False
- name: ietf-syslog
suite: ietf_syslog/ietf_syslog.yaml
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env python3
import infamy
with infamy.Test() as test:
with test.step("Discover topology and attach to available DUTs"):
env = infamy.Env(False)
ctrl = env.ptop.get_ctrl()
duts = {}
duts_state = {}
for ix in env.ptop.get_infixen():
cport, ixport = env.ptop.get_mgmt_link(ctrl, ix)
print(f"Attaching to {ix}:{ixport} via {ctrl}:{cport}")
duts[ix] = env.attach(ix, ixport)
with test.step("Verify bootorder"):
for name, tgt in duts.items():
expected = env.ptop.get_expected_boot(name)
running = tgt.get_data("/ietf-system:system-state")
running = running['system-state']['software']['booted']
print(f"{name}: booted: {running} expected: {expected}")
if running != expected:
test.fail()
test.succeed()
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env python3
import infamy
import os
with infamy.Test() as test:
with test.step("Discover topology and attach to available DUTs"):
env = infamy.Env(False)
ctrl = env.ptop.get_ctrl()
duts = {}
duts_state = {}
for ix in env.ptop.get_infixen():
cport, ixport = env.ptop.get_mgmt_link(ctrl, ix)
print(f"Attaching to {ix}:{ixport} via {ctrl}:{cport}")
duts[ix] = env.attach(ix, ixport)
with test.step("Verify software version"):
expected=os.environ.get("VERSION")
for name, tgt in duts.items():
running = tgt.get_data("/ietf-system:system-state")
running = running['system-state']['platform']['os-version']
print(f"{name}: booted: {running} expected {expected}")
if running != expected:
test.fail()
test.succeed()
-23
View File
@@ -13,27 +13,4 @@ with infamy.Test() as test:
else:
print(f"Specify PYTHONHASHSEED={seed} to reproduce this test environment")
with test.step("Discover topology and attach to available DUTs"):
env = infamy.Env(False)
ctrl = env.ptop.get_ctrl()
duts = {}
for ix in env.ptop.get_infixen():
cport, ixport = env.ptop.get_mgmt_link(ctrl, ix)
print(f"Attaching to {ix}:{ixport} via {ctrl}:{cport}")
duts[ix] = env.attach(ix, ixport)
with test.step("Log running software versions"):
for name, tgt in duts.items():
sys = tgt.get_data("/ietf-system:system-state")
sw = sys["system-state"]["software"]
plt = sys["system-state"]["platform"]
print(f"{name}:")
for k,v in plt.items():
print(f" {k:<16s} {v}")
for k in ("compatible", "booted"):
print(f" {k:<16s} {sw[k]}")
test.succeed()
+2
View File
@@ -184,6 +184,7 @@ while getopts "b:cCDf:hiKp:q:rt:" opt; do
kvm=
;;
p)
version=$(unsquashfs -cat $OPTARG manifest.raucm | awk -F'=' '/^version=/ {print $2}')
INFAMY_ARGS="$INFAMY_ARGS -p $OPTARG"
;;
q)
@@ -234,6 +235,7 @@ if [ "$containerize" ]; then
--env NINEPM_PROJ_CONFIG="$NINEPM_PROJ_CONFIG" \
--env QENETH_PATH="$testdir/templates:$testdir" \
--env PS1="$(build_ps1)" \
--env VERSION="$version" \
$extra_env \
--expose 9001-9010 --publish-all \
-v "$HOME/.infix/.ash_history":/root/.ash_history \
+7 -1
View File
@@ -131,6 +131,13 @@ class Topology:
return qstrip(password) if password is not None else "admin"
def get_expected_boot(self, node):
n = self.dotg.get_node(node)
b = n[0] if n else {}
boot = b.get("expected_boot")
return _qstrip(boot)
def get_link(self, src, dst, flt=lambda _: True):
es = self.g.get_edge_data(src, dst)
for e in es.values():
@@ -150,7 +157,6 @@ class Topology:
def get_infixen(self):
return self.get_nodes(lambda _, attrs: compatible(attrs, {"requires": {"infix"}}))
def get_attr(self, name, default=None):
return _qstrip(self.dotg.get_attributes().get(name, default))
+1 -2
View File
@@ -14,8 +14,7 @@ mode-qeneth := -q $(test-dir)/virt/quad
mode-host := -t $(or $(TOPOLOGY),/etc/infamy.dot)
mode-run := -t $(BINARIES_DIR)/qemu.dot
mode := $(mode-$(TEST_MODE))
INFIX_IMAGE_ID := $(call qstrip,$(INFIX_IMAGE_ID))
INFIX_IMAGE_ID := $(call qstrip,$(INFIX_IMAGE_ID))
binaries-$(ARCH) := $(addprefix $(INFIX_IMAGE_ID),.img -disk.qcow2)
pkg-$(ARCH) := -p $(O)/images/$(addprefix $(INFIX_IMAGE_ID),.pkg)
binaries-x86_64 += OVMF.fd
+2
View File
@@ -25,6 +25,7 @@ graph "dual" {
label="{ <e1> e1 | <e2> e2 | <e3> e3 } | dut1 | { <e4> e4 | <e5> e5 | <e6> e6 }",
pos="10,18!",
provides="infix",
expected_boot="primary",
qn_console=9001,
qn_mem="384M",
qn_usb="dut1.usb"
@@ -33,6 +34,7 @@ graph "dual" {
label="{ <e1> e1 | <e2> e2 | <e3> e3 } | dut2 | { <e4> e4 | <e5> e5 | <e6> e6 }",
pos="10,12!",
provides="infix",
expected_boot="primary",
qn_console=9002,
qn_mem="384M",
qn_usb="dut2.usb"
+4
View File
@@ -24,6 +24,7 @@ graph "quad" {
label="{ <e1> e1 | <e2> e2 | <e3> e3 | <e4> e4 } | dut1 | { <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="10,30!",
provides="infix",
expected_boot="primary",
qn_console=9001,
qn_mem="384M",
qn_usb="dut1.usb"
@@ -32,6 +33,7 @@ graph "quad" {
label="{ <e1> e1 | <e2> e2 | <e3> e3 | <e4> e4 } | dut2 | { <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="0,20!",
provides="infix",
expected_boot="primary",
qn_console=9002,
qn_mem="384M",
qn_usb="dut2.usb"
@@ -40,6 +42,7 @@ graph "quad" {
label="{ <e1> e1 | <e2> e2 | <e3> e3 | <e4> e4 } | dut3 | { <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="0,10!",
provides="infix",
expected_boot="primary",
qn_console=9003,
qn_mem="384M",
qn_usb="dut3.usb"
@@ -49,6 +52,7 @@ graph "quad" {
label="{ <e1> e1 | <e2> e2 | <e3> e3 | <e4> e4 } | dut4 | { <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="10,0!",
provides="infix",
expected_boot="primary",
qn_console=9004,
qn_mem="384M",
qn_usb="dut4.usb"
+91
View File
@@ -0,0 +1,91 @@
#!/usr/bin/env python3
import argparse
import hashlib
import json
import re
import shutil
import sys
import urllib.request
from datetime import datetime
BIOS_IMAGE = "OVMF-edk2-stable202305.fd"
REPO = "https://github.com/kernelkit/infix"
def check_version_format(ver):
if not re.fullmatch(r"\d{2}\.\d{2}\.\d+", ver):
sys.exit("Error: version must be full form like 25.08.0")
return ver
def compute_md5_and_size(url):
md5 = hashlib.md5()
size = 0
with urllib.request.urlopen(url) as resp:
while True:
chunk = resp.read(1024 * 1024)
if not chunk:
break
md5.update(chunk)
size += len(chunk)
return md5.hexdigest(), size
def main():
parser = argparse.ArgumentParser(description="Add a new Infix version to a GNS3 appliance file")
parser.add_argument("version", help="Infix version (e.g. 25.08.0)")
parser.add_argument("appliance", help="Path to appliance JSON (.gns3a)")
args = parser.parse_args()
version = check_version_format(args.version)
appliance_path = args.appliance
# Load JSON
with open(appliance_path, "r", encoding="utf-8") as f:
data = json.load(f)
# Skip if version already exists
for v in data.get("versions", []):
if v.get("name") == version:
print(f"Version {version} already exists.")
return
# Build qcow2 URL
filename = f"infix-x86_64-disk-{version}.qcow2"
url = f"{REPO}/releases/download/v{version}/{filename}"
print(f"Downloading {url} to compute MD5 and size...")
md5sum, size = compute_md5_and_size(url)
# Add image entry
image_entry = {
"filename": filename,
"filesize": size,
"md5sum": md5sum,
"version": version,
"direct_download_url": url
}
data.setdefault("images", []).append(image_entry)
# Add version entry (newest first)
version_entry = {
"name": version,
"images": {
"bios_image": BIOS_IMAGE,
"hda_disk_image": filename
}
}
data.setdefault("versions", []).insert(0, version_entry)
# Backup
backup = appliance_path + ".bak-" + datetime.now().strftime("%Y%m%d-%H%M%S")
shutil.copy2(appliance_path, backup)
# Save updated JSON
with open(appliance_path, "w", encoding="utf-8") as f:
json.dump(data, f, indent=4)
print(f"✅ Added version {version}")
print(f" File: {appliance_path}")
print(f" Backup: {backup}")
print(f" Disk: {filename} (size={size} bytes, md5={md5sum})")
if __name__ == "__main__":
main()