vasilito
8d4818b94b
phase 5.4: add unit tests + selftest to verify-collision-detection
...
Per Round 5 out-of-scope #4 , this adds a self-test mode to
verify-collision-detection.py. The selftest covers the algorithm's
edge cases:
1. exact match (cfg == install) collision=True
2. parent-dir prefix (install under cfg) collision=True
3. /etc/init.d override of init.d safe
4. /etc/environment.d override of env.d safe
5. non-overlapping names no collision
6. parent of subpath (e.g. /etc vs /etc/foo) collision=True
7. two siblings (same prefix) no collision
8. /etc/init.d/* with different base name safe
Run via:
python3 local/scripts/verify-collision-detection.py --selftest
The selftest is wired into local/scripts/pre-push-checks.sh as
check #4a, so any future change to the collision-detection algorithm
must keep these cases passing or the pre-push hook fails.
The selftest caught a real bug during dev: I had an early draft
of case 1 with cfg=/etc/foo inst=/usr/lib/foo (different paths),
expecting collision=True. The actual algorithm correctly returned
False (no overlap). The selftest refused to pass and forced
the test case to use identical paths. This is exactly the kind
of regression the test was designed to catch.
2026-07-12 10:18:23 +03:00
..
2026-06-19 11:47:25 +03:00
2026-07-01 00:32:52 +03:00
2026-06-19 11:47:25 +03:00
2026-07-11 17:02:30 +03:00
2026-07-05 22:50:33 +03:00
2026-05-02 01:41:17 +01:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-04-28 06:18:37 +01:00
2026-07-12 09:36:54 +03:00
2026-04-16 12:45:24 +01:00
2026-07-12 09:23:10 +03:00
2026-05-02 22:09:36 +01:00
2026-07-11 23:18:41 +03:00
2026-07-12 01:35:58 +03:00
2026-04-28 15:10:59 +01:00
2026-07-01 15:01:26 +03:00
2026-07-11 11:20:29 +03:00
2026-05-04 19:21:02 +01:00
2026-06-28 00:01:47 +03:00
2026-06-19 11:47:25 +03:00
2026-05-02 22:09:36 +01:00
2026-06-21 15:15:57 +03:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-06-28 00:01:47 +03:00
2026-07-05 22:50:33 +03:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-05-03 23:03:24 +01:00
2026-04-16 12:45:24 +01:00
2026-04-18 17:59:15 +01:00
2026-04-18 01:09:13 +01:00
2026-06-19 11:47:25 +03:00
2026-04-18 17:59:15 +01:00
2026-04-16 12:45:24 +01:00
2026-05-03 23:03:24 +01:00
2026-06-19 11:47:25 +03:00
2026-04-18 00:57:57 +01:00
2026-04-17 23:46:20 +01:00
2026-04-30 18:47:03 +01:00
2026-04-18 01:09:29 +01:00
2026-06-19 11:47:25 +03:00
2026-06-29 19:34:35 +03:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-04-16 12:45:24 +01:00
2026-07-12 10:18:23 +03:00
2026-04-16 12:45:24 +01:00
2026-05-02 01:41:17 +01:00
2026-07-12 02:38:12 +03:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-07-01 22:02:26 +03:00
2026-07-05 02:37:54 +03:00
2026-06-28 00:01:47 +03:00
2026-06-19 11:47:25 +03:00
2026-04-28 08:07:14 +01:00
2026-05-03 23:03:24 +01:00
2026-04-16 12:45:24 +01:00
2026-06-19 11:47:25 +03:00
2026-04-28 08:07:14 +01:00
2026-04-16 12:45:24 +01:00
2026-04-28 12:54:31 +01:00
2026-07-11 23:18:41 +03:00
2026-07-12 01:42:30 +03:00
2026-04-18 17:59:15 +01:00
2026-04-18 17:59:15 +01:00
2026-04-26 22:51:09 +01:00
2026-04-16 12:45:24 +01:00
2026-04-16 12:45:24 +01:00
2026-04-29 12:08:09 +01:00
2026-04-19 17:59:58 +01:00
2026-04-18 17:59:15 +01:00
2026-05-01 03:15:20 +01:00
2026-05-08 11:01:02 +01:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-04-29 13:45:39 +01:00
2026-04-16 12:45:24 +01:00
2026-05-01 01:37:27 +01:00
2026-04-26 22:51:09 +01:00
2026-04-22 21:31:19 +01:00
2026-04-20 18:37:35 +01:00
2026-06-19 11:47:25 +03:00
2026-05-04 11:57:48 +01:00
2026-04-20 18:37:35 +01:00
2026-04-29 09:54:06 +01:00
2026-04-29 09:54:06 +01:00
2026-06-19 11:47:25 +03:00
2026-04-29 09:54:06 +01:00
2026-04-29 09:54:06 +01:00
2026-07-09 14:43:10 +03:00
2026-04-18 17:59:15 +01:00
2026-04-29 11:05:22 +01:00
2026-04-29 09:54:06 +01:00
2026-04-18 00:48:58 +01:00
2026-04-20 18:37:35 +01:00
2026-04-29 12:21:17 +01:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-05-04 11:57:48 +01:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-06-19 11:47:25 +03:00
2026-04-29 12:11:13 +01:00
2026-07-07 04:48:31 +03:00
2026-06-19 11:47:25 +03:00
2026-04-14 12:14:50 +01:00
2026-04-16 12:45:24 +01:00
2026-04-16 12:45:24 +01:00
2026-04-16 12:45:24 +01:00
2026-04-29 12:08:09 +01:00
2026-06-19 11:47:25 +03:00
2026-07-07 00:44:30 +03:00
2026-07-12 10:13:12 +03:00
2026-07-11 23:18:41 +03:00
2026-05-03 23:03:24 +01:00
2026-04-23 20:27:13 +01:00
2026-07-09 19:08:34 +03:00
2026-05-02 01:41:17 +01:00
2026-06-19 11:47:25 +03:00
2026-04-16 12:45:24 +01:00
2026-07-12 00:19:30 +03:00
2026-07-12 10:18:23 +03:00
2026-07-10 22:10:33 +03:00
2026-07-11 23:18:41 +03:00
2026-07-12 02:16:15 +03:00
2026-06-19 11:47:25 +03:00
2026-07-12 01:31:03 +03:00
2026-07-12 01:31:03 +03:00
2026-05-02 01:41:17 +01:00
2026-05-02 01:41:17 +01:00
2026-05-03 23:03:24 +01:00