Conservative SmartOS global-zone memory pressure guard with dry-run-first policy and SMF integration.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

28 строки
2.3 KiB

  1. gcc -std=c99 -O1 -g -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -Isrc -Wall -Wextra -Werror -Wformat=2 -pedantic -fsanitize=address,undefined -fno-omit-frame-pointer -o test-sanitize-guard tests/test_guard.c src/core.c src/config.c
  2. ./test-sanitize-guard
  3. PASS strict configuration, safe defaults, explicit UUID authorization
  4. PASS mandatory protections, PID reuse and zone incarnation identity
  5. PASS timestamped 5/15/60s windows, missing data, signed growth, overflow
  6. PASS all six states, monotonic overruns, threshold jumps, corroboration and recovery
  7. PASS pageout_deadman_real_incident_2026_09 exits NORMAL before minfree
  8. PASS successful_pageout_deadman_avoidance_2026_09_21 incident fixture
  9. SIMULATED t=100 state=CRITICAL UUID=11111111-1111-4111-8111-111111111111 pid=123 WOULD_ACTION=SIGTERM
  10. SIMULATED t=105 state=CRITICAL pid=123 WOULD_ACTION=SIGKILL reason=memory_not_recovered
  11. SIMULATED state=EMERGENCY floor=1 WOULD_ACTION=SIGKILL reason=floor
  12. PASS TERM/KILL sequencing, emergency grace, floor, cooldown, budgets and no-action protections
  13. PASS 175 checks; no native backend linked, no signals sent
  14. gcc -std=c99 -O1 -g -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -Isrc -Wall -Wextra -Werror -Wformat=2 -pedantic -fsanitize=address,undefined -fno-omit-frame-pointer -o test-sanitize-runtime tests/test_runtime.c src/core.c src/config.c
  15. ./test-sanitize-runtime
  16. PASS actual daemon dry-run path records WOULD_ACTION=SIGTERM/SIGKILL; zero real requests
  17. PASS continuous sample contract and 5/15/60 deltas for commitment, physical swap and pageout
  18. PASS armed-path mock requests, explicit warmup, stale cache, logging/sampling failures, stop and fresh floor
  19. PASS global score uses process RSS/growth; protected zones and global zone excluded
  20. PASS SmartOS fixture produces a global cross-zone top-3 and bounded zone context
  21. PASS incomplete scan preserves cache; emergency uses O(1) fallback without a new walk
  22. PASS PID/start-time reuse rejects rank 1 and selects cached fallback
  23. PASS selective native syslog ident/facility/severity, exclusions, signal ordering, disable and failure isolation
  24. PASS 180 runtime checks; all platform calls mocked, no signals sent
  25. LeakSanitizer was intentionally disabled because the supervised environment rejects ptrace; no leak-check result is claimed.
  26. ASAN_OPTIONS=detect_leaks=0 gmake test-sanitize
  27. GCC AddressSanitizer + UndefinedBehaviorSanitizer