Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test for the network interface of qemu micro vm #904

Closed
wants to merge 7 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 37 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ jobs:
FREQ=`grep 'cpu MHz' /proc/cpuinfo | head -1 | awk -F: '{print $2}' | awk '{printf("%d\n",$1 + 0.5)}'`
echo "FREQ = $FREQ"
qemu-system-x86_64 \
-M microvm,x-option-roms=off,pit=off,pic=off,rtc=on \
-global virtio-mmio.force-legacy=on -nodefaults -no-user-config \
-M microvm,x-option-roms=off,pit=off,pic=off,rtc=on,pcie=on,ioapic2=off \
-global virtio-mmio.force-legacy=false \
-nodefaults -no-user-config \
-display none -smp 1 -m 64M -serial stdio \
-kernel rusty-loader-x86_64 \
-initrd target/x86_64-unknown-hermit/release/hello_world \
Expand Down Expand Up @@ -416,6 +417,40 @@ jobs:
-enable-kvm -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \
-kernel rusty-loader-x86_64 \
-initrd target/x86_64-unknown-hermit/release/rusty_demo
- name: Build minimal httpd with DHCP support (debug, virtio-net)
run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --package httpd --no-default-features --features ci,dhcpv4,tcp
- name: Test minimal httpd with DHCP support (debug, virtio-net)
run: |
qemu-system-x86_64 -smp 1 -enable-kvm -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \
-M microvm,x-option-roms=off,pit=off,pic=off,rtc=on,pcie=on \
-global virtio-mmio.force-legacy=false \
-nodefaults -no-user-config \
-display none -m 256M -serial stdio \
-kernel rusty-loader-x86_64 \
-initrd target/x86_64-unknown-hermit/debug/httpd \
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
-netdev user,id=u1,hostfwd=tcp::9975-:9975,net=192.168.76.0/24,dhcpstart=192.168.76.9 \
-device virtio-net-device,netdev=u1 &
sleep 5
curl http://127.0.0.1:9975/help
sleep 1
- name: Build minimal httpd with DHCP support (debug, virtio-net)
run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --package httpd --release --no-default-features --features ci,dhcpv4,tcp
- name: Test minimal httpd with DHCP support (release, virtio-net)
run: |
qemu-system-x86_64 -smp 1 -enable-kvm -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \
-M microvm,x-option-roms=off,pit=off,pic=off,rtc=on,pcie=on \
-global virtio-mmio.force-legacy=false \
-nodefaults -no-user-config \
-display none -m 256M -serial stdio \
-kernel rusty-loader-x86_64 \
-initrd target/x86_64-unknown-hermit/release/httpd \
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
-netdev user,id=u1,hostfwd=tcp::9975-:9975,net=192.168.76.0/24,dhcpstart=192.168.76.9 \
-device virtio-net-device,netdev=u1 &
sleep 5
curl http://127.0.0.1:9975/help
sleep 1
- name: Build minimal profile (debug)
run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --no-default-features --package hello_world
- name: Test debug profile (Firecracker)
Expand Down