Skip to content

Commit

Permalink
Fix panic during memory testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-garcia committed Oct 1, 2024
1 parent eb0d683 commit f5e9772
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/memory-testing/cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,23 @@
"kdf": {
"argon2id": {
"iterations": 3,
"memory": 4,
"memory": 16,
"parallelism": 1
}
}
},
"memory_lookups": [
{
"name": "Key",
"hex": "3bc0520a0abff0097d521ce0ee5e5b1cee301939a84742623c0c1697d7a4bd46"
"hex": "59079cd7134409c6882c2701de8357a3d8aabb2dad2da19eea5f1b8081dfb51c"
},
{
"name": "Hash B64",
"string": "lHkprdORlICVJ4Umwi94Uz/nATK6Y7If7e+iFoabzh0="
"string": "P1ZT6T80zOfEqXj/kPbtON3yszf7xLNGCxWjdO2xfjU="
},
{
"name": "Hash bytes",
"hex": "947929add391948095278526c22f78533fe70132ba63b21fedefa216869bce1d"
"hex": "3f5653e93f34cce7c4a978ff90f6ed38ddf2b337fbc4b3460b15a374edb17e35"
}
]
},
Expand Down
5 changes: 5 additions & 0 deletions crates/memory-testing/src/bin/capture-dumps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ fn wait_dump_and_continue(
loop {
let mut buf = [0u8; 1024];
let read = stdout.read(&mut buf).unwrap();

if read == 0 {
panic!("Process exited unexpectedly");
}

let buf_str = std::str::from_utf8(&buf[..read]).unwrap();
if buf_str.contains("Waiting for dump...") {
break;
Expand Down

0 comments on commit f5e9772

Please sign in to comment.