From 32d3592f6789019434e81d785b41a5be6b0e77a0 Mon Sep 17 00:00:00 2001 From: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Date: Tue, 1 Dec 2026 15:57:01 +1100 Subject: [PATCH] tools/aurora-sep: tests: drop three source-text checks test_boot_locks.py had two tests that only grep the tools for the literal default lock paths, and test_collect_handover.py had one that only greps air-gpu-collect.sh for "chmod 0644" and "mktemp --tmpdir". They fail on any rewording and pass on any equivalent bug. The behaviour they stand for is already run for real in the same files: the Python and shell lockers take and refuse the compat lock, and the collect tests check the tgz mode, its owner and that nothing is left in TMPDIR. Audit 2026-12-01 row 21 (from #2883). Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> --- tools/aurora-sep/tests/test_boot_locks.py | 12 ------------ tools/aurora-sep/tests/test_collect_handover.py | 6 ------ 2 files changed, 18 deletions(-) diff --git a/tools/aurora-sep/tests/test_boot_locks.py b/tools/aurora-sep/tests/test_boot_locks.py index 8df961536bf8e..183ff97717bd0 100644 --- a/tools/aurora-sep/tests/test_boot_locks.py +++ b/tools/aurora-sep/tests/test_boot_locks.py @@ -54,13 +54,6 @@ def lockers(self): return (('esp-history', lambda: ESP.lock([self.boot], [self.compat])), ('m3-boot-profile', lambda: M3.locks([self.boot], 0.2, [self.compat]))) - def test_defaults_name_the_compat_lock_separately(self): - self.assertEqual(ESP.BOOT_LOCK, Path('/run/lock/boot-partition.lock')) - self.assertEqual(ESP.COMPAT_LOCK, Path('/tmp/limine-global.lock')) - text = (TOOLS / 'm3-boot-profile.py').read_text() - self.assertIn("args.lock = [Path('/run/lock/boot-partition.lock')]", text) - self.assertIn("args.compat_lock = args.compat_lock or [Path('/tmp/limine-global.lock')]", text) - def test_missing_compat_lock_is_created_and_locked(self): for name, locker in self.lockers(): with self.subTest(name): @@ -170,11 +163,6 @@ def take(self, then='true'): def probe(self, path): return f"flock -n '{path}' true && echo free || echo busy" - def test_defaults(self): - text = ONESHOT.read_text() - self.assertIn('\nLOCKS="/run/lock/boot-partition.lock"\n', text) - self.assertIn('\nCOMPAT_LOCKS="/tmp/limine-global.lock"\n', text) - def test_missing_compat_lock_is_created_and_held(self): r = self.take(self.probe(self.compat)) self.assertEqual(r.returncode, 0, r.stdout + r.stderr) diff --git a/tools/aurora-sep/tests/test_collect_handover.py b/tools/aurora-sep/tests/test_collect_handover.py index 4b2d0c9d49908..57f4574670074 100644 --- a/tools/aurora-sep/tests/test_collect_handover.py +++ b/tools/aurora-sep/tests/test_collect_handover.py @@ -2,7 +2,6 @@ process with mode 0600, and no copy is left in the temp directory (or anywhere world-readable) when the user's home cannot be written.""" import os -from pathlib import Path import stat import unittest @@ -68,11 +67,6 @@ def test_an_unwritable_home_keeps_a_root_only_copy(self): self.assertEqual(stat.S_IMODE((self.statedir / "collect").stat().st_mode) & 0o077, 0) self.assertIn("readable by root only", proc.stdout) - def test_no_world_readable_hand_over_in_the_script(self): - text = (Path(__file__).resolve().parents[1] / "air-gpu/air-gpu-collect.sh").read_text() - self.assertNotIn("chmod 0644", text) - self.assertNotIn("mktemp --tmpdir", text) - if __name__ == "__main__": unittest.main()