From 15190543a5ab438dbf02d2a026b655c4937c6503 Mon Sep 17 00:00:00 2001 From: Vasilito Date: Tue, 14 Apr 2026 12:14:50 +0100 Subject: [PATCH] Add in-guest checks for the VM network baseline Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- local/docs/NETWORKING-RTL8125-NETCTL.md | 3 ++ local/scripts/test-vm-network-runtime.sh | 64 ++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 local/scripts/test-vm-network-runtime.sh diff --git a/local/docs/NETWORKING-RTL8125-NETCTL.md b/local/docs/NETWORKING-RTL8125-NETCTL.md index ea81c30d..90ea4841 100644 --- a/local/docs/NETWORKING-RTL8125-NETCTL.md +++ b/local/docs/NETWORKING-RTL8125-NETCTL.md @@ -80,6 +80,9 @@ base networking services have started. `redbear-minimal`: `pcid-spawner` → `smolnetd` → `dhcpd` → `netctl --boot` → `wired-dhcp`. - `./local/scripts/test-vm-network-qemu.sh` launches a VirtIO-backed QEMU run for the same Phase 2 baseline and prints the in-guest validation commands to run. +- `./local/scripts/test-vm-network-runtime.sh` is the in-guest check for the same baseline: it + verifies `/scheme/pci`, `/scheme/netcfg`, the active netctl profile, visible `network.*` + schemes, and the current `eth0` address. ## Remaining hardware validation diff --git a/local/scripts/test-vm-network-runtime.sh b/local/scripts/test-vm-network-runtime.sh new file mode 100644 index 00000000..46b845bb --- /dev/null +++ b/local/scripts/test-vm-network-runtime.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +# Test the Red Bear OS VM networking baseline from inside the guest +# Run this inside Red Bear OS (or via QEMU serial console) + +set -euo pipefail + +echo "=== Red Bear OS VM Network Runtime Test ===" +echo + +if command -v redbear-info >/dev/null 2>&1; then + echo "=== redbear-info --verbose ===" + redbear-info --verbose || true + echo +else + echo "❌ redbear-info not found" + exit 1 +fi + +if [ -e "/scheme/pci" ]; then + echo "✅ /scheme/pci registered" +else + echo "❌ /scheme/pci not found — pcid-spawner path is not live" + exit 1 +fi + +if [ -e "/scheme/netcfg" ]; then + echo "✅ /scheme/netcfg registered" +else + echo "❌ /scheme/netcfg not found — smolnetd path is not live" + exit 1 +fi + +if [ -e "/etc/netctl/active" ]; then + ACTIVE_PROFILE="$(tr -d '\r\n' < /etc/netctl/active)" + echo "✅ active netctl profile: ${ACTIVE_PROFILE:-}" +else + echo "❌ /etc/netctl/active not found" + exit 1 +fi + +echo +echo "=== netctl status ===" +if command -v netctl >/dev/null 2>&1; then + netctl status || true +else + echo "❌ netctl not found" + exit 1 +fi + +echo +echo "=== network schemes ===" +ls /scheme 2>/dev/null | grep '^network\.' || echo "(no network.* schemes visible)" + +echo +echo "=== netcfg address ===" +if [ -r "/scheme/netcfg/ifaces/eth0/addr/list" ]; then + cat /scheme/netcfg/ifaces/eth0/addr/list +else + echo "❌ /scheme/netcfg/ifaces/eth0/addr/list not readable" + exit 1 +fi + +echo +echo "=== Test Complete ==="