diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-18 17:46:10 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-18 17:46:10 +0900 |
| commit | 189376727e42147715e9dca58d09644c2eaa21bb (patch) | |
| tree | 64d17c99b4765bae1bcf4e17db36e619f340a01f /internal/testsuite | |
| parent | 7d4dac3b6cc8624719bad4767c7596ae6d6cb3ab (diff) | |
internal/testsuite: drop ESRCH on detach
Getting ESRCH here is harmless, and has the same effect of detaching
successfully, so drop it to avoid spurious test failures.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/testsuite')
| -rw-r--r-- | internal/testsuite/ptrace.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/testsuite/ptrace.go b/internal/testsuite/ptrace.go index ccf0900c..b35816ec 100644 --- a/internal/testsuite/ptrace.go +++ b/internal/testsuite/ptrace.go @@ -119,6 +119,9 @@ func CheckFilter(pid, index int, sum [sha512.Size]byte) (err error) { defer func() { if detachErr := ptraceDetach(pid); err == nil { err = detachErr + if errors.Is(err, syscall.ESRCH) { + err = nil + } } }() |
