summaryrefslogtreecommitdiff
path: root/tests/initramfs.rs
diff options
context:
space:
mode:
authorHermes Agent <hermes@localhost>2026-08-12 13:35:55 +0000
committerHermes Agent <hermes@localhost>2026-08-12 13:35:55 +0000
commit5debb9e51172745d7e564239ecb37a1d2c4f3a0e (patch)
treecdffe5ff6497d33ce2e68b44abd3f80cab84cc9f /tests/initramfs.rs
parentfeb6e6148cfc8f664bbae6b70cb1c793ef690c5c (diff)
Run native initramfs inside Hasher rooter context
Diffstat (limited to 'tests/initramfs.rs')
-rw-r--r--tests/initramfs.rs29
1 files changed, 24 insertions, 5 deletions
diff --git a/tests/initramfs.rs b/tests/initramfs.rs
index 5ad0b99..85908b2 100644
--- a/tests/initramfs.rs
+++ b/tests/initramfs.rs
@@ -67,15 +67,34 @@ fn make_initrd_adapter_uses_typed_chroot_arguments_and_records_output_digest() {
let result = builder.build(&request).expect("build initramfs");
+ let workdir = rootfs
+ .path()
+ .parent()
+ .expect("rootfs fixture has a parent")
+ .display()
+ .to_string();
assert_eq!(
builder.runner().invocations,
vec![Invocation::new(
- "chroot",
+ "sudo",
[
- rootfs.path().as_os_str().to_owned(),
- "make-initrd".into(),
- "-k".into(),
- "6.12-rt1".into(),
+ "-n",
+ "-u",
+ "hermes",
+ "hsh-run",
+ "--rooter",
+ "--mountpoints=/proc",
+ "--workdir",
+ &workdir,
+ "--",
+ "make-initrd",
+ "-N",
+ "-v",
+ "-k",
+ "6.12-rt1",
+ "AUTODETECT=",
+ "-c",
+ "/etc/initrd.mk.oem",
],
)]
);