mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add testing commands for rekeying.
This commit is contained in:
parent
900df7b223
commit
fa984845ed
2 changed files with 14 additions and 0 deletions
|
|
@ -107,4 +107,5 @@ autobasis-ci = []
|
||||||
ditherpunk = ["png"]
|
ditherpunk = ["png"]
|
||||||
tracking-alloc = ["tracking-allocator", "tracing", "tracing-subscriber"]
|
tracking-alloc = ["tracking-allocator", "tracing", "tracing-subscriber"]
|
||||||
dbg-ecupdate = [] # for issuing manual commands to initiate an EC update (vs UX). Also need to enable this feature in the status crate. Intended for debug only.
|
dbg-ecupdate = [] # for issuing manual commands to initiate an EC update (vs UX). Also need to enable this feature in the status crate. Intended for debug only.
|
||||||
|
test-rekey = []
|
||||||
default = [] # "debugprint"
|
default = [] # "debugprint"
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,19 @@ impl<'a> ShellCmdApi<'a> for PddbCmd {
|
||||||
Err(_) => write!(ret, "Error encountered listing dictionaries").ok().unwrap_or(()),
|
Err(_) => write!(ret, "Error encountered listing dictionaries").ok().unwrap_or(()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[cfg(feature="test-rekey")]
|
||||||
|
"rekey" => {
|
||||||
|
let old_dna = if let Some(dna_str) = tokens.next() {
|
||||||
|
dna_str.parse::<u64>().unwrap_or(0)
|
||||||
|
} else {
|
||||||
|
0
|
||||||
|
};
|
||||||
|
log::info!("rekey result: {:?}", self.pddb.rekey_pddb(pddb::PddbRekeyOp::FromDnaFast(old_dna)));
|
||||||
|
}
|
||||||
|
#[cfg(feature="pddbtest")]
|
||||||
|
"dump" => {
|
||||||
|
self.pddb.dbg_dump("full").unwrap();
|
||||||
|
}
|
||||||
#[cfg(feature="pddbtest")]
|
#[cfg(feature="pddbtest")]
|
||||||
"largetest" => {
|
"largetest" => {
|
||||||
// fill memory with junk
|
// fill memory with junk
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue