[pvmfw] Move assembly wrappers to vmbase for reuse
In both pvmfw and rialo.
Test: atest libpvmfw.bootargs.test
Test: m pvmfw_img
Bug: 282928116
Change-Id: If93cfca26cddcc27aca15baae85a0f7609160c42
diff --git a/pvmfw/src/bootargs.rs b/pvmfw/src/bootargs.rs
index f9c8278..e4b1b65 100644
--- a/pvmfw/src/bootargs.rs
+++ b/pvmfw/src/bootargs.rs
@@ -106,14 +106,14 @@
}
#[cfg(test)]
-#[allow(dead_code)]
-mod helpers;
-
-#[cfg(test)]
mod tests {
-
use super::*;
- use crate::cstr;
+
+ macro_rules! cstr {
+ ($str:literal) => {{
+ core::ffi::CStr::from_bytes_with_nul(concat!($str, "\0").as_bytes()).unwrap()
+ }};
+ }
fn check(raw: &CStr, expected: Result<&[(&str, Option<&str>)], ()>) {
let actual = BootArgsIterator::new(raw);