mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-18 01:37:10 +01:00
test(pjdfstest): check the sudo'd mount with ps, not kill -0 (#12673)
sudo switches its real uid to root while it starts, so kill -0 from the invoking user fails with EPERM even though the mount process is alive, and the wait loop reported "weed mount exited early" a few milliseconds after starting it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f0f3811bf
commit
1e31c6dbf5
1 file changed
+3
-1
@@ -104,7 +104,9 @@ for i in $(seq 1 60); do
|
||||
if mountpoint -q "${MOUNT_DIR}"; then
|
||||
break
|
||||
fi
|
||||
if ! kill -0 "${mount_pid}" 2>/dev/null; then
|
||||
# Not kill -0: sudo briefly runs with a root real uid while starting, so
|
||||
# signalling it fails with EPERM even though it is alive.
|
||||
if ! ps -p "${mount_pid}" >/dev/null; then
|
||||
echo "weed mount exited early; log tail:" >&2
|
||||
tail -n 100 "${LOG_DIR}/mount.log" >&2 || true
|
||||
exit 1
|
||||
|
||||
Reference in new issue
Block a user