mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-12-02 15:22:18 +00:00
2468253ad5
The build lock is a directory created with mkdir, which cannot release itself. A build killed with SIGKILL or by the OOM-killer leaves it behind, and every later build of the same target fails until an operator removes it by hand. No test covered that case. These checks take the lock in a child, confirm a second build is refused by name while the child lives, kill the child with SIGKILL, and assert the lock is recovered. One more holds the boundary that recovery must not widen what a lock excludes: a build of a different checkout still runs beside it. XCAT::NFSLock arrives with them, vendored at build-utils/lib/XCAT/NFSLock.pm beside BuildUtils.pm, because xcat-core builds with no xcat-dep checkout. Its header names the other two copies and records that the three must stay identical. Nothing calls it yet, so these checks fail here. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>