fix(chv): 阶段 2 syncd 写路径改到 chv 所有的 /run/chv/syncd/ 子目录
/run/chv 是 0755 root:root,chv 身份的 syncd 写不进状态文件 与 socket,_atomic_write 抛错致进程反复退出、systemctl 长期 activating(2026-11-07 真机实测)。socket 与状态文件改到 tmpfiles 预建的 /run/chv/syncd/(0755 chv:chv,与 chv-browser 的 shots 同款);daemon 的 sync 摘要读同一路径;驱动的 syncd socket 路径与 ls 检查同步更新;另修驱动 SSH poller 线程残留(daemon=True + wake 失败也 set 事件)。
This commit is contained in:
1 parent
9d77ae55a7
commit
8013431f63
4 files changed
+23
-4
No files matched your search
@@ -289,6 +289,21 @@ class SyncdTest(unittest.TestCase):
|
||||
os.makedirs(os.path.join(path, ".git"), exist_ok=True)
|
||||
return path
|
||||
|
||||
def test_syncd_paths_under_chv_owned_subdir(self):
|
||||
# 2026-11-07 真机教训:/run/chv 是 0755 root:root,
|
||||
# chv 身份的 syncd 写不进状态文件与 socket,反复退出、
|
||||
# systemctl 长期 activating。socket 与状态文件须在
|
||||
# chv 所有的 /run/chv/syncd/ 子目录里。
|
||||
self.assertTrue(self.mod.SYNC_SOCK.startswith(
|
||||
"/run/chv/syncd/"))
|
||||
self.assertTrue(self.mod.STATUS_PATH.startswith(
|
||||
"/run/chv/syncd/"))
|
||||
daemon = _load_guest_script("chv-daemon.py")
|
||||
self.assertEqual(daemon.SYNC_STATUS, self.mod.STATUS_PATH)
|
||||
with open(_repo("chv-guest", "build.sh")) as fh:
|
||||
text = fh.read()
|
||||
self.assertIn("d /run/chv/syncd 0755 chv chv -", text)
|
||||
|
||||
def test_resolve_repo_zero_one_many(self):
|
||||
repo, reason = self.mod.resolve_repo(self.mod.WORKSPACE)
|
||||
self.assertIsNone(repo)
|
||||
|
||||
Reference in new issue
Block a user