test(state): mark the checkpoint-guard tests linux_only instead of a bare skipif

AGENTS.md: a bare skipif(sys.platform != linux) is never listed by
scripts/ci/list_os_marked_tests.py, so the tests would run nowhere on the
OS lanes. The marker is the contract.
This commit is contained in:
kshitijk4poor
2026-09-09 11:14:45 +05:30
committed by kshitij
parent 7a4985a814
commit ae94e349ac

View File

@@ -60,10 +60,7 @@ def _unlink_sidecars(db_path: Path) -> None:
os.unlink(sidecar)
@pytest.mark.skipif(
not sys.platform.startswith("linux"),
reason="deleted-WAL write halt uses Linux unlink semantics",
)
@pytest.mark.linux_only # deleted-WAL write halt uses Linux unlink semantics
def test_close_after_halt_runs_no_checkpoint(tmp_path, force_wal):
"""A writer halted by DeletedWalGenerationError must not checkpoint on close()."""
path = tmp_path / "state.db"
@@ -89,10 +86,7 @@ def test_close_after_halt_runs_no_checkpoint(tmp_path, force_wal):
)
@pytest.mark.skipif(
not sys.platform.startswith("linux"),
reason="deleted-WAL write halt uses Linux unlink semantics",
)
@pytest.mark.linux_only # deleted-WAL write halt uses Linux unlink semantics
def test_halt_disables_close_time_checkpoint(tmp_path, force_wal):
"""On 3.12+ the halt must also call _disable_close_time_checkpoint()."""
import sqlite3
@@ -127,10 +121,7 @@ def test_halt_disables_close_time_checkpoint(tmp_path, force_wal):
db.close()
@pytest.mark.skipif(
not sys.platform.startswith("linux"),
reason="deleted-WAL write halt uses Linux unlink semantics",
)
@pytest.mark.linux_only # deleted-WAL write halt uses Linux unlink semantics
def test_try_wal_checkpoint_skips_when_generation_lost(tmp_path, force_wal):
"""The periodic _try_wal_checkpoint() must skip when _db_wal_generation_lost is set."""
path = tmp_path / "state.db"