Commit Graph
12 Commits
Author SHA1 Message Date
cozis d4c2137eaa Add allocation failure injection 2026-01-24 12:12:48 +01:00
cozis bf989864a3 Add random connect() letencies and disk bit corruption 2026-01-24 12:09:28 +01:00
cozis 07bc952cb9 Add fault injection of disk operations 2026-01-24 11:53:38 +01:00
cozis 7306bd1203 Add fault injection for partial read/writes and random send() delays 2026-01-24 11:40:45 +01:00
cozis 18817203bf Add second client to the simulation 2026-01-24 11:23:19 +01:00
Claude 282bb9632f Improve simulation coverage by adding multiple chunk servers
Two changes to improve code coverage in deterministic simulation testing:

1. Add 3 chunk servers (was 1) to match the replication factor
   - This enables testing of chunk replication and chunk-to-chunk
     server communication code paths in chunk_server.c
   - Covers: process_chunk_server_download_*, start_download,
     download_targets_* functions

2. Fix Quakey bug where events targeting a closed descriptor caused
   assertion failures
   - Added remove_events_targeting_desc() to clean up DISCONNECT and
     DATA events when a descriptor is freed
   - Modified desc_free() to accept Sim pointer and call cleanup
   - This was exposed by running multiple chunk servers which create
     more connection activity
2026-01-23 21:25:10 +00:00
Claude 6a3987d418 Fix DFS simulation infinite loop due to time event scheduling issues
Three related issues were causing the simulation to get stuck:

1. Network events (connect, disconnect, send_data) were scheduled with
   relative times instead of absolute times, causing events to be
   scheduled in the past once simulation time exceeded 10-100ms.

2. When DATA events couldn't be fully consumed (receiver buffer full),
   they stayed at their original time, preventing time from advancing.
   Now they are rescheduled to current_time + 10ms.

3. When poll_timeout was 0, WAKEUP events were created at current_time,
   causing an infinite loop where time never advanced. Now timeout=0
   sets timedout immediately without creating an event.
2026-01-23 20:26:52 +00:00
cozis 776f8c1015 Fix scheduling issue where time didn't advance if a host was always ready 2026-01-23 18:37:26 +01:00
cozis bde2d5a1ca Replace LittleFS with MockFS 2026-01-23 17:51:59 +01:00
cozis 028f25b942 Fix signed integer overflow in time calculation 2026-01-17 01:14:51 +01:00
cozis 6ef5e1a94c Fix simulation setup 2026-01-16 19:38:36 +01:00
cozis c10493881b Add Quakey 2026-01-16 14:45:09 +01:00