Testing Filesystems with Alcatraz and innitguv
quicrpcrustfilesystems

Testing Filesystems with Alcatraz and innitguv

What is Alcatraz and innitguv

Alcatraz is a vmm, specifically a fork of crosvm.

It automates a bunch of things like downloading a linux bzImage from okLinux and builds a initramfs image.

It does so by reading a alcatraz.rc file.

Keen eyed viewers will realize that initramfs isn’t a real filesystem, which is why alcatraz does the mounting for that particular filesystem. The rest is handled by innitguv.

So what’s innitguv?

innitguv is the guvna of initialization, innit guv?

It handles pid 1 responsiblities, like mounting filesystems and executing processes.

mount -t initramfs /init ../target/debug/innitguv # alcatraz
mount -t initramfs /bin/fstests ../target/debug/fstests # alcatraz 
mount -t 9p -o trans=virtio -o version=9p2000.L branch /tmp/test # innitguv
exec /bin/fstests # innitguv

Alcatraz communicates with innitguv over a JetStream protocol over virtio simply called Control.

#[service(uses(crate::*),tracing)]
pub trait Control {
    /// Mount a file system.
    ///
    /// # Arguments
    /// - `source`  -   Specifies the file system.  e.g. `/dev/sd0`.
    /// - `target` -    Specifies the destination.  e.g. `/mnt`.
    /// - `fstype` -    The file system type, e.g. `ext4`.
    /// - `flags` -     Optional flags controlling the mount.
    /// - `data` -      Optional file system specific data.
    ///
    /// # See Also
    /// [`mount`](https://man7.org/linux/man-pages/man2/mount.2.html)
    async fn mount(
        &self,
        source: Option<String>,
        target: String,
        fstype: Option<String>,
        flags: u64,
        data: Option<String>,
    ) -> Result<()>;
    /// Execute a program and wait for it to exit.
    ///
    /// Mirrors `execve(2)` but spawns a child process instead of replacing.
    ///
    /// # Arguments
    /// - `path` -      The path to the binary to execute.
    /// - `args` -      Argument list (argv), including argv[0].
    /// - `env` -       Environment variables as `KEY=VALUE` pairs.
    ///
    /// # Returns
    /// Exit status plus captured stdout and stderr.
    ///
    /// # See Also
    /// [`execve`](https://man7.org/linux/man-pages/man2/execve.2.html)
    async fn exec(&self, path: String, args: Vec<String>, env: Vec<String>) -> Result<ExecResult>;

    /// Unmount a file system.
    ///
    /// # Arguments
    /// - `target` -    The mount point to unmount.
    ///
    /// # See Also
    /// [`umount`](https://man7.org/linux/man-pages/man2/umount.2.html)
    async fn umount(&self, target: String) -> Result<()>;

    /// Read kernel log messages.
    ///
    /// # See Also
    /// [`dmesg`](https://man7.org/linux/man-pages/man1/dmesg.1.html)
    async fn dmesg(&self) -> Result<Vec<u8>>;

    /// Power off the machine.
    ///
    /// # See Also
    /// [`reboot`](https://man7.org/linux/man-pages/man2/reboot.2.html)
    async fn poweroff(&self) -> Result<()>;
}

Why isn’t it open-source?

It’s a 🐔 and 🥚 problem, it is being used for testing branch.dev functionality, and currently it’s not very useful for anything other than that.

For v1 the plan is to make it a generic I’m developing this feature and I want to test it on linux situation with a custom macro.

#[alcatraz::test]
async fn test_exec() {
    // write some test that will be executed in a VM.
}
© 2026 Devtools Ltd. All rights reserved.
Devtools Ltd is a limited company registered in England (№ 16372953).

Command Palette

Search for a command to run...