|
@@ -112,6 +112,17 @@ fn virtio_gpu<T: Transport>(transport: T) {
|
|
|
}
|
|
|
}
|
|
|
gpu.flush().expect("failed to flush");
|
|
|
+
|
|
|
+ //delay some time
|
|
|
+ info!("virtio-gpu show graphics....");
|
|
|
+ for _ in 0..100000 {
|
|
|
+ for _ in 0..100000 {
|
|
|
+ unsafe {
|
|
|
+ core::arch::asm!("nop");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
info!("virtio-gpu test finished");
|
|
|
}
|
|
|
|
|
@@ -127,10 +138,13 @@ fn virtio_input<T: Transport>(transport: T) {
|
|
|
}
|
|
|
|
|
|
fn virtio_net<T: Transport>(transport: T) {
|
|
|
- let mut net = VirtIONet::<HalImpl, T>::new(transport).expect("failed to create net driver");
|
|
|
- let mut buf = [0u8; 0x100];
|
|
|
- let len = net.recv(&mut buf).expect("failed to recv");
|
|
|
- info!("recv: {:?}", &buf[..len]);
|
|
|
- net.send(&buf[..len]).expect("failed to send");
|
|
|
+ let mut _net = VirtIONet::<HalImpl, T>::new(transport).expect("failed to create net driver");
|
|
|
+
|
|
|
+ // TODO: add tests for CI
|
|
|
+
|
|
|
+ //let mut buf = [0u8; 0x100];
|
|
|
+ //let len = net.recv(&mut buf).expect("failed to recv");
|
|
|
+ //info!("recv: {:?}", &buf[..len]);
|
|
|
+ //net.send(&buf[..len]).expect("failed to send");
|
|
|
info!("virtio-net test finished");
|
|
|
}
|