Skip to content

Commit

Permalink
chore: Call resize2fs on the rootfs directly, without loop device
Browse files Browse the repository at this point in the history
  • Loading branch information
vadorovsky committed May 28, 2024
1 parent 5df85d1 commit 7a0226f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions xtask/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,7 @@ fn test_architest(sh: Shell, options: Options, binary_file: &str) -> Result<()>
download_and_unpack_architest(&tempdir, &architest_tarball)?;

cmd!(sh, "truncate -s +200M rootfs.ext2").run()?;
let loop_dev = cmd!(sh, "sudo losetup -fP --show rootfs.ext2").output()?;
let loop_dev = String::from_utf8(loop_dev.stdout)?;
let loop_dev = loop_dev.trim_end();
cmd!(sh, "sudo resize2fs {loop_dev}").run()?;
cmd!(sh, "sudo losetup -d {loop_dev}").run()?;
cmd!(sh, "sudo resize2fs rootfs.ext2").run()?;

// Run qemu
let mut qemu_process = std::process::Command::new(qemu_cmd)
Expand Down

0 comments on commit 7a0226f

Please sign in to comment.