From 495e66e12bc590079e9f67eac3bd9a9f95e9cad2 Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Tue, 14 Oct 2025 15:32:22 +0300 Subject: [PATCH] fuzz: run rusqlite integrity check after each DML operation --- tests/integration/fuzz/mod.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/integration/fuzz/mod.rs b/tests/integration/fuzz/mod.rs index 803b3046d..1cc99e8ff 100644 --- a/tests/integration/fuzz/mod.rs +++ b/tests/integration/fuzz/mod.rs @@ -2000,6 +2000,19 @@ mod tests { "Different results after mutation! limbo: {limbo_rows:?}, sqlite: {sqlite_rows:?}, seed: {seed}, query: {query}", ); + // Run integrity check on limbo db using rusqlite + if let Err(e) = rusqlite_integrity_check(&limbo_db.path) { + println!("{table_def};"); + for t in indexes.iter() { + println!("{t};"); + } + for t in dml_statements.iter() { + println!("{t};"); + } + println!("{query};"); + panic!("seed: {seed}, error: {e}"); + } + if sqlite_rows.is_empty() { break; }