From b9105c35e54c06e9e8e810b825d72b6305f7a49a Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 15 Nov 2024 17:21:43 -0800 Subject: [PATCH] lntest: print node PID when launching in itests In this commit, we start to print the PID of node's we created within an itest. This is useful when debugging itests with `dlv` by attaching to a given node. By printing out the PID, we facilitate such debugging attempts. --- lntest/node/harness_node.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lntest/node/harness_node.go b/lntest/node/harness_node.go index ea4664a50..9ef1f212c 100644 --- a/lntest/node/harness_node.go +++ b/lntest/node/harness_node.go @@ -399,6 +399,9 @@ func (hn *HarnessNode) StartLndCmd(ctxb context.Context) error { return err } + pid := hn.cmd.Process.Pid + hn.T.Logf("Starting node (name=%v) with PID=%v", hn.Cfg.Name, pid) + return nil }