Conservative SmartOS global-zone memory pressure guard with dry-run-first policy and SMF integration.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

32 Zeilen
2.5 KiB

  1. gcc -std=c99 -O1 -g -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -Isrc -Wall -Wextra -Werror -Wformat=2 -pedantic -pthread -o test-guard tests/test_guard.c src/core.c src/config.c
  2. gcc -std=c99 -O1 -g -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -Isrc -Wall -Wextra -Werror -Wformat=2 -pedantic -pthread -o test-runtime tests/test_runtime.c src/core.c src/config.c
  3. sh tests/test_distribution.sh
  4. PASS distribution defaults to ACTION_MODE dry-run; production SMF does not force it
  5. ./test-guard
  6. PASS strict configuration, safe defaults, explicit UUID authorization
  7. PASS mandatory protections, PID reuse and zone incarnation identity
  8. PASS timestamped 5/15/60s windows, missing data, signed growth, overflow
  9. PASS all six states, monotonic overruns, threshold jumps, corroboration and recovery
  10. PASS pageout_deadman_real_incident_2026_09 exits NORMAL before minfree
  11. PASS successful_pageout_deadman_avoidance_2026_09_21 incident fixture
  12. SIMULATED t=100 state=CRITICAL UUID=11111111-1111-4111-8111-111111111111 pid=123 WOULD_ACTION=SIGTERM
  13. SIMULATED t=105 state=CRITICAL pid=123 WOULD_ACTION=SIGKILL reason=memory_not_recovered
  14. SIMULATED state=EMERGENCY floor=1 WOULD_ACTION=SIGKILL reason=floor
  15. PASS TERM/KILL sequencing, emergency grace, floor, cooldown, budgets and no-action protections
  16. PASS 175 checks; no native backend linked, no signals sent
  17. ./test-runtime
  18. PASS actual daemon dry-run path records WOULD_ACTION=SIGTERM/SIGKILL; zero real requests
  19. PASS continuous sample contract and 5/15/60 deltas for commitment, physical swap and pageout
  20. PASS armed-path mock requests, explicit warmup, stale cache, logging/sampling failures, stop and fresh floor
  21. PASS global score uses process RSS/growth; protected zones and global zone excluded
  22. PASS SmartOS fixture produces a global cross-zone top-3 and bounded zone context
  23. PASS incomplete scan preserves cache; emergency uses O(1) fallback without a new walk
  24. PASS PID/start-time reuse rejects rank 1 and selects cached fallback
  25. PASS selective native syslog ident/facility/severity, exclusions, signal ordering, disable and failure isolation
  26. PASS panic32 fault: logger/syslog stopped 180s, stale cache revalidated, signal dispatch <100ms
  27. PASS stalled/incomplete scanner cannot delay or trigger a rescue-path proc scan
  28. PASS 16-entry stale rescue cache supplies all 8 EMERGENCY victims without scan
  29. PASS 16-entry stale rescue cache supplies all 12 FLOOR victims without scan
  30. PASS saturated/locked event queue drops telemetry without delaying the signal
  31. PASS 501 runtime checks; all platform calls mocked, no signals sent