Skip to content

Commit 19e5754

Browse files
committed
uefi: Change the test memory device to a temporary file
1 parent 3275853 commit 19e5754

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

xtask/src/qemu.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,12 @@ pub fn run_qemu(arch: UefiArch, opt: &QemuOpt) -> Result<()> {
484484
// Sixth shared memory device used for testing Pci Root Bridge I/O's Copy function.
485485
// This is to provide a PCI device with large enough memory.
486486
cmd.arg("-device");
487-
cmd.arg("ivshmem-plain,memdev=hostmem,id=hostmem");
487+
cmd.arg("ivshmem-plain,memdev=tempmem,id=tempmem");
488488
cmd.arg("-object");
489-
cmd.arg("memory-backend-file,size=1M,share,mem-path=/dev/shm/ivshmem,id=hostmem");
489+
let mut object_args = OsString::from("memory-backend-file,size=1M,id=tempmem,mem-path=");
490+
let ram_path = tmp_dir.join("copy-test.ram");
491+
object_args.push(ram_path);
492+
cmd.arg(object_args);
490493

491494
let qemu_monitor_pipe = Pipe::new(tmp_dir, "qemu-monitor")?;
492495
let serial_pipe = Pipe::new(tmp_dir, "serial")?;

0 commit comments

Comments
 (0)