Comparison-Based System-Level Fault Diagnosis in Ad-Hoc Networks