Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca_checkpoint_safety_test.cc File Reference

Phase 17 safety/compression/async/delta tests for ca-checkpoint.H. More...

#include <atomic>
#include <chrono>
#include <cstdint>
#include <thread>
#include <cstdlib>
#include <cstring>
#include <filesystem>
#include <fstream>
#include <random>
#include <string>
#include <vector>
#include <sys/wait.h>
#include <unistd.h>
#include <gtest/gtest.h>
#include <ca-checkpoint-compress.H>
#include <ca-checkpoint.H>
#include <tpl_ca_engine.H>
#include <tpl_ca_lattice.H>
#include <tpl_ca_neighborhood.H>
#include <tpl_ca_rule.H>
#include <tpl_ca_storage.H>
#include <tpl_ca_stochastic_rules.H>
Include dependency graph for ca_checkpoint_safety_test.cc:

Go to the source code of this file.

Functions

 TEST (CACheckpointSafety, CompressedRoundTripMatchesRaw)
 
 TEST (CACheckpointSafety, CrashInjectionPreservesOriginalContents)
 
 TEST (CACheckpointSafety, CrashInjectionDoesNotPublishNewFile)
 
 TEST (CACheckpointSafety, AsyncWriterPersistsAllSubmitted)
 
 TEST (CACheckpointSafety, AsyncWriterDropOldestActuallyDrops)
 
 TEST (CACheckpointSafety, SparseCompressionRatioExceedsFourX)
 
 TEST (CACheckpointSafety, V1ReaderAcceptsLegacyFile)
 
 TEST (CACheckpointSafety, DeltaRoundTripMatchesFullSnapshot)
 
 TEST (CACheckpointSafety, InspectRejectsCellCountExtentMismatch)
 
 TEST (CACheckpointSafety, LoadRejectsOversizedPayloadWithoutHugeAllocation)
 

Detailed Description

Phase 17 safety/compression/async/delta tests for ca-checkpoint.H.

Coverage:

  • Compressed round-trip matches the raw round-trip.
  • Atomic-rename leaves any pre-existing target intact when the process dies between fsync and rename (POSIX only).
  • Background writer persists every submitted task by flush().
  • Queue_Policy::Drop_Oldest actually drops entries.
  • DEFLATE compression ratio comfortably exceeds 4× on a sparse binary 1024² grid.
  • The reader still accepts hand-crafted v1 files (Phase 15 backward compatibility).
  • Delta snapshots round-trip when applied on top of the baseline.

Definition in file ca_checkpoint_safety_test.cc.

Function Documentation

◆ TEST() [1/10]

TEST ( CACheckpointSafety  ,
AsyncWriterDropOldestActuallyDrops   
)

◆ TEST() [2/10]

TEST ( CACheckpointSafety  ,
AsyncWriterPersistsAllSubmitted   
)

◆ TEST() [3/10]

◆ TEST() [4/10]

TEST ( CACheckpointSafety  ,
CrashInjectionDoesNotPublishNewFile   
)

◆ TEST() [5/10]

TEST ( CACheckpointSafety  ,
CrashInjectionPreservesOriginalContents   
)

◆ TEST() [6/10]

◆ TEST() [7/10]

TEST ( CACheckpointSafety  ,
InspectRejectsCellCountExtentMismatch   
)

◆ TEST() [8/10]

TEST ( CACheckpointSafety  ,
LoadRejectsOversizedPayloadWithoutHugeAllocation   
)

◆ TEST() [9/10]

TEST ( CACheckpointSafety  ,
SparseCompressionRatioExceedsFourX   
)

◆ TEST() [10/10]