From 937840a5299c28e30137190bd048ea99329a7cbf Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 15:38:58 +0000 Subject: [PATCH 01/18] feat(kernel): point examples at danbugs/unikraft fork Signed-off-by: danbugs --- examples/dotnet-http/kraft.yaml | 2 +- examples/dotnet-nativeaot/kraft.yaml | 2 +- examples/dotnet/kraft.yaml | 2 +- examples/go-http/kraft.yaml | 2 +- examples/go/kraft.yaml | 2 +- examples/helloworld-c/kraft.yaml | 2 +- examples/hostfs-posix-c/kraft.yaml | 2 +- examples/hostfs-posix-py/kraft.yaml | 2 +- examples/multifn-c/kraft.yaml | 2 +- examples/networking-py/kraft.yaml | 2 +- examples/nodejs/kraft.yaml | 2 +- examples/powershell/kraft.yaml | 2 +- examples/python-agent-driver/kraft.yaml | 12 +++++++----- examples/python-agent/kraft.yaml | 2 +- examples/python-tools/kraft.yaml | 2 +- examples/python/kraft.yaml | 2 +- examples/rust/kraft.yaml | 2 +- examples/shell/kraft.yaml | 2 +- 18 files changed, 24 insertions(+), 22 deletions(-) diff --git a/examples/dotnet-http/kraft.yaml b/examples/dotnet-http/kraft.yaml index 37c6ed0..9ae8467 100644 --- a/examples/dotnet-http/kraft.yaml +++ b/examples/dotnet-http/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: dotnet-http-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/dotnet-nativeaot/kraft.yaml b/examples/dotnet-nativeaot/kraft.yaml index f5c2b2d..fc520c0 100644 --- a/examples/dotnet-nativeaot/kraft.yaml +++ b/examples/dotnet-nativeaot/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: dotnet-nativeaot-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/dotnet/kraft.yaml b/examples/dotnet/kraft.yaml index b2b0a3b..bed8cbb 100644 --- a/examples/dotnet/kraft.yaml +++ b/examples/dotnet/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: dotnet-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/go-http/kraft.yaml b/examples/go-http/kraft.yaml index d06b787..d3853ed 100644 --- a/examples/go-http/kraft.yaml +++ b/examples/go-http/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: go-http-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/go/kraft.yaml b/examples/go/kraft.yaml index 547d6d7..6102764 100644 --- a/examples/go/kraft.yaml +++ b/examples/go/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: go-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/helloworld-c/kraft.yaml b/examples/helloworld-c/kraft.yaml index 36e45f2..94b3e4e 100644 --- a/examples/helloworld-c/kraft.yaml +++ b/examples/helloworld-c/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: helloworld-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/hostfs-posix-c/kraft.yaml b/examples/hostfs-posix-c/kraft.yaml index d2f937f..6b125ff 100644 --- a/examples/hostfs-posix-c/kraft.yaml +++ b/examples/hostfs-posix-c/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: hostfs-posix-c-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/hostfs-posix-py/kraft.yaml b/examples/hostfs-posix-py/kraft.yaml index ec17d14..15362e2 100644 --- a/examples/hostfs-posix-py/kraft.yaml +++ b/examples/hostfs-posix-py/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: hostfs-posix-py-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/multifn-c/kraft.yaml b/examples/multifn-c/kraft.yaml index cc98096..d20c2e7 100644 --- a/examples/multifn-c/kraft.yaml +++ b/examples/multifn-c/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: multifn-c-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/networking-py/kraft.yaml b/examples/networking-py/kraft.yaml index 67531a4..a486d6c 100644 --- a/examples/networking-py/kraft.yaml +++ b/examples/networking-py/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: networking-py-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/nodejs/kraft.yaml b/examples/nodejs/kraft.yaml index 4639e1a..beda7b7 100644 --- a/examples/nodejs/kraft.yaml +++ b/examples/nodejs/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: nodejs-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/powershell/kraft.yaml b/examples/powershell/kraft.yaml index 8d3bcc9..2f006e6 100644 --- a/examples/powershell/kraft.yaml +++ b/examples/powershell/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: powershell-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/python-agent-driver/kraft.yaml b/examples/python-agent-driver/kraft.yaml index 425b327..a92b47f 100644 --- a/examples/python-agent-driver/kraft.yaml +++ b/examples/python-agent-driver/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: python-agent-driver-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: feat/subprocess-support kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' @@ -79,12 +79,14 @@ unikraft: CONFIG_LIBCONTEXT: 'y' CONFIG_LIBCONTEXT_CLEAR_TBSS: 'y' - CONFIG_LIBPOSIX_FDTAB_MULTITAB: 'n' + CONFIG_LIBPOSIX_FDTAB_MULTITAB: 'y' + + CONFIG_LIBPOSIX_PROCESS_BRK: 'y' libraries: app-elfloader: - source: https://github.com/unikraft/app-elfloader.git - version: plat-hyperlight + source: https://github.com/danbugs/app-elfloader.git + version: feat/subprocess-support libelf: source: https://github.com/unikraft/lib-libelf.git version: staging diff --git a/examples/python-agent/kraft.yaml b/examples/python-agent/kraft.yaml index d627dc3..026d548 100644 --- a/examples/python-agent/kraft.yaml +++ b/examples/python-agent/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: python-agent-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/python-tools/kraft.yaml b/examples/python-tools/kraft.yaml index 53de59f..5911c5d 100644 --- a/examples/python-tools/kraft.yaml +++ b/examples/python-tools/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: python-tools-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/python/kraft.yaml b/examples/python/kraft.yaml index dba5357..fddb088 100644 --- a/examples/python/kraft.yaml +++ b/examples/python/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: python-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/rust/kraft.yaml b/examples/rust/kraft.yaml index 962a7e9..1972aae 100644 --- a/examples/rust/kraft.yaml +++ b/examples/rust/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: rust-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/shell/kraft.yaml b/examples/shell/kraft.yaml index 242745b..74f59d9 100644 --- a/examples/shell/kraft.yaml +++ b/examples/shell/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: shell-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git + source: https://github.com/danbugs/unikraft.git version: plat-hyperlight kconfig: # Platform From 62f66664ccdd7c9491edfd23e83b4f2a079c35e4 Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 15:39:02 +0000 Subject: [PATCH 02/18] feat(host): increase heap to 2.5 GiB for subprocess support Signed-off-by: danbugs --- host/src/bin/pydriver_run.rs | 2 +- host/src/bin/pyhl.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/host/src/bin/pydriver_run.rs b/host/src/bin/pydriver_run.rs index 448f83c..88a3827 100644 --- a/host/src/bin/pydriver_run.rs +++ b/host/src/bin/pydriver_run.rs @@ -44,7 +44,7 @@ fn main() -> Result<()> { let t_evolve = Instant::now(); let mut sandbox = Sandbox::builder(&kernel) .initrd_file(&initrd) - .heap_size(1280 * 1024 * 1024) + .heap_size(2560 * 1024 * 1024) .build()?; eprintln!( "[timing] evolve={:.1}ms", diff --git a/host/src/bin/pyhl.rs b/host/src/bin/pyhl.rs index ac66a48..6f5bf2a 100644 --- a/host/src/bin/pyhl.rs +++ b/host/src/bin/pyhl.rs @@ -463,7 +463,7 @@ fn cmd_setup(args: SetupArgs) -> Result<()> { { let mut builder = Sandbox::builder(&dst_kernel) .initrd_file(&dst_initrd) - .heap_size(1280 * 1024 * 1024); + .heap_size(2560 * 1024 * 1024); for p in &setup_preopens { builder = builder.preopen(p.clone()); } From bb258c1d9b3e2e794f56992fb21502184cb5f4c1 Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 15:39:06 +0000 Subject: [PATCH 03/18] fix(pydriver): replace strtoul with inline parse_hex Signed-off-by: danbugs --- examples/python-agent-driver/hl_pydriver.c | 35 ++++++++++++++-------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/examples/python-agent-driver/hl_pydriver.c b/examples/python-agent-driver/hl_pydriver.c index 16c8266..e563765 100644 --- a/examples/python-agent-driver/hl_pydriver.c +++ b/examples/python-agent-driver/hl_pydriver.c @@ -110,18 +110,28 @@ static const char *fc_arg0_string(const uint8_t *fc, size_t fc_len, * FC-aware callback the kernel dispatches to * on every call after it's set */ +static uintptr_t parse_hex(const char *s) +{ + uintptr_t v = 0; + if (s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) + s += 2; + for (; *s; s++) { + unsigned d; + if (*s >= '0' && *s <= '9') d = *s - '0'; + else if (*s >= 'a' && *s <= 'f') d = *s - 'a' + 10; + else if (*s >= 'A' && *s <= 'F') d = *s - 'A' + 10; + else break; + v = (v << 4) | d; + } + return v; +} + typedef void (*hl_dispatch_fn_t)(const uint8_t *fc, size_t fc_len); static const uint8_t **g_fc_bytes_slot; static size_t *g_fc_len_slot; static hl_dispatch_fn_t *g_v2_callback_slot; -/* Saved FS_BASE value captured right after Py_Initialize / warm-up - * finishes. Restored at the head of every v2-callback invocation so - * Python's TLS pointer stays valid even if something in the dispatch - * preamble (dispatch_prepare's MSR restore, Hyperlight's own - * save/restore of segment state) leaves FS_BASE pointing elsewhere. - */ static uint64_t g_py_fsbase; static inline uint64_t rdmsr_fsbase(void) @@ -158,7 +168,6 @@ static int run_code_with_exceptions(const char *code) if (!m) return 1; PyObject *d = PyModule_GetDict(m); if (!d) return 1; - PyObject *result = PyRun_String(code, Py_file_input, d, d); if (result) { Py_DECREF(result); @@ -307,14 +316,14 @@ int main(int argc, char **argv, char **envp) if (!g_fc_bytes_slot) { for (char **p = envp; p && *p; p++) { if (!strncmp(*p, "HL_FC_BYTES_PTR=", 16)) - g_fc_bytes_slot = (const uint8_t **)(uintptr_t) - strtoul(*p + 16, NULL, 16); + g_fc_bytes_slot = (const uint8_t **) + parse_hex(*p + 16); else if (!strncmp(*p, "HL_FC_LEN_PTR=", 14)) - g_fc_len_slot = (size_t *)(uintptr_t) - strtoul(*p + 14, NULL, 16); + g_fc_len_slot = (size_t *) + parse_hex(*p + 14); else if (!strncmp(*p, "HL_V2_CALLBACK_PTR=", 19)) - g_v2_callback_slot = (hl_dispatch_fn_t *)(uintptr_t) - strtoul(*p + 19, NULL, 16); + g_v2_callback_slot = (hl_dispatch_fn_t *) + parse_hex(*p + 19); } if (!g_fc_bytes_slot || !g_fc_len_slot || !g_v2_callback_slot) { From 0159b3e5dda51ce7995bfcde5b36ac9f3c16dbd1 Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 15:39:17 +0000 Subject: [PATCH 04/18] feat(python-agent-driver): add subprocess demos and rootfs Signed-off-by: danbugs --- examples/python-agent-driver/Dockerfile | 34 +++++++++++++++++++ examples/python-agent-driver/demo_busybox.py | 22 ++++++++++++ .../python-agent-driver/demo_pip_install.py | 17 ++++++++++ 3 files changed, 73 insertions(+) create mode 100644 examples/python-agent-driver/demo_busybox.py create mode 100644 examples/python-agent-driver/demo_pip_install.py diff --git a/examples/python-agent-driver/Dockerfile b/examples/python-agent-driver/Dockerfile index 82f8076..69f15ba 100644 --- a/examples/python-agent-driver/Dockerfile +++ b/examples/python-agent-driver/Dockerfile @@ -48,6 +48,8 @@ RUN set -eux; \ find /deps -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true; \ find /deps -type f -name '*.pyc' -delete 2>/dev/null || true; \ find /deps -name '*.so*' -exec strip --strip-unneeded {} + 2>/dev/null || true +# Download a small wheel for the pip-install demo +RUN pip download --no-deps --dest /wheels six # Stage 2: build hl_pydriver against the SAME Python 3.12-from-source # that produces local-python-base, so the glibc/libpython3.12.so ABI @@ -71,6 +73,17 @@ COPY --from=deps /deps /usr/local/lib/python3.12/site-package COPY --from=driver-build /src/hl_pydriver /bin/hl_pydriver COPY pydoc_stub.py /usr/local/lib/python3.12/pydoc.py +# pip: the python-base image strips pip for size; bring it back from the +# deps stage (python:3.12-slim) so `python3 -m pip install` works as a +# subprocess. +COPY --from=deps /usr/local/lib/python3.12/site-packages/pip \ + /usr/local/lib/python3.12/site-packages/pip + +# stdlib modules that python-base strips but pip needs at runtime +COPY --from=deps /usr/local/lib/python3.12/xmlrpc \ + /usr/local/lib/python3.12/xmlrpc + + # Stage 4: pack CPIO. FROM alpine:3.20 AS cpio RUN apk add --no-cache cpio findutils ca-certificates @@ -88,4 +101,25 @@ RUN mkdir -p /rootfs/etc/ssl/certs /rootfs/usr/lib/ssl && \ cp /etc/ssl/certs/ca-certificates.crt /rootfs/etc/ssl/certs/ && \ ln -sf /etc/ssl/certs/ca-certificates.crt /rootfs/usr/lib/ssl/cert.pem +# pip configuration: disable version-check (no internet during warm-up) +RUN mkdir -p /rootfs/etc && \ + printf '[global]\ndisable-pip-version-check = true\n' > /rootfs/etc/pip.conf + +# /tmp for pip's temp files during install +RUN mkdir -p /rootfs/tmp + +# Pre-downloaded wheels for the pip-install demo +COPY --from=deps /wheels /rootfs/wheels + +# Busybox: use the static-PIE build from the shell-base image. +# Alpine's busybox-static is ET_EXEC (non-PIE) which the elfloader +# rejects; the shell-base image has a static-PIE (ET_DYN) build. +COPY --from=ghcr.io/hyperlight-dev/hyperlight-unikraft/shell-base:latest \ + /bin/busybox /rootfs/bin/busybox +RUN for cmd in sh echo ls cat grep find wc head tail sort cut sed awk \ + cp mv rm mkdir rmdir ln basename dirname env sleep date \ + hostname id uname whoami which test true tr uniq tee xargs; do \ + ln -sf busybox /rootfs/bin/$cmd; \ + done + RUN cd /rootfs && find . | cpio -o -H newc > /output.cpio 2>/dev/null diff --git a/examples/python-agent-driver/demo_busybox.py b/examples/python-agent-driver/demo_busybox.py new file mode 100644 index 0000000..7bdebbf --- /dev/null +++ b/examples/python-agent-driver/demo_busybox.py @@ -0,0 +1,22 @@ +import subprocess + +cmds = [ + (["echo", "hello from hyperlight guest"], None), + (["uname", "-a"], None), + (["ls", "/bin"], None), + (["grep", "nameserver", "/etc/resolv.conf"], None), + (["find", "/etc", "-name", "*.conf"], None), + (["wc", "-l", "/etc/resolv.conf"], None), + (["sh", "-c", "echo hello from sh"], None), +] + +for cmd, stdin in cmds: + label = " ".join(cmd) + print(f"\n$ {label}") + r = subprocess.run(cmd, capture_output=True, text=True, input=stdin) + if r.stdout: + print(r.stdout.rstrip()) + if r.stderr: + print(f"stderr: {r.stderr.rstrip()}") + if r.returncode != 0: + print(f"exit code: {r.returncode}") diff --git a/examples/python-agent-driver/demo_pip_install.py b/examples/python-agent-driver/demo_pip_install.py new file mode 100644 index 0000000..8e5ef31 --- /dev/null +++ b/examples/python-agent-driver/demo_pip_install.py @@ -0,0 +1,17 @@ +import subprocess, sys, os + +target = "/tmp/pypackages" +os.makedirs(target, exist_ok=True) + +result = subprocess.run( + [sys.executable, "-m", "pip", "install", "--target", target, "six"], + capture_output=True, text=True, +) +print(result.stdout) +if result.returncode != 0: + print(result.stderr) + sys.exit(result.returncode) + +sys.path.insert(0, target) +import six +print(f"Installed and imported six {six.__version__}") From cb1a907bab56190bd6d0458698628df2252d73dc Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 15:39:21 +0000 Subject: [PATCH 05/18] ci: add subprocess demo tests to regression gate Signed-off-by: danbugs --- .github/workflows/test-examples.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index d372ee3..3cccac3 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -946,6 +946,32 @@ jobs: exit 1 } + - name: pyhl run (busybox subprocess demo) + if: runner.os == 'Windows' || steps.kvm_check.outputs.available == 'true' + shell: pwsh + run: | + $out = pyhl run examples/python-agent-driver/demo_busybox.py 2>&1 + Write-Host $out + if ($out -match 'hello from hyperlight guest') { + Write-Host "PASS: busybox subprocess demo" + } else { + Write-Error "FAIL: did not match /hello from hyperlight guest/" + exit 1 + } + + - name: pyhl run (pip install subprocess demo) + if: runner.os == 'Windows' || steps.kvm_check.outputs.available == 'true' + shell: pwsh + run: | + $out = pyhl run --net examples/python-agent-driver/demo_pip_install.py 2>&1 + Write-Host $out + if ($out -match 'Installed and imported six') { + Write-Host "PASS: pip install subprocess demo" + } else { + Write-Error "FAIL: did not match /Installed and imported six/" + exit 1 + } + test-examples-passed: if: always() needs: From 89c6afb7a130af85a7089eaf805d35fb762228e1 Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 16:18:56 +0000 Subject: [PATCH 06/18] fix(python-agent-driver): build base images automatically in just rootfs Signed-off-by: danbugs --- examples/python-agent-driver/Justfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/python-agent-driver/Justfile b/examples/python-agent-driver/Justfile index 2414c98..43e185b 100644 --- a/examples/python-agent-driver/Justfile +++ b/examples/python-agent-driver/Justfile @@ -30,6 +30,10 @@ run-5: [unix] rootfs: + docker build --target base -t local-python-base-dev:latest \ + -f ../../runtimes/python.Dockerfile ../../runtimes/ + docker build -t local-python-base:latest \ + -f ../../runtimes/python.Dockerfile ../../runtimes/ docker build --platform linux/amd64 --build-arg BASE=local-python-base:latest \ --target cpio -t {{image}}-cpio . - docker rm -f {{image}}-tmp From c930ae6144605035de2f9848f0233ec207789d3f Mon Sep 17 00:00:00 2001 From: danbugs Date: Tue, 30 Jun 2026 22:45:57 +0000 Subject: [PATCH 07/18] test: add urllib GET without timeout CI test Signed-off-by: danbugs --- .github/workflows/test-examples.yml | 6 +++++ examples/networking-py/Dockerfile | 1 + .../networking-py/urllib_get_no_timeout.py | 25 +++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 examples/networking-py/urllib_get_no_timeout.py diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 3cccac3..796931f 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -223,6 +223,9 @@ jobs: - example: networking-py args: "--net -- /urllib_get.py" expect: "SUCCESS: urllib GET worked!" + - example: networking-py + args: "--net -- /urllib_get_no_timeout.py" + expect: "SUCCESS: urllib GET \\(no timeout\\) worked!" - example: networking-py args: "--port 8080 -- /echo_server_test.py" expect: "SUCCESS: bind\\+listen on port 8080 allowed" @@ -613,6 +616,9 @@ jobs: - example: networking-py args: "--net -- /urllib_get.py" expect: "SUCCESS: urllib GET worked!" + - example: networking-py + args: "--net -- /urllib_get_no_timeout.py" + expect: "SUCCESS: urllib GET \\(no timeout\\) worked!" - example: networking-py args: "--port 8080 -- /echo_server_test.py" expect: "SUCCESS: bind\\+listen on port 8080 allowed" diff --git a/examples/networking-py/Dockerfile b/examples/networking-py/Dockerfile index c16ba5b..b550171 100644 --- a/examples/networking-py/Dockerfile +++ b/examples/networking-py/Dockerfile @@ -8,6 +8,7 @@ FROM ${BASE} AS rootfs COPY http_get.py /http_get.py COPY echo_server.py /echo_server.py COPY urllib_get.py /urllib_get.py +COPY urllib_get_no_timeout.py /urllib_get_no_timeout.py COPY https_test.py /https_test.py COPY echo_server_test.py /echo_server_test.py diff --git a/examples/networking-py/urllib_get_no_timeout.py b/examples/networking-py/urllib_get_no_timeout.py new file mode 100644 index 0000000..fe937a4 --- /dev/null +++ b/examples/networking-py/urllib_get_no_timeout.py @@ -0,0 +1,25 @@ +"""HTTP GET using urllib WITHOUT an explicit timeout. + +Same as urllib_get.py but omits the timeout= argument to urlopen(). +This exercises the code path used by mxc, where the Unikraft guest +kernel relies on the idle thread's halt_irq callback to poll sockets +via __hl_sleep rather than an explicit timeout-driven poll cycle. +""" +import urllib.request +import sys + +URL = "http://example.com/" + +print(f"Fetching {URL} (no timeout) ...") +try: + with urllib.request.urlopen(URL) as resp: + body = resp.read().decode("utf-8", errors="replace") + print(f"Status: {resp.status}") + print(f"Body length: {len(body)} bytes") + if "Example Domain" in body: + print("SUCCESS: urllib GET (no timeout) worked!") + else: + print("WARNING: unexpected body content") +except Exception as e: + print(f"FAILED: {e}") + sys.exit(1) From 2a8de193df07dd10a14de543fb33fba1a72d2de7 Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 13:44:52 +0000 Subject: [PATCH 08/18] ci: add per-test timeout to Windows runtime tests Signed-off-by: danbugs --- .github/workflows/test-examples.yml | 33 ++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 796931f..0f45097 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -759,16 +759,30 @@ jobs: } } + # Helper: run a command with a per-test timeout (seconds). + function Invoke-WithTimeout { + param([int]$Seconds, [string]$Exe, [string[]]$ArgList) + $outFile = Join-Path $env:RUNNER_TEMP 'hl-test-out.log' + $proc = Start-Process -FilePath $Exe -ArgumentList $ArgList ` + -NoNewWindow -RedirectStandardOutput $outFile -RedirectStandardError "$outFile.err" -PassThru + if (-not $proc.WaitForExit($Seconds * 1000)) { + Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue + Write-Host "FAIL: timed out after ${Seconds}s" + Get-Content $outFile -ErrorAction SilentlyContinue + exit 1 + } + $script:out = Get-Content $outFile -Raw -ErrorAction SilentlyContinue + $script:rc = $proc.ExitCode + } + switch ($driver) { 'multifn-test' { - $out = & multifn-test $kernel $cpio 2>&1 - $rc = $LASTEXITCODE + Invoke-WithTimeout -Seconds 60 -Exe 'multifn-test' -ArgList @($kernel, $cpio) } 'pydriver-run' { "print('hello from driver')" | Out-File -Encoding ascii tiny.py $tiny = (Resolve-Path "tiny.py").Path - $out = & pydriver-run $kernel $cpio $tiny 2>&1 - $rc = $LASTEXITCODE + Invoke-WithTimeout -Seconds 120 -Exe 'pydriver-run' -ArgList @($kernel, $cpio, $tiny) } default { $argList = @() @@ -779,16 +793,15 @@ jobs: if ($memory -ne '') { $memArgs = @('-m', $memory) } - $out = & hyperlight-unikraft -q @memArgs ` - $kernel --initrd $cpio @mountArgs @toolArgs @argList 2>&1 - $rc = $LASTEXITCODE + Invoke-WithTimeout -Seconds 120 -Exe 'hyperlight-unikraft' ` + -ArgList (@('-q') + $memArgs + @($kernel, '--initrd', $cpio) + $mountArgs + $toolArgs + $argList) } } - $outStr = ($out | Out-String) + if ($null -eq $out) { $out = '' } Write-Host "=== output (exit=$rc) ===" - Write-Host $outStr - if (-not ($outStr -match $expect)) { + Write-Host $out + if (-not ($out -match $expect)) { Write-Host "FAIL: did not match /$expect/" exit 1 } From 5cca497932d40794820abd41a667bd92f2009bf8 Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 16:48:16 +0000 Subject: [PATCH 09/18] fix(kernel): point kraft.yaml at upstream plat-hyperlight Signed-off-by: danbugs --- examples/python-agent-driver/kraft.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/python-agent-driver/kraft.yaml b/examples/python-agent-driver/kraft.yaml index a92b47f..cd1dd19 100644 --- a/examples/python-agent-driver/kraft.yaml +++ b/examples/python-agent-driver/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: python-agent-driver-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: feat/subprocess-support + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' @@ -85,8 +85,8 @@ unikraft: libraries: app-elfloader: - source: https://github.com/danbugs/app-elfloader.git - version: feat/subprocess-support + source: https://github.com/unikraft/app-elfloader.git + version: plat-hyperlight libelf: source: https://github.com/unikraft/lib-libelf.git version: staging From cce29e03f586d372a0d93a1b56f6755a27a6154f Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 16:55:35 +0000 Subject: [PATCH 10/18] fix(python-agent-driver): remove pre-bundled wheel, use toml for pip demo Signed-off-by: danbugs --- examples/python-agent-driver/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/python-agent-driver/Dockerfile b/examples/python-agent-driver/Dockerfile index 69f15ba..cc1c291 100644 --- a/examples/python-agent-driver/Dockerfile +++ b/examples/python-agent-driver/Dockerfile @@ -48,8 +48,6 @@ RUN set -eux; \ find /deps -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true; \ find /deps -type f -name '*.pyc' -delete 2>/dev/null || true; \ find /deps -name '*.so*' -exec strip --strip-unneeded {} + 2>/dev/null || true -# Download a small wheel for the pip-install demo -RUN pip download --no-deps --dest /wheels six # Stage 2: build hl_pydriver against the SAME Python 3.12-from-source # that produces local-python-base, so the glibc/libpython3.12.so ABI From a7f453d5c5609c25d2b3ac410dc2d78514a32bcf Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 17:02:28 +0000 Subject: [PATCH 11/18] fix(python-agent-driver): remove stale COPY of deleted /wheels dir Signed-off-by: danbugs --- examples/python-agent-driver/Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/python-agent-driver/Dockerfile b/examples/python-agent-driver/Dockerfile index cc1c291..e97580e 100644 --- a/examples/python-agent-driver/Dockerfile +++ b/examples/python-agent-driver/Dockerfile @@ -106,9 +106,6 @@ RUN mkdir -p /rootfs/etc && \ # /tmp for pip's temp files during install RUN mkdir -p /rootfs/tmp -# Pre-downloaded wheels for the pip-install demo -COPY --from=deps /wheels /rootfs/wheels - # Busybox: use the static-PIE build from the shell-base image. # Alpine's busybox-static is ET_EXEC (non-PIE) which the elfloader # rejects; the shell-base image has a static-PIE (ET_DYN) build. From c7637faa8c854b6efdaea628936dbdeb45464bba Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 17:03:59 +0000 Subject: [PATCH 12/18] fix(kernel): revert kraft.yaml to fork branches until upstream PRs merge Signed-off-by: danbugs --- examples/python-agent-driver/kraft.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/python-agent-driver/kraft.yaml b/examples/python-agent-driver/kraft.yaml index cd1dd19..a92b47f 100644 --- a/examples/python-agent-driver/kraft.yaml +++ b/examples/python-agent-driver/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: python-agent-driver-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: feat/subprocess-support kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' @@ -85,8 +85,8 @@ unikraft: libraries: app-elfloader: - source: https://github.com/unikraft/app-elfloader.git - version: plat-hyperlight + source: https://github.com/danbugs/app-elfloader.git + version: feat/subprocess-support libelf: source: https://github.com/unikraft/lib-libelf.git version: staging From ba7e738681bbd3357d354b47530f0c0428767e62 Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 17:05:00 +0000 Subject: [PATCH 13/18] fix(kernel): point all examples at upstream plat-hyperlight Signed-off-by: danbugs --- examples/dotnet-http/kraft.yaml | 2 +- examples/dotnet-nativeaot/kraft.yaml | 2 +- examples/dotnet/kraft.yaml | 2 +- examples/go-http/kraft.yaml | 2 +- examples/go/kraft.yaml | 2 +- examples/helloworld-c/kraft.yaml | 2 +- examples/hostfs-posix-c/kraft.yaml | 2 +- examples/hostfs-posix-py/kraft.yaml | 2 +- examples/multifn-c/kraft.yaml | 2 +- examples/networking-py/kraft.yaml | 2 +- examples/nodejs/kraft.yaml | 2 +- examples/powershell/kraft.yaml | 2 +- examples/python-agent-driver/kraft.yaml | 8 ++++---- examples/python-agent/kraft.yaml | 2 +- examples/python-tools/kraft.yaml | 2 +- examples/python/kraft.yaml | 2 +- examples/rust/kraft.yaml | 2 +- examples/shell/kraft.yaml | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/examples/dotnet-http/kraft.yaml b/examples/dotnet-http/kraft.yaml index 9ae8467..37c6ed0 100644 --- a/examples/dotnet-http/kraft.yaml +++ b/examples/dotnet-http/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: dotnet-http-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/dotnet-nativeaot/kraft.yaml b/examples/dotnet-nativeaot/kraft.yaml index fc520c0..f5c2b2d 100644 --- a/examples/dotnet-nativeaot/kraft.yaml +++ b/examples/dotnet-nativeaot/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: dotnet-nativeaot-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/dotnet/kraft.yaml b/examples/dotnet/kraft.yaml index bed8cbb..b2b0a3b 100644 --- a/examples/dotnet/kraft.yaml +++ b/examples/dotnet/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: dotnet-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/go-http/kraft.yaml b/examples/go-http/kraft.yaml index d3853ed..d06b787 100644 --- a/examples/go-http/kraft.yaml +++ b/examples/go-http/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: go-http-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/go/kraft.yaml b/examples/go/kraft.yaml index 6102764..547d6d7 100644 --- a/examples/go/kraft.yaml +++ b/examples/go/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: go-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/helloworld-c/kraft.yaml b/examples/helloworld-c/kraft.yaml index 94b3e4e..36e45f2 100644 --- a/examples/helloworld-c/kraft.yaml +++ b/examples/helloworld-c/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: helloworld-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/hostfs-posix-c/kraft.yaml b/examples/hostfs-posix-c/kraft.yaml index 6b125ff..d2f937f 100644 --- a/examples/hostfs-posix-c/kraft.yaml +++ b/examples/hostfs-posix-c/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: hostfs-posix-c-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/hostfs-posix-py/kraft.yaml b/examples/hostfs-posix-py/kraft.yaml index 15362e2..ec17d14 100644 --- a/examples/hostfs-posix-py/kraft.yaml +++ b/examples/hostfs-posix-py/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: hostfs-posix-py-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/multifn-c/kraft.yaml b/examples/multifn-c/kraft.yaml index d20c2e7..cc98096 100644 --- a/examples/multifn-c/kraft.yaml +++ b/examples/multifn-c/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: multifn-c-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/networking-py/kraft.yaml b/examples/networking-py/kraft.yaml index a486d6c..67531a4 100644 --- a/examples/networking-py/kraft.yaml +++ b/examples/networking-py/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: networking-py-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/nodejs/kraft.yaml b/examples/nodejs/kraft.yaml index beda7b7..4639e1a 100644 --- a/examples/nodejs/kraft.yaml +++ b/examples/nodejs/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: nodejs-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/powershell/kraft.yaml b/examples/powershell/kraft.yaml index 2f006e6..8d3bcc9 100644 --- a/examples/powershell/kraft.yaml +++ b/examples/powershell/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: powershell-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/python-agent-driver/kraft.yaml b/examples/python-agent-driver/kraft.yaml index a92b47f..cd1dd19 100644 --- a/examples/python-agent-driver/kraft.yaml +++ b/examples/python-agent-driver/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: python-agent-driver-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: feat/subprocess-support + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' @@ -85,8 +85,8 @@ unikraft: libraries: app-elfloader: - source: https://github.com/danbugs/app-elfloader.git - version: feat/subprocess-support + source: https://github.com/unikraft/app-elfloader.git + version: plat-hyperlight libelf: source: https://github.com/unikraft/lib-libelf.git version: staging diff --git a/examples/python-agent/kraft.yaml b/examples/python-agent/kraft.yaml index 026d548..d627dc3 100644 --- a/examples/python-agent/kraft.yaml +++ b/examples/python-agent/kraft.yaml @@ -2,7 +2,7 @@ specification: '0.6' name: python-agent-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/python-tools/kraft.yaml b/examples/python-tools/kraft.yaml index 5911c5d..53de59f 100644 --- a/examples/python-tools/kraft.yaml +++ b/examples/python-tools/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: python-tools-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/python/kraft.yaml b/examples/python/kraft.yaml index fddb088..dba5357 100644 --- a/examples/python/kraft.yaml +++ b/examples/python/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: python-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/rust/kraft.yaml b/examples/rust/kraft.yaml index 1972aae..962a7e9 100644 --- a/examples/rust/kraft.yaml +++ b/examples/rust/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: rust-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform diff --git a/examples/shell/kraft.yaml b/examples/shell/kraft.yaml index 74f59d9..242745b 100644 --- a/examples/shell/kraft.yaml +++ b/examples/shell/kraft.yaml @@ -3,7 +3,7 @@ specification: '0.6' name: shell-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git + source: https://github.com/unikraft/unikraft.git version: plat-hyperlight kconfig: # Platform From 1da206df0f058df98a2f45f22eb680a165f335ef Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 17:15:08 +0000 Subject: [PATCH 14/18] ci: retrigger after upstream signal guard fix Signed-off-by: danbugs From 454309cea2e95e85565b1635ecffbdf58b4aa65b Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 17:21:36 +0000 Subject: [PATCH 15/18] ci: retrigger CI Signed-off-by: danbugs From d7c963acb2fe61f8a59c96a3d11150f2bab3585d Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 17:58:24 +0000 Subject: [PATCH 16/18] fix(kernel): point kraft.yaml at epoll bypass fix branch Signed-off-by: danbugs --- examples/dotnet-http/kraft.yaml | 4 ++-- examples/dotnet-nativeaot/kraft.yaml | 4 ++-- examples/dotnet/kraft.yaml | 4 ++-- examples/go-http/kraft.yaml | 4 ++-- examples/go/kraft.yaml | 4 ++-- examples/helloworld-c/kraft.yaml | 4 ++-- examples/hostfs-posix-c/kraft.yaml | 4 ++-- examples/hostfs-posix-py/kraft.yaml | 4 ++-- examples/multifn-c/kraft.yaml | 4 ++-- examples/networking-py/kraft.yaml | 4 ++-- examples/nodejs/kraft.yaml | 4 ++-- examples/powershell/kraft.yaml | 4 ++-- examples/python-agent-driver/kraft.yaml | 4 ++-- examples/python-agent/kraft.yaml | 4 ++-- examples/python-tools/kraft.yaml | 4 ++-- examples/python/kraft.yaml | 4 ++-- examples/rust/kraft.yaml | 4 ++-- examples/shell/kraft.yaml | 4 ++-- 18 files changed, 36 insertions(+), 36 deletions(-) diff --git a/examples/dotnet-http/kraft.yaml b/examples/dotnet-http/kraft.yaml index 37c6ed0..c3a9f33 100644 --- a/examples/dotnet-http/kraft.yaml +++ b/examples/dotnet-http/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: dotnet-http-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/dotnet-nativeaot/kraft.yaml b/examples/dotnet-nativeaot/kraft.yaml index f5c2b2d..474e015 100644 --- a/examples/dotnet-nativeaot/kraft.yaml +++ b/examples/dotnet-nativeaot/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: dotnet-nativeaot-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' diff --git a/examples/dotnet/kraft.yaml b/examples/dotnet/kraft.yaml index b2b0a3b..c9cef5a 100644 --- a/examples/dotnet/kraft.yaml +++ b/examples/dotnet/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: dotnet-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/go-http/kraft.yaml b/examples/go-http/kraft.yaml index d06b787..91abef6 100644 --- a/examples/go-http/kraft.yaml +++ b/examples/go-http/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: go-http-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/go/kraft.yaml b/examples/go/kraft.yaml index 547d6d7..29cd767 100644 --- a/examples/go/kraft.yaml +++ b/examples/go/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: go-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/helloworld-c/kraft.yaml b/examples/helloworld-c/kraft.yaml index 36e45f2..c5f341a 100644 --- a/examples/helloworld-c/kraft.yaml +++ b/examples/helloworld-c/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: helloworld-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' diff --git a/examples/hostfs-posix-c/kraft.yaml b/examples/hostfs-posix-c/kraft.yaml index d2f937f..1e2dc35 100644 --- a/examples/hostfs-posix-c/kraft.yaml +++ b/examples/hostfs-posix-c/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: hostfs-posix-c-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/hostfs-posix-py/kraft.yaml b/examples/hostfs-posix-py/kraft.yaml index ec17d14..5f005c8 100644 --- a/examples/hostfs-posix-py/kraft.yaml +++ b/examples/hostfs-posix-py/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: hostfs-posix-py-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/multifn-c/kraft.yaml b/examples/multifn-c/kraft.yaml index cc98096..4be1099 100644 --- a/examples/multifn-c/kraft.yaml +++ b/examples/multifn-c/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: multifn-c-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' diff --git a/examples/networking-py/kraft.yaml b/examples/networking-py/kraft.yaml index 67531a4..041cd4d 100644 --- a/examples/networking-py/kraft.yaml +++ b/examples/networking-py/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: networking-py-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/nodejs/kraft.yaml b/examples/nodejs/kraft.yaml index 4639e1a..df444bf 100644 --- a/examples/nodejs/kraft.yaml +++ b/examples/nodejs/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: nodejs-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/powershell/kraft.yaml b/examples/powershell/kraft.yaml index 8d3bcc9..c44a624 100644 --- a/examples/powershell/kraft.yaml +++ b/examples/powershell/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: powershell-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/python-agent-driver/kraft.yaml b/examples/python-agent-driver/kraft.yaml index cd1dd19..ed56a67 100644 --- a/examples/python-agent-driver/kraft.yaml +++ b/examples/python-agent-driver/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: python-agent-driver-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' diff --git a/examples/python-agent/kraft.yaml b/examples/python-agent/kraft.yaml index d627dc3..6493a64 100644 --- a/examples/python-agent/kraft.yaml +++ b/examples/python-agent/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: python-agent-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/python-tools/kraft.yaml b/examples/python-tools/kraft.yaml index 53de59f..99fec23 100644 --- a/examples/python-tools/kraft.yaml +++ b/examples/python-tools/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: python-tools-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/python/kraft.yaml b/examples/python/kraft.yaml index dba5357..c85e359 100644 --- a/examples/python/kraft.yaml +++ b/examples/python/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: python-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/rust/kraft.yaml b/examples/rust/kraft.yaml index 962a7e9..fb0dad1 100644 --- a/examples/rust/kraft.yaml +++ b/examples/rust/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: rust-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/shell/kraft.yaml b/examples/shell/kraft.yaml index 242745b..3181304 100644 --- a/examples/shell/kraft.yaml +++ b/examples/shell/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: shell-hyperlight unikraft: - source: https://github.com/unikraft/unikraft.git - version: plat-hyperlight + source: https://github.com/danbugs/unikraft.git + version: fix/epoll-bypass-guard kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' From 11340a0e9e9e2a36a2ab434f8735f0d9a455d3fd Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 18:27:49 +0000 Subject: [PATCH 17/18] fix(ci): capture stderr in Windows Invoke-WithTimeout hyperlight-unikraft writes guest output to stderr with -q flag. The Linux test merges stderr via 2>&1, but the Windows helper only read stdout. Merge both streams so output matching works on Windows. Signed-off-by: danbugs --- .github/workflows/test-examples.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 0f45097..e17b231 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -769,9 +769,12 @@ jobs: Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue Write-Host "FAIL: timed out after ${Seconds}s" Get-Content $outFile -ErrorAction SilentlyContinue + Get-Content "$outFile.err" -ErrorAction SilentlyContinue exit 1 } - $script:out = Get-Content $outFile -Raw -ErrorAction SilentlyContinue + $stdoutContent = Get-Content $outFile -Raw -ErrorAction SilentlyContinue + $stderrContent = Get-Content "$outFile.err" -Raw -ErrorAction SilentlyContinue + $script:out = "$stdoutContent$stderrContent".Trim() $script:rc = $proc.ExitCode } From 8084df2e7b08b22c51fa4a6bbfbdc766cbffe20a Mon Sep 17 00:00:00 2001 From: danbugs Date: Fri, 3 Jul 2026 19:46:13 +0000 Subject: [PATCH 18/18] fix(kernel): point kraft.yaml at upstream plat-hyperlight PR unikraft/unikraft#1860 (epoll bypass guard) is now merged. Signed-off-by: danbugs --- examples/dotnet-http/kraft.yaml | 4 ++-- examples/dotnet-nativeaot/kraft.yaml | 4 ++-- examples/dotnet/kraft.yaml | 4 ++-- examples/go-http/kraft.yaml | 4 ++-- examples/go/kraft.yaml | 4 ++-- examples/helloworld-c/kraft.yaml | 4 ++-- examples/hostfs-posix-c/kraft.yaml | 4 ++-- examples/hostfs-posix-py/kraft.yaml | 4 ++-- examples/multifn-c/kraft.yaml | 4 ++-- examples/networking-py/kraft.yaml | 4 ++-- examples/nodejs/kraft.yaml | 4 ++-- examples/powershell/kraft.yaml | 4 ++-- examples/python-agent-driver/kraft.yaml | 4 ++-- examples/python-agent/kraft.yaml | 4 ++-- examples/python-tools/kraft.yaml | 4 ++-- examples/python/kraft.yaml | 4 ++-- examples/rust/kraft.yaml | 4 ++-- examples/shell/kraft.yaml | 4 ++-- 18 files changed, 36 insertions(+), 36 deletions(-) diff --git a/examples/dotnet-http/kraft.yaml b/examples/dotnet-http/kraft.yaml index c3a9f33..37c6ed0 100644 --- a/examples/dotnet-http/kraft.yaml +++ b/examples/dotnet-http/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: dotnet-http-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/dotnet-nativeaot/kraft.yaml b/examples/dotnet-nativeaot/kraft.yaml index 474e015..f5c2b2d 100644 --- a/examples/dotnet-nativeaot/kraft.yaml +++ b/examples/dotnet-nativeaot/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: dotnet-nativeaot-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' diff --git a/examples/dotnet/kraft.yaml b/examples/dotnet/kraft.yaml index c9cef5a..b2b0a3b 100644 --- a/examples/dotnet/kraft.yaml +++ b/examples/dotnet/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: dotnet-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/go-http/kraft.yaml b/examples/go-http/kraft.yaml index 91abef6..d06b787 100644 --- a/examples/go-http/kraft.yaml +++ b/examples/go-http/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: go-http-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/go/kraft.yaml b/examples/go/kraft.yaml index 29cd767..547d6d7 100644 --- a/examples/go/kraft.yaml +++ b/examples/go/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: go-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/helloworld-c/kraft.yaml b/examples/helloworld-c/kraft.yaml index c5f341a..36e45f2 100644 --- a/examples/helloworld-c/kraft.yaml +++ b/examples/helloworld-c/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: helloworld-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' diff --git a/examples/hostfs-posix-c/kraft.yaml b/examples/hostfs-posix-c/kraft.yaml index 1e2dc35..d2f937f 100644 --- a/examples/hostfs-posix-c/kraft.yaml +++ b/examples/hostfs-posix-c/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: hostfs-posix-c-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/hostfs-posix-py/kraft.yaml b/examples/hostfs-posix-py/kraft.yaml index 5f005c8..ec17d14 100644 --- a/examples/hostfs-posix-py/kraft.yaml +++ b/examples/hostfs-posix-py/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: hostfs-posix-py-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/multifn-c/kraft.yaml b/examples/multifn-c/kraft.yaml index 4be1099..cc98096 100644 --- a/examples/multifn-c/kraft.yaml +++ b/examples/multifn-c/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: multifn-c-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' diff --git a/examples/networking-py/kraft.yaml b/examples/networking-py/kraft.yaml index 041cd4d..67531a4 100644 --- a/examples/networking-py/kraft.yaml +++ b/examples/networking-py/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: networking-py-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/nodejs/kraft.yaml b/examples/nodejs/kraft.yaml index df444bf..4639e1a 100644 --- a/examples/nodejs/kraft.yaml +++ b/examples/nodejs/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: nodejs-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/powershell/kraft.yaml b/examples/powershell/kraft.yaml index c44a624..8d3bcc9 100644 --- a/examples/powershell/kraft.yaml +++ b/examples/powershell/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: powershell-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/python-agent-driver/kraft.yaml b/examples/python-agent-driver/kraft.yaml index ed56a67..cd1dd19 100644 --- a/examples/python-agent-driver/kraft.yaml +++ b/examples/python-agent-driver/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: python-agent-driver-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: CONFIG_PLAT_HYPERLIGHT: 'y' CONFIG_PAGING: 'n' diff --git a/examples/python-agent/kraft.yaml b/examples/python-agent/kraft.yaml index 6493a64..d627dc3 100644 --- a/examples/python-agent/kraft.yaml +++ b/examples/python-agent/kraft.yaml @@ -2,8 +2,8 @@ specification: '0.6' name: python-agent-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/python-tools/kraft.yaml b/examples/python-tools/kraft.yaml index 99fec23..53de59f 100644 --- a/examples/python-tools/kraft.yaml +++ b/examples/python-tools/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: python-tools-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/python/kraft.yaml b/examples/python/kraft.yaml index c85e359..dba5357 100644 --- a/examples/python/kraft.yaml +++ b/examples/python/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: python-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/rust/kraft.yaml b/examples/rust/kraft.yaml index fb0dad1..962a7e9 100644 --- a/examples/rust/kraft.yaml +++ b/examples/rust/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: rust-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y' diff --git a/examples/shell/kraft.yaml b/examples/shell/kraft.yaml index 3181304..242745b 100644 --- a/examples/shell/kraft.yaml +++ b/examples/shell/kraft.yaml @@ -3,8 +3,8 @@ specification: '0.6' name: shell-hyperlight unikraft: - source: https://github.com/danbugs/unikraft.git - version: fix/epoll-bypass-guard + source: https://github.com/unikraft/unikraft.git + version: plat-hyperlight kconfig: # Platform CONFIG_PLAT_HYPERLIGHT: 'y'