From 594bf62f55b92b1680586acd0c68539146166d15 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 17 May 2023 21:48:47 +0200 Subject: [PATCH 1/3] test also the virtio network interface --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4dbc383fc..79d58a8192 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,7 +172,7 @@ jobs: - name: Build httpd with DHCP support (debug profile) run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --package httpd --features ci,dhcpv4 - - name: Test httpd with DHCP support (debug profile) + - name: Test httpd with DHCP support (debug, RTL8139) run: | qemu-system-x86_64 -smp 1 -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none -m 128M -serial stdio \ @@ -183,10 +183,21 @@ jobs: sleep 5 curl http://127.0.0.1:9975/help sleep 1 + - name: Test httpd with DHCP support (release, virtio-net) + run: | + qemu-system-x86_64 -smp 1 -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \ + -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none -m 128M -serial stdio \ + -kernel rusty-loader-x86_64 \ + -initrd target/x86_64-unknown-hermit/debug/httpd \ + -netdev user,id=u1,hostfwd=tcp::9975-:9975,net=192.168.76.0/24,dhcpstart=192.168.76.9 \ + -device virtio-net-pci,netdev=u1,disable-legacy=on & + sleep 5 + curl http://127.0.0.1:9975/help + sleep 1 - name: Build httpd with DHCP support (release profile) run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --package httpd --release --features ci,dhcpv4 - - name: Test httpd with DHCP support (release profile) + - name: Test httpd with DHCP support (release, RTL8139) run: | qemu-system-x86_64 -smp 1 -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none -m 128M -serial stdio \ @@ -197,6 +208,17 @@ jobs: sleep 5 curl http://127.0.0.1:9975/help sleep 1 + - name: Test httpd with DHCP support (release, virtio-net) + run: | + qemu-system-x86_64 -smp 1 -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \ + -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none -m 128M -serial stdio \ + -kernel rusty-loader-x86_64 \ + -initrd target/x86_64-unknown-hermit/release/httpd \ + -netdev user,id=u1,hostfwd=tcp::9975-:9975,net=192.168.76.0/24,dhcpstart=192.168.76.9 \ + -device virtio-net-pci,netdev=u1,disable-legacy=on & + sleep 5 + curl http://127.0.0.1:9975/help + sleep 1 - name: Build minimal profile run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --no-default-features --release --package hello_world - name: Test minimal profile From 380d399170f07b704e07cef60bb49cd4f20f5ab1 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 17 May 2023 21:54:07 +0200 Subject: [PATCH 2/3] rename some tests --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79d58a8192..68b8cb131e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,10 +169,10 @@ jobs: -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=root \ -object memory-backend-file,id=mem,size=1G,mem-path=/dev/shm,share=on -numa node,memdev=mem \ -initrd target/x86_64-unknown-hermit/release/rusty_demo - - name: Build httpd with DHCP support (debug profile) + - name: Build httpd with DHCP support (debug ) run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --package httpd --features ci,dhcpv4 - - name: Test httpd with DHCP support (debug, RTL8139) + - name: Test httpd with DHCP support (debug, rtl8139) run: | qemu-system-x86_64 -smp 1 -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none -m 128M -serial stdio \ @@ -194,10 +194,10 @@ jobs: sleep 5 curl http://127.0.0.1:9975/help sleep 1 - - name: Build httpd with DHCP support (release profile) + - name: Build httpd with DHCP support (release) run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --package httpd --release --features ci,dhcpv4 - - name: Test httpd with DHCP support (release, RTL8139) + - name: Test httpd with DHCP support (release, rtl8139) run: | qemu-system-x86_64 -smp 1 -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none -m 128M -serial stdio \ From b5d27c1c5b7b399b9fad18ce32e3e20556adf8fb Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 17 May 2023 22:02:11 +0200 Subject: [PATCH 3/3] increase memory size of the VM to support VirtIO --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68b8cb131e..ff2b90d6a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -183,10 +183,10 @@ jobs: sleep 5 curl http://127.0.0.1:9975/help sleep 1 - - name: Test httpd with DHCP support (release, virtio-net) + - name: Test httpd with DHCP support (debug, virtio-net) run: | qemu-system-x86_64 -smp 1 -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \ - -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none -m 128M -serial stdio \ + -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none -m 512M -serial stdio \ -kernel rusty-loader-x86_64 \ -initrd target/x86_64-unknown-hermit/debug/httpd \ -netdev user,id=u1,hostfwd=tcp::9975-:9975,net=192.168.76.0/24,dhcpstart=192.168.76.9 \ @@ -211,7 +211,7 @@ jobs: - name: Test httpd with DHCP support (release, virtio-net) run: | qemu-system-x86_64 -smp 1 -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \ - -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none -m 128M -serial stdio \ + -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none -m 512M -serial stdio \ -kernel rusty-loader-x86_64 \ -initrd target/x86_64-unknown-hermit/release/httpd \ -netdev user,id=u1,hostfwd=tcp::9975-:9975,net=192.168.76.0/24,dhcpstart=192.168.76.9 \